X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=scripts%2FMakefile.lib;h=3e54ea712f065d17f0ea56b5131bf0d26fe9a482;hb=e1603156ff96672375970f460716d37a50c63fae;hp=22c64306b3d91e124e306b6e5d3bb3c9577d4536;hpb=401de648a797c5931df1ade02c26270c82c3a345;p=oweals%2Fbusybox.git diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 22c64306b..3e54ea712 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -117,8 +117,12 @@ a_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(CPPFLAGS) \ cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(__cpp_flags) -# TODO: seems to be a wrong thing to do! LDFLAGS contains gcc's flags! -ld_flags = $(LDFLAGS) $(EXTRA_LDFLAGS) +# Seems to be a wrong thing to do. LDFLAGS contains gcc's flags, +# yet ld_flags is fed to ld. +#ld_flags = $(LDFLAGS) $(EXTRA_LDFLAGS) +# Remove the -Wl, prefix from linker options normally passed through gcc +ld_flags = $(filter-out -Wl$(comma)%,$(LDFLAGS) $(EXTRA_LDFLAGS)) + # Finds the multi-part object the current object will be linked into modname-multi = $(sort $(foreach m,$(multi-used),\ @@ -164,5 +168,3 @@ cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@ quiet_cmd_gzip = GZIP $@ cmd_gzip = gzip -f -9 < $< > $@ - -