From: notaz Date: Sun, 29 Apr 2012 16:23:09 +0000 (+0300) Subject: fix some build issues and warnings X-Git-Tag: r15~47 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac6575cdd93d665efc374c1a14b391c6a5308972;p=pcsx_rearmed.git fix some build issues and warnings --- diff --git a/Makefile b/Makefile index 0c203be7..aa97b12c 100644 --- a/Makefile +++ b/Makefile @@ -39,6 +39,7 @@ endif ifeq "$(HAVE_NEON)" "1" OBJS += libpcsxcore/gte_neon.o endif +libpcsxcore/gte.o libpcsxcore/gte_nf.o: CFLAGS += -fno-strict-aliasing libpcsxcore/cdrom.o libpcsxcore/misc.o: CFLAGS += -Wno-pointer-sign libpcsxcore/misc.o libpcsxcore/psxbios.o: CFLAGS += -Wno-nonnull diff --git a/configure b/configure index ecd2215b..7cfd626a 100755 --- a/configure +++ b/configure @@ -41,6 +41,7 @@ optimize_arm926ej="no" # hardcoded stuff CC="${CC-${CROSS_COMPILE}gcc}" +CXX="${CXX-${CROSS_COMPILE}g++}" AS="${AS-${CROSS_COMPILE}as}" AR="${AS-${CROSS_COMPILE}ar}" config_mak="config.mak" @@ -110,7 +111,7 @@ if [ "$show_help" = "yes" ]; then echo " --disable-dynarec disable dynamic recompiler" echo " (dynarec is only available and enabled on ARM)" echo "influential environment variables:" - echo " CROSS_COMPILE CC AS AR CFLAGS ASFLAGS LDFLAGS LDLIBS" + echo " CROSS_COMPILE CC CXX AS AR CFLAGS ASFLAGS LDFLAGS LDLIBS" exit 1 fi @@ -240,6 +241,7 @@ printf " '%s'" "$0" "$@" >> $config_mak echo >> $config_mak echo "CC = $CC" >> $config_mak +echo "CXX = $CXX" >> $config_mak echo "AS = $AS" >> $config_mak echo "CFLAGS += $CFLAGS" >> $config_mak echo "ASFLAGS += $ASFLAGS" >> $config_mak diff --git a/frontend/config.h b/frontend/config.h index 15ffd309..dcfb5984 100644 --- a/frontend/config.h +++ b/frontend/config.h @@ -1,6 +1,6 @@ #define MAXPATHLEN 256 //#define NOPSXREC -#define __LINUX__ +#define __LINUX__ 1 #define PACKAGE_NAME "pcsx" #define PACKAGE_VERSION "1.9" #define DEF_PLUGIN_DIR "." diff --git a/frontend/main.c b/frontend/main.c index dc5be3cf..4ebcf345 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -730,9 +730,11 @@ void *SysLoadLibrary(const char *lib) { #if defined(__x86_64__) || defined(__i386__) // convenience hack - char name[MAXPATHLEN]; - snprintf(name, sizeof(name), "%s.x86", lib); - lib = name; + if (strstr(lib, ".x86") == NULL) { + char name[MAXPATHLEN]; + snprintf(name, sizeof(name), "%s.x86", lib); + lib = name; + } #endif ret = dlopen(lib, RTLD_NOW); diff --git a/libpcsxcore/new_dynarec/emu_if.c b/libpcsxcore/new_dynarec/emu_if.c index 9011f9c8..85ec1743 100644 --- a/libpcsxcore/new_dynarec/emu_if.c +++ b/libpcsxcore/new_dynarec/emu_if.c @@ -299,6 +299,7 @@ static void ari64_reset() pending_exception = 1; } +#ifdef __arm__ // execute until predefined leave points // (HLE softcall exit and BIOS fastboot end) static void ari64_execute_until() @@ -321,6 +322,7 @@ static void ari64_execute() evprintf("drc left @%08x\n", psxRegs.pc); } } +#endif static void ari64_clear(u32 addr, u32 size) { diff --git a/plugins/gpulib/Makefile b/plugins/gpulib/Makefile index 43f0d2b3..2739e5cb 100644 --- a/plugins/gpulib/Makefile +++ b/plugins/gpulib/Makefile @@ -8,18 +8,19 @@ include ../../config.mak OBJS += gpu.o ifeq "$(ARCH)" "arm" -ifeq "$(HAVE_NEON)" "1" -OBJS += cspace_neon.o -else -OBJS += cspace.o -endif OBJS += vout_pl.o EXT = a else -CFLAGS += `sdl-config --cflags` -OBJS += vout_sdl.o +#CFLAGS += `sdl-config --cflags` +#OBJS += vout_sdl.o +OBJS += vout_pl.o EXT = $(ARCH).a endif +ifeq "$(HAVE_NEON)" "1" +OBJS += cspace_neon.o +else +OBJS += cspace.o +endif CFLAGS += $(PLUGIN_CFLAGS) TARGET = gpulib.$(EXT) diff --git a/plugins/gpulib/gpulib.mak b/plugins/gpulib/gpulib.mak index c82607af..48e73cb6 100644 --- a/plugins/gpulib/gpulib.mak +++ b/plugins/gpulib/gpulib.mak @@ -7,12 +7,9 @@ CFLAGS += $(PLUGIN_CFLAGS) ifeq "$(ARCH)" "arm" EXT = else - LDLIBS_GPULIB += `sdl-config --libs` + #LDLIBS_GPULIB += `sdl-config --libs` EXT = .$(ARCH) endif -ifeq "$(PLATFORM)" "maemo" - CFLAGS += -DMAEMO -endif ifdef DEBUG CFLAGS += -O0 endif @@ -25,17 +22,25 @@ endif ifdef BIN_GPULIB TARGETS += $(BIN_GPULIB)$(EXT) endif +CC_STANDLALONE = $(CC) +CC_GPULIB = $(CC) all: ../../config.mak $(TARGETS) ifdef BIN_STANDLALONE +ifneq ($(findstring .cpp,$(SRC_STANDALONE)),) +CC_STANDLALONE = $(CXX) +endif $(BIN_STANDLALONE)$(EXT): $(SRC) $(SRC_STANDALONE) $(GPULIB_A) - $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) $(LDLIBS_STANDALONE) + $(CC_STANDLALONE) -o $@ $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) $(LDLIBS_STANDALONE) endif ifdef BIN_GPULIB +ifneq ($(findstring .cpp,$(SRC_GPULIB)),) +CC_GPULIB = $(CXX) +endif $(BIN_GPULIB)$(EXT): $(SRC) $(SRC_GPULIB) $(GPULIB_A) - $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) $(LDLIBS_GPULIB) + $(CC_GPULIB) -o $@ $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) $(LDLIBS_GPULIB) endif $(GPULIB_A):