From fc4cd7ead0f5a045e9f03043fa2dec73548cd6e3 Mon Sep 17 00:00:00 2001 From: Jarkko Sakkinen Date: Tue, 25 Oct 2016 19:32:05 +0300 Subject: [PATCH 1/3] Do not define CC and CXX in sdk/cpprt/Makefile This will prevent the cross compilation environment from defining its own CC and CXX. Signed-off-by: Jarkko Sakkinen --- sdk/cpprt/Makefile | 3 --- 1 file changed, 3 deletions(-) diff --git a/sdk/cpprt/Makefile b/sdk/cpprt/Makefile index beca61bcb2..0d8f4a5175 100644 --- a/sdk/cpprt/Makefile +++ b/sdk/cpprt/Makefile @@ -79,9 +79,6 @@ $(CPPRT): $(OBJS) prepare-libunwind libunwind $(CP) linux/libunwind/src/.libs/libunwind.a $(CPPRT) $(AR) rs $@ $(OBJS) -$(CPPRT): CC = gcc -$(CPPRT): CXX = g++ - .PHONY: libunwind libunwind: cd linux/libunwind/ && ( test -f Makefile || ./autogen-linux.sh ) && $(MAKE) -j5 From 219d3e6383eb5efeb2027a727adf864d66bda690 Mon Sep 17 00:00:00 2001 From: Jarkko Sakkinen Date: Wed, 26 Oct 2016 01:27:12 +0300 Subject: [PATCH 2/3] Fix compilation errors in external/vtune Signed-off-by: Jarkko Sakkinen --- external/vtune/linux/sdk/src/ittnotify/ittnotify_static.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/external/vtune/linux/sdk/src/ittnotify/ittnotify_static.c b/external/vtune/linux/sdk/src/ittnotify/ittnotify_static.c index 9303895a27..325b39f978 100644 --- a/external/vtune/linux/sdk/src/ittnotify/ittnotify_static.c +++ b/external/vtune/linux/sdk/src/ittnotify/ittnotify_static.c @@ -284,7 +284,7 @@ __itt_global _N_(_ittapi_global) = { __itt_collection_normal /* collection state */ }; -ITT_EXTERN_C __itt_global* _N_(get_ittapi_global)() { return &_N_(_ittapi_global); } +ITT_EXTERN_C __itt_global* _N_(get_ittapi_global)(void) { return &_N_(_ittapi_global); } typedef void (__itt_api_init_t)(__itt_global*, __itt_group_id); typedef void (__itt_api_fini_t)(__itt_global*); @@ -829,12 +829,12 @@ static __itt_group_id __itt_get_groups(void) if (group_str != NULL) { - int len; + unsigned int len; char gr[255]; const char* chunk; - while ((group_str = __itt_fsplit(group_str, ",; ", &chunk, &len)) != NULL) + while ((group_str = __itt_fsplit(group_str, ",; ", &chunk, (int *)&len)) != NULL) { - int min_len = min(len, (int)(sizeof(gr) - 1)); + unsigned int min_len = min(len, (int)(sizeof(gr) - 1)); __itt_fstrcpyn(gr, sizeof(gr) - 1, chunk, min_len); gr[min_len] = 0; From d53460f0eec9c459f2bed9a887b84141292ee447 Mon Sep 17 00:00:00 2001 From: Jarkko Sakkinen Date: Sat, 3 Dec 2016 20:14:59 +0200 Subject: [PATCH 3/3] Fixed compilation problems in uae_service Signed-off-by: Jarkko Sakkinen --- psw/uae_service/linux/Makefile | 13 ++++++++++++- psw/uae_service/uae_wrapper/inc/AEServices.h | 1 - 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/psw/uae_service/linux/Makefile b/psw/uae_service/linux/Makefile index 695a3c227d..9d7e1af99e 100644 --- a/psw/uae_service/linux/Makefile +++ b/psw/uae_service/linux/Makefile @@ -57,7 +57,18 @@ INCLUDE += -I$(LINUX_EXTERNAL_DIR)/epid \ -I$(IPC_COMMON_PROTO_DIR) \ -I$(LINUX_PSW_DIR)/ae/aesm_service/source -CXXFLAGS += -fPIC -Werror -g +CXXFLAGS += -fPIC -Werror -DPROTOBUF_INLINE_NOT_IN_HEADERS=0 +PROTPBUF_CXXFLAGS := -fstack-protector -fPIC -Wall -Werror +ifdef DEBUG + PROTPBUF_CXXFLAGS += -ggdb -DDEBUG -UNDEBUG +else + PROTPBUF_CXXFLAGS += -O2 -UDEBUG -DNDEBUG +endif +ifeq ($(ARCH), x86) + PROTPBUF_CXXFLAGS += -m32 +else + PROTPBUF_CXXFLAGS += -m64 +endif EXTERNAL_LIB += -lprotobuf diff --git a/psw/uae_service/uae_wrapper/inc/AEServices.h b/psw/uae_service/uae_wrapper/inc/AEServices.h index e36de2f0a5..4a458e5464 100644 --- a/psw/uae_service/uae_wrapper/inc/AEServices.h +++ b/psw/uae_service/uae_wrapper/inc/AEServices.h @@ -56,7 +56,6 @@ struct PlainData bool operator==(const PlainData& other) const { if (this == &other) return true; - if (this == NULL || &other == NULL) return false; if (length != other.length || errorCode != other.errorCode) return false;