mirror of
https://github.com/sheumann/hush.git
synced 2024-12-22 14:30:31 +00:00
Build system: track -Wl,-elf2flt in CFLAGS_busybox too.
Document in comments that it generally should be thers, not in LDFLAGS
This commit is contained in:
parent
7bdf0c82da
commit
401de648a7
@ -91,8 +91,13 @@ ifeq ($(CONFIG_DMALLOC),y)
|
|||||||
LDLIBS += dmalloc
|
LDLIBS += dmalloc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LDFLAGS_ELF2FLT = -Wl,-elf2flt
|
# If a flat binary should be built, CFLAGS_busybox="-Wl,-elf2flt"
|
||||||
ifneq (,$(findstring $(LDFLAGS_ELF2FLT),$(LDFLAGS)))
|
# env var should be set for make invocation.
|
||||||
|
# Here we check whether CFLAGS_busybox indeed contains that flag.
|
||||||
|
# (For historical reasons, we also check LDFLAGS, which doesn't
|
||||||
|
# seem to be entirely correct variable to put "-Wl,-elf2flt" into).
|
||||||
|
W_ELF2FLT = -Wl,-elf2flt
|
||||||
|
ifneq (,$(findstring $(W_ELF2FLT),$(LDFLAGS) $(CFLAGS_busybox)))
|
||||||
SKIP_STRIP = y
|
SKIP_STRIP = y
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -117,6 +117,7 @@ a_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(CPPFLAGS) \
|
|||||||
|
|
||||||
cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(__cpp_flags)
|
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)
|
ld_flags = $(LDFLAGS) $(EXTRA_LDFLAGS)
|
||||||
|
|
||||||
# Finds the multi-part object the current object will be linked into
|
# Finds the multi-part object the current object will be linked into
|
||||||
@ -146,6 +147,8 @@ $(obj)/%:: $(src)/%_shipped
|
|||||||
# Linking
|
# Linking
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# TODO: LDFLAGS usually is supposed to contain gcc's flags, not ld's.
|
||||||
|
# but here we feed them to ld!
|
||||||
quiet_cmd_ld = LD $@
|
quiet_cmd_ld = LD $@
|
||||||
cmd_ld = $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS_$(@F)) \
|
cmd_ld = $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS_$(@F)) \
|
||||||
$(filter-out FORCE,$^) -o $@
|
$(filter-out FORCE,$^) -o $@
|
||||||
|
Loading…
Reference in New Issue
Block a user