Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ALL and VITA: Link with GNU Make recursive flag #2727

Merged
merged 3 commits into from
Jan 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ endif

# The build rule for the ScummVM executable
$(EXECUTABLE): $(DETECT_OBJS) $(OBJS)
$(QUIET_LINK)$(LD) $(LDFLAGS) $(PRE_OBJS_FLAGS) $+ $(POST_OBJS_FLAGS) $(LIBS) -o $@
+$(QUIET_LINK)$(LD) $(LDFLAGS) $(PRE_OBJS_FLAGS) $+ $(POST_OBJS_FLAGS) $(LIBS) -o $@

ifdef SPLIT_DWARF
$(EXECUTABLE).dwp: $(EXECUTABLE)
Expand Down
2 changes: 1 addition & 1 deletion backends/platform/ds/arm7/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ $(OUTPUT).elf : $(OFILES)
#---------------------------------------------------------------------------------
%.elf:
echo ELF
$(LD) $(LDFLAGS) -specs=ds_arm7.specs $(OFILES) $(LIBPATHS) $(LIBS) -o $(TARGET).elf
+$(LD) $(LDFLAGS) -specs=ds_arm7.specs $(OFILES) $(LIBPATHS) $(LIBS) -o $(TARGET).elf



Expand Down
2 changes: 1 addition & 1 deletion backends/platform/ds/ds.mk
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ $(ndsdir)/arm7/source/main.o: CPPFLAGS=
$(ndsdir)/arm7/arm7.elf: \
$(ndsdir)/arm7/source/libcartreset/cartreset.o \
$(ndsdir)/arm7/source/main.o
$(CXX) $(ARM7_LDFLAGS) -specs=ds_arm7.specs $+ -L$(DEVKITPRO)/libnds/lib -lnds7 -o $@
+$(LD) $(ARM7_LDFLAGS) -specs=ds_arm7.specs $+ -L$(DEVKITPRO)/libnds/lib -lnds7 -o $@



Expand Down
2 changes: 1 addition & 1 deletion backends/platform/n64/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ ROMFS.img:
genromfs -f ./ROMFS.img -d ./ROMFS -V romtest

$(TARGET).elf: $(OBJS)
$(LD) -o $(TARGET).elf $(OBJS) $(LDFLAGS)
+$(LD) -o $(TARGET).elf $(OBJS) $(LDFLAGS)

$(TARGET).bin : $(TARGET).elf
$(OBJCOPY) $(TARGET).elf $(TARGET).bin -O binary
Expand Down
2 changes: 1 addition & 1 deletion backends/platform/psp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ LDFLAGS += -Wl,-T../../plugins/psp/main_prog.ld
all: $(PSP_EBOOT)

$(TARGET).elf: $(OBJS)
$(LD) $(PRE_OBJS_FLAGS) $(OBJS) $(POST_OBJS_FLAGS) $(LDFLAGS) $(LIBS) -o $@
+$(LD) $(PRE_OBJS_FLAGS) $(OBJS) $(POST_OBJS_FLAGS) $(LDFLAGS) $(LIBS) -o $@
cp $(TARGET).elf $(TARGET).org.elf
$(FIXUP) $@

Expand Down
4 changes: 2 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -3145,8 +3145,8 @@ EOF
append_var CXXFLAGS "-mword-relocations"
append_var CXXFLAGS "-fomit-frame-pointer"
#use link time optimization to further reduce exe size
append_var CXXFLAGS "-flto=20"
append_var LDFLAGS "-flto=20"
append_var CXXFLAGS "-flto"
append_var LDFLAGS "-flto=jobserver"
#ensure verbose output during linking to prevent buildbot kills after 1200 seconds
if test "$_verbose_build" = yes ; then
append_var LDFLAGS "-Wl,-v --verbose"
Expand Down
6 changes: 3 additions & 3 deletions devtools/module.mk
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ clean-devtools:

devtools/convbdf$(EXEEXT): $(srcdir)/devtools/convbdf.cpp
$(QUIET)$(MKDIR) devtools/$(DEPDIR)
$(QUIET_LINK)$(LD) $(CXXFLAGS) -Wall -o $@ $<
+$(QUIET_LINK)$(LD) $(CXXFLAGS) -Wall -o $@ $<

devtools/md5table$(EXEEXT): $(srcdir)/devtools/md5table.c
$(QUIET)$(MKDIR) devtools/$(DEPDIR)
$(QUIET_LINK)$(LD) $(CFLAGS) -Wall -o $@ $<
+$(QUIET_LINK)$(LD) $(CFLAGS) -Wall -o $@ $<

devtools/make-scumm-fontdata$(EXEEXT): $(srcdir)/devtools/make-scumm-fontdata.c
$(QUIET)$(MKDIR) devtools/$(DEPDIR)
$(QUIET_LINK)$(LD) $(CFLAGS) -Wall -o $@ $<
+$(QUIET_LINK)$(LD) $(CFLAGS) -Wall -o $@ $<

# Rule to explicitly rebuild the wwwroot archive
wwwroot:
Expand Down
4 changes: 2 additions & 2 deletions ports.mk
Original file line number Diff line number Diff line change
Expand Up @@ -470,14 +470,14 @@ endif
# We use -force_cpusubtype_ALL to ensure the binary runs on every
# PowerPC machine.
scummvm-static: $(DETECT_OBJS) $(OBJS)
$(CXX) $(LDFLAGS) -force_cpusubtype_ALL -o scummvm-static $(DETECT_OBJS) $(OBJS) \
+$(LD) $(LDFLAGS) -force_cpusubtype_ALL -o scummvm-static $(DETECT_OBJS) $(OBJS) \
-framework CoreMIDI \
$(OSX_STATIC_LIBS) \
$(OSX_ZLIB)

# Special target to create a static linked binary for the iPhone (legacy, and iOS 7+)
iphone: $(DETECT_OBJS) $(OBJS)
$(CXX) $(LDFLAGS) -o scummvm $(DETECT_OBJS) $(OBJS) \
+$(LD) $(LDFLAGS) -o scummvm $(DETECT_OBJS) $(OBJS) \
$(OSX_STATIC_LIBS) \
-framework UIKit -framework CoreGraphics -framework OpenGLES \
-framework CoreFoundation -framework QuartzCore -framework Foundation \
Expand Down
4 changes: 2 additions & 2 deletions rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ TOOL_LIBS-$(TOOL-$(MODULE)) := $(TOOL_LIBS)
TOOL_CFLAGS-$(TOOL-$(MODULE)) := $(TOOL_CFLAGS)

$(TOOL-$(MODULE)): $(MODULE_OBJS-$(MODULE)) $(TOOL_DEPS)
$(QUIET_CXX)$(CXX) $(LDFLAGS) $(TOOL_CFLAGS-$@) $+ $(TOOL_LIBS-$@) -o $@
+$(QUIET_LINK)$(LD) $(LDFLAGS) $(TOOL_CFLAGS-$@) $+ $(TOOL_LIBS-$@) -o $@

# Reset TOOL_* vars
TOOL_EXECUTABLE:=
Expand All @@ -48,7 +48,7 @@ ifdef PLUGIN
PLUGIN-$(MODULE) := plugins/$(PLUGIN_PREFIX)$(notdir $(MODULE))$(PLUGIN_SUFFIX)
$(PLUGIN-$(MODULE)): $(MODULE_OBJS-$(MODULE)) $(PLUGIN_EXTRA_DEPS)
$(QUIET)$(MKDIR) plugins
$(QUIET_PLUGIN)$(CXX) $(SAVED_LDFLAGS) $(filter-out $(PLUGIN_EXTRA_DEPS),$+) $(PLUGIN_LDFLAGS) -o $@
+$(QUIET_PLUGIN)$(LD) $(SAVED_LDFLAGS) $(filter-out $(PLUGIN_EXTRA_DEPS),$+) $(PLUGIN_LDFLAGS) -o $@

# Reset PLUGIN var
PLUGIN:=
Expand Down
2 changes: 1 addition & 1 deletion test/module.mk
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ endif
test: test/runner
./test/runner
test/runner: test/runner.cpp $(TEST_LIBS) copy-dat
$(QUIET_CXX)$(CXX) $(TEST_CXXFLAGS) $(CPPFLAGS) $(TEST_CFLAGS) -o $@ test/runner.cpp $(TEST_LIBS) $(TEST_LDFLAGS)
+$(QUIET_CXX)$(LD) $(TEST_CXXFLAGS) $(CPPFLAGS) $(TEST_CFLAGS) -o $@ test/runner.cpp $(TEST_LIBS) $(TEST_LDFLAGS)
test/runner.cpp: $(TESTS)
@mkdir -p test
$(srcdir)/test/cxxtest/cxxtestgen.py $(TEST_FLAGS) -o $@ $+
Expand Down