diff --git a/apps/plugins/lua/Makefile b/apps/plugins/lua/Makefile index dcf2910c36..a9c8c22099 100644 --- a/apps/plugins/lua/Makefile +++ b/apps/plugins/lua/Makefile @@ -50,7 +50,7 @@ ifdef APP_TYPE # This is the SDL simulator version $(OUTPUT): $(OBJS) - $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_LDFLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ + $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_LDFLAGS) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 diff --git a/apps/plugins/plugins.make b/apps/plugins/plugins.make index 71eaeb52c0..ac94a04c59 100644 --- a/apps/plugins/plugins.make +++ b/apps/plugins/plugins.make @@ -112,7 +112,7 @@ $(BUILDDIR)/apps/plugins/%.o: $(ROOTDIR)/apps/plugins/%.c $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -I$(dir $<) $(PLUGINFLAGS) -c $< -o $@ ifdef APP_TYPE - PLUGINLDFLAGS = $(SHARED_LDFLAG) -Wl,-Map,$*.map + PLUGINLDFLAGS = $(SHARED_LDFLAGS) -Wl,-Map,$*.map PLUGINFLAGS += $(SHARED_CFLAGS) # <-- from Makefile else PLUGINLDFLAGS = -T$(PLUGINLINK_LDS) -Wl,--gc-sections -Wl,-Map,$*.map diff --git a/lib/rbcodec/codecs/codecs.make b/lib/rbcodec/codecs/codecs.make index 2c56d6da3f..4f86db0d7d 100644 --- a/lib/rbcodec/codecs/codecs.make +++ b/lib/rbcodec/codecs/codecs.make @@ -26,7 +26,7 @@ CODECFLAGS := $(CFLAGS) $(RBCODEC_CFLAGS) -fstrict-aliasing \ -I$(RBCODECLIB_DIR)/codecs -I$(RBCODECLIB_DIR)/codecs/lib -DCODEC ifdef APP_TYPE - CODECLDFLAGS = $(SHARED_LDFLAG) -Wl,--gc-sections -Wl,-Map,$(CODECDIR)/$*.map + CODECLDFLAGS = $(SHARED_LDFLAGS) -Wl,--gc-sections -Wl,-Map,$(CODECDIR)/$*.map CODECFLAGS += $(SHARED_CFLAGS) # <-- from Makefile else CODECLDFLAGS = -T$(CODECLINK_LDS) -Wl,--gc-sections -Wl,-Map,$(CODECDIR)/$*.map diff --git a/tools/configure b/tools/configure index 9539dc687c..5a08ef649b 100755 --- a/tools/configure +++ b/tools/configure @@ -293,7 +293,7 @@ simcc () { fi # default share option, override below if needed - SHARED_LDFLAG="-shared" + SHARED_LDFLAGS="-shared" SHARED_CFLAGS="-fPIC -fvisibility=hidden" if [ "$win32crosscompile" = "yes" ]; then @@ -379,7 +379,7 @@ simcc () { sigaltstack=`check_sigaltstack` echo "Darwin host detected" LDOPTS="$LDOPTS -ldl" - SHARED_LDFLAG="-dynamiclib -Wl\,-single_module" + SHARED_LDFLAGS="-dynamiclib -Wl\,-single_module" ;; SunOS) @@ -618,7 +618,7 @@ maemocc () { GCCOPTIMIZE='' LDOPTS="-lm -ldl $LDOPTS" GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs" - SHARED_LDFLAG="-shared" + SHARED_LDFLAGS="-shared" SHARED_CFLAGS='' endian="little" thread_support="HAVE_SIGALTSTACK_THREADS" @@ -713,7 +713,7 @@ pandoracc () { GCCOPTIMIZE='' LDOPTS="-lm -ldl $LDOPTS" GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs" - SHARED_LDFLAG="-shared" + SHARED_LDFLAGS="-shared" SHARED_CFLAGS='' endian="little" thread_support="HAVE_SIGALTSTACK_THREADS" @@ -744,7 +744,7 @@ arm1176jzlinuxcc () { GCCOPTIMIZE='' LDOPTS="-lasound -lpthread -lm -ldl -lrt $LDOPTS" GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs" # warn about undefined symbols in shared libraries - SHARED_LDFLAG="-shared" + SHARED_LDFLAGS="-shared" SHARED_CFLAGS='' endian="little" app_type="ypr0" @@ -787,7 +787,7 @@ androidcc () { if [ "$modelname" != "ibassodx50" ] && [ "$modelname" != "ibassodx90" ]; then LDOPTS="$LDOPTS -Wl,-soname,librockbox.so -shared" fi - SHARED_LDFLAG="-shared" + SHARED_LDFLAGS="-shared" SHARED_CFLAGS='' GLOBAL_LDOPTS="-Wl,-z,defs -Wl,-z,noexecstack" thread_support="HAVE_SIGALTSTACK_THREADS" @@ -873,7 +873,7 @@ androidndkcc() GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//` LDOPTS="$LDOPTS -ldl -llog" - SHARED_LDFLAG="-shared" + SHARED_LDFLAGS="-shared" SHARED_CFLAGS='' GLOBAL_LDOPTS="-Wl,-z,defs -Wl,-z,noexecstack" @@ -918,7 +918,7 @@ mipsellinuxcc () { GCCOPTIMIZE='' LDOPTS="-lasound -lpthread -lm -ldl -lrt $LDOPTS" GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs" - SHARED_LDFLAG="-shared" + SHARED_LDFLAGS="-shared" SHARED_CFLAGS='-fPIC -fvisibility=hidden' endian="little" thread_support="HAVE_SIGALTSTACK_THREADS" @@ -4699,7 +4699,7 @@ export SIMDIR=\$(ROOTDIR)/uisimulator/sdl export GCCOPTS=${GCCOPTS} export TARGET_INC=${TARGET_INC} export LOADADDRESS=${loadaddress} -export SHARED_LDFLAG=${SHARED_LDFLAG} +export SHARED_LDFLAGS=${SHARED_LDFLAGS} export SHARED_CFLAGS=${SHARED_CFLAGS} export LDOPTS=${LDOPTS} export GLOBAL_LDOPTS=${GLOBAL_LDOPTS}