diff options
-rw-r--r-- | apps/codecs/codecs.make | 3 | ||||
-rw-r--r-- | apps/plugins/doom/SOURCES | 1 | ||||
-rw-r--r-- | apps/plugins/doom/doom.make | 1 | ||||
-rw-r--r-- | apps/plugins/lua/Makefile | 2 | ||||
-rw-r--r-- | apps/plugins/plugins.make | 3 | ||||
-rw-r--r-- | apps/plugins/rockboy/SOURCES | 1 | ||||
-rw-r--r-- | apps/plugins/rockboy/rockboy.make | 1 | ||||
-rwxr-xr-x | tools/configure | 39 |
8 files changed, 25 insertions, 26 deletions
diff --git a/apps/codecs/codecs.make b/apps/codecs/codecs.make index be1a0e0f00..1a5dd8f36a 100644 --- a/apps/codecs/codecs.make +++ b/apps/codecs/codecs.make | |||
@@ -112,7 +112,8 @@ $(CODECDIR)/%.o: $(ROOTDIR)/apps/codecs/%.S | |||
112 | -I$(dir $<) $(CODECFLAGS) $(ASMFLAGS) -c $< -o $@ | 112 | -I$(dir $<) $(CODECFLAGS) $(ASMFLAGS) -c $< -o $@ |
113 | 113 | ||
114 | ifdef APP_TYPE | 114 | ifdef APP_TYPE |
115 | CODECLDFLAGS = $(SHARED_FLAG) # <-- from Makefile | 115 | CODECLDFLAGS = $(SHARED_LDFLAG) # <-- from Makefile |
116 | CODECFLAGS += $(SHARED_CFLAGS) # <-- from Makefile | ||
116 | else | 117 | else |
117 | CODECLDFLAGS = -T$(CODECLINK_LDS) -Wl,--gc-sections -Wl,-Map,$(CODECDIR)/$*.map | 118 | CODECLDFLAGS = -T$(CODECLINK_LDS) -Wl,--gc-sections -Wl,-Map,$(CODECDIR)/$*.map |
118 | CODECFLAGS += -UDEBUG -DNDEBUG | 119 | CODECFLAGS += -UDEBUG -DNDEBUG |
diff --git a/apps/plugins/doom/SOURCES b/apps/plugins/doom/SOURCES index 6cd69faee6..470cbf159c 100644 --- a/apps/plugins/doom/SOURCES +++ b/apps/plugins/doom/SOURCES | |||
@@ -1,3 +1,4 @@ | |||
1 | ../../../firmware/libc/sscanf.c | ||
1 | info.c | 2 | info.c |
2 | doomdef.c | 3 | doomdef.c |
3 | doomstat.c | 4 | doomstat.c |
diff --git a/apps/plugins/doom/doom.make b/apps/plugins/doom/doom.make index 58a4708819..07b553c454 100644 --- a/apps/plugins/doom/doom.make +++ b/apps/plugins/doom/doom.make | |||
@@ -13,7 +13,6 @@ DOOMBUILDDIR := $(BUILDDIR)/apps/plugins/doom | |||
13 | ROCKS += $(DOOMBUILDDIR)/doom.rock | 13 | ROCKS += $(DOOMBUILDDIR)/doom.rock |
14 | 14 | ||
15 | DOOM_SRC := $(call preprocess, $(DOOMSRCDIR)/SOURCES) | 15 | DOOM_SRC := $(call preprocess, $(DOOMSRCDIR)/SOURCES) |
16 | DOOM_SRC += $(ROOTDIR)/firmware/libc/sscanf.c | ||
17 | DOOM_OBJ := $(call c2obj, $(DOOM_SRC)) | 16 | DOOM_OBJ := $(call c2obj, $(DOOM_SRC)) |
18 | 17 | ||
19 | # add source files to OTHER_SRC to get automatic dependencies | 18 | # add source files to OTHER_SRC to get automatic dependencies |
diff --git a/apps/plugins/lua/Makefile b/apps/plugins/lua/Makefile index 09535ac530..8568d79c4c 100644 --- a/apps/plugins/lua/Makefile +++ b/apps/plugins/lua/Makefile | |||
@@ -55,7 +55,7 @@ ifdef APP_TYPE | |||
55 | # This is the SDL simulator version | 55 | # This is the SDL simulator version |
56 | 56 | ||
57 | $(OUTPUT): $(OBJS) | 57 | $(OUTPUT): $(OBJS) |
58 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ | 58 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_LDFLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ |
59 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 59 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) |
60 | # 'x' must be kept or you'll have "Win32 error 5" | 60 | # 'x' must be kept or you'll have "Win32 error 5" |
61 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | 61 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 |
diff --git a/apps/plugins/plugins.make b/apps/plugins/plugins.make index 3271c57303..0c667aaf24 100644 --- a/apps/plugins/plugins.make +++ b/apps/plugins/plugins.make | |||
@@ -98,7 +98,8 @@ $(BUILDDIR)/apps/plugins/%.o: $(ROOTDIR)/apps/plugins/%.c | |||
98 | $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -I$(dir $<) $(PLUGINFLAGS) -c $< -o $@ | 98 | $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -I$(dir $<) $(PLUGINFLAGS) -c $< -o $@ |
99 | 99 | ||
100 | ifdef APP_TYPE | 100 | ifdef APP_TYPE |
101 | PLUGINLDFLAGS = $(SHARED_FLAG) # <-- from Makefile | 101 | PLUGINLDFLAGS = $(SHARED_LDFLAG) # <-- from Makefile |
102 | PLUGINFLAGS += $(SHARED_CFLAGS) # <-- from Makefile | ||
102 | else | 103 | else |
103 | PLUGINLDFLAGS = -T$(PLUGINLINK_LDS) -Wl,--gc-sections -Wl,-Map,$*.map | 104 | PLUGINLDFLAGS = -T$(PLUGINLINK_LDS) -Wl,--gc-sections -Wl,-Map,$*.map |
104 | OVERLAYLDFLAGS = -T$(OVERLAYREF_LDS) -Wl,--gc-sections -Wl,-Map,$*.refmap | 105 | OVERLAYLDFLAGS = -T$(OVERLAYREF_LDS) -Wl,--gc-sections -Wl,-Map,$*.refmap |
diff --git a/apps/plugins/rockboy/SOURCES b/apps/plugins/rockboy/SOURCES index 8806b58389..b289db203e 100644 --- a/apps/plugins/rockboy/SOURCES +++ b/apps/plugins/rockboy/SOURCES | |||
@@ -1,3 +1,4 @@ | |||
1 | ../../../firmware/libc/sscanf.c | ||
1 | cpu.c | 2 | cpu.c |
2 | emu.c | 3 | emu.c |
3 | events.c | 4 | events.c |
diff --git a/apps/plugins/rockboy/rockboy.make b/apps/plugins/rockboy/rockboy.make index d7ae68c0c4..4869cedcbf 100644 --- a/apps/plugins/rockboy/rockboy.make +++ b/apps/plugins/rockboy/rockboy.make | |||
@@ -11,7 +11,6 @@ ROCKBOY_SRCDIR = $(APPSDIR)/plugins/rockboy | |||
11 | ROCKBOY_OBJDIR = $(BUILDDIR)/apps/plugins/rockboy | 11 | ROCKBOY_OBJDIR = $(BUILDDIR)/apps/plugins/rockboy |
12 | 12 | ||
13 | ROCKBOY_SRC := $(call preprocess, $(ROCKBOY_SRCDIR)/SOURCES) | 13 | ROCKBOY_SRC := $(call preprocess, $(ROCKBOY_SRCDIR)/SOURCES) |
14 | ROCKBOY_SRC += $(ROOTDIR)/firmware/libc/sscanf.c | ||
15 | ROCKBOY_OBJ := $(call c2obj, $(ROCKBOY_SRC)) | 14 | ROCKBOY_OBJ := $(call c2obj, $(ROCKBOY_SRC)) |
16 | 15 | ||
17 | OTHER_SRC += $(ROCKBOY_SRC) | 16 | OTHER_SRC += $(ROCKBOY_SRC) |
diff --git a/tools/configure b/tools/configure index 461e00ce8f..b46037c6a5 100755 --- a/tools/configure +++ b/tools/configure | |||
@@ -225,7 +225,8 @@ simcc () { | |||
225 | fi | 225 | fi |
226 | 226 | ||
227 | # default share option, override below if needed | 227 | # default share option, override below if needed |
228 | SHARED_FLAG="-shared" | 228 | SHARED_LDFLAG="-shared" |
229 | SHARED_CFLAGS="-fPIC -fvisibility=hidden" | ||
229 | 230 | ||
230 | if [ "$win32crosscompile" = "yes" ]; then | 231 | if [ "$win32crosscompile" = "yes" ]; then |
231 | LDOPTS="$LDOPTS -mconsole" | 232 | LDOPTS="$LDOPTS -mconsole" |
@@ -267,7 +268,7 @@ simcc () { | |||
267 | sigaltstack=`check_sigaltstack` | 268 | sigaltstack=`check_sigaltstack` |
268 | echo "Darwin host detected" | 269 | echo "Darwin host detected" |
269 | LDOPTS="$LDOPTS -ldl" | 270 | LDOPTS="$LDOPTS -ldl" |
270 | SHARED_FLAG="-dynamiclib -Wl\,-single_module" | 271 | SHARED_LDFLAG="-dynamiclib -Wl\,-single_module" |
271 | ;; | 272 | ;; |
272 | 273 | ||
273 | SunOS) | 274 | SunOS) |
@@ -305,20 +306,11 @@ simcc () { | |||
305 | GCCOPTS="$GCCOPTS -I\$(SIMDIR)" | 306 | GCCOPTS="$GCCOPTS -I\$(SIMDIR)" |
306 | 307 | ||
307 | if test "X$win32crosscompile" != "Xyes"; then | 308 | if test "X$win32crosscompile" != "Xyes"; then |
308 | case `uname -m` in | 309 | if test "`uname -m`" = "i686"; then |
309 | x86_64|amd64) | 310 | echo "Enabling MMX support" |
310 | # fPIC is needed to make shared objects link | 311 | GCCOPTS="$GCCOPTS -mmmx" |
311 | # setting visibility to hidden is necessary to avoid strange crashes | 312 | fi |
312 | # due to symbol clashing | 313 | # x86_64 supports MMX by default |
313 | GCCOPTS="$GCCOPTS -fPIC -fvisibility=hidden" | ||
314 | # x86_64 supports MMX by default | ||
315 | ;; | ||
316 | |||
317 | i686) | ||
318 | echo "Enabling MMX support" | ||
319 | GCCOPTS="$GCCOPTS -mmmx" | ||
320 | ;; | ||
321 | esac | ||
322 | 314 | ||
323 | id=$$ | 315 | id=$$ |
324 | cat >$tmpdir/conftest-$id.c <<EOF | 316 | cat >$tmpdir/conftest-$id.c <<EOF |
@@ -532,7 +524,8 @@ maemocc () { | |||
532 | GCCOPTIMIZE='' | 524 | GCCOPTIMIZE='' |
533 | LDOPTS="-lm -ldl $LDOPTS" | 525 | LDOPTS="-lm -ldl $LDOPTS" |
534 | GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs" | 526 | GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs" |
535 | SHARED_FLAG="-shared" | 527 | SHARED_LDFLAG="-shared" |
528 | SHARED_CFLAGS='' | ||
536 | endian="little" | 529 | endian="little" |
537 | thread_support="HAVE_SIGALTSTACK_THREADS" | 530 | thread_support="HAVE_SIGALTSTACK_THREADS" |
538 | 531 | ||
@@ -626,7 +619,8 @@ pandoracc () { | |||
626 | GCCOPTIMIZE='' | 619 | GCCOPTIMIZE='' |
627 | LDOPTS="-lm -ldl $LDOPTS" | 620 | LDOPTS="-lm -ldl $LDOPTS" |
628 | GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs" | 621 | GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs" |
629 | SHARED_FLAG="-shared" | 622 | SHARED_LDFLAG="-shared" |
623 | SHARED_CFLAGS='' | ||
630 | endian="little" | 624 | endian="little" |
631 | thread_support="HAVE_SIGALTSTACK_THREADS" | 625 | thread_support="HAVE_SIGALTSTACK_THREADS" |
632 | 626 | ||
@@ -671,7 +665,8 @@ androidcc () { | |||
671 | --sysroot=$ANDROID_NDK_PATH/platforms/android-4/arch-arm" | 665 | --sysroot=$ANDROID_NDK_PATH/platforms/android-4/arch-arm" |
672 | LDOPTS="$LDOPTS -shared -nostdlib -ldl -llog" | 666 | LDOPTS="$LDOPTS -shared -nostdlib -ldl -llog" |
673 | endian="little" | 667 | endian="little" |
674 | SHARED_FLAG="-shared" | 668 | SHARED_LDFLAG="-shared" |
669 | SHARED_CFLAGS='' | ||
675 | } | 670 | } |
676 | 671 | ||
677 | whichadvanced () { | 672 | whichadvanced () { |
@@ -3686,7 +3681,8 @@ sed > Makefile \ | |||
3686 | -e "s<@PLUGINS@<${plugins}<g" \ | 3681 | -e "s<@PLUGINS@<${plugins}<g" \ |
3687 | -e "s<@CODECS@<${swcodec}<g" \ | 3682 | -e "s<@CODECS@<${swcodec}<g" \ |
3688 | -e "s<@PROFILE_OPTS@<${PROFILE_OPTS}<g" \ | 3683 | -e "s<@PROFILE_OPTS@<${PROFILE_OPTS}<g" \ |
3689 | -e "s<@SHARED_FLAG@<${SHARED_FLAG}<g" \ | 3684 | -e "s<@SHARED_LDFLAG@<${SHARED_LDFLAG}<g" \ |
3685 | -e "s<@SHARED_CFLAGS@<${SHARED_CFLAGS}<g" \ | ||
3690 | -e "s<@GCCOPTS@<${GCCOPTS}<g" \ | 3686 | -e "s<@GCCOPTS@<${GCCOPTS}<g" \ |
3691 | -e "s<@TARGET_INC@<${TARGET_INC}<g" \ | 3687 | -e "s<@TARGET_INC@<${TARGET_INC}<g" \ |
3692 | -e "s<@LDOPTS@<${LDOPTS}<g" \ | 3688 | -e "s<@LDOPTS@<${LDOPTS}<g" \ |
@@ -3774,7 +3770,8 @@ export SIMDIR=\$(ROOTDIR)/uisimulator/sdl | |||
3774 | export GCCOPTS=@GCCOPTS@ | 3770 | export GCCOPTS=@GCCOPTS@ |
3775 | export TARGET_INC=@TARGET_INC@ | 3771 | export TARGET_INC=@TARGET_INC@ |
3776 | export LOADADDRESS=@LOADADDRESS@ | 3772 | export LOADADDRESS=@LOADADDRESS@ |
3777 | export SHARED_FLAG=@SHARED_FLAG@ | 3773 | export SHARED_LDFLAG=@SHARED_LDFLAG@ |
3774 | export SHARED_CFLAGS=@SHARED_CFLAGS@ | ||
3778 | export LDOPTS=@LDOPTS@ | 3775 | export LDOPTS=@LDOPTS@ |
3779 | export GLOBAL_LDOPTS=@GLOBAL_LDOPTS@ | 3776 | export GLOBAL_LDOPTS=@GLOBAL_LDOPTS@ |
3780 | export GCCVER=@GCCVER@ | 3777 | export GCCVER=@GCCVER@ |