Anonymous | Login | Signup for a new account | 11-10-2008 11:15 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0001376 | [BusyBox] Other | major | always | 05-31-07 06:18 | 02-14-08 04:24 | ||||
Reporter | zdevai | View Status | public | ||||||
Assigned To | BusyBox | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | svn | ||||||
Summary | 0001376: Add CFLAGS to final link stage | ||||||||
Description |
Currently, the final link of busybox (Makefile:568) does not pass the CFLAGS to the compiler. This way, the compiler just links the executable to its default target libraries, which is not always intended. Real example: The latest CodeSourcery ARM toolchains default to the ARMv5 arch. If you pass "-march=armv4t" with CFLAGS, the object files are compiled for that arch, but the resulting binary will still be linked with the ARMv5 libgcc and libc, which makes them unusable. |
||||||||
Additional Information |
Trivial patch: --- a/Makefile +++ b/Makefile @@ -566,7 +566,7 @@ busybox-all := $(core-y) $(libs-y) # Rule to link busybox - also used during CONFIG_KALLSYMS # May be overridden by arch/$(ARCH)/Makefile quiet_cmd_busybox__ ?= LINK $@ /> - cmd_busybox__ ?= $(srctree)/scripts/trylink $(CC) $(LDFLAGS) \ + cmd_busybox__ ?= $(srctree)/scripts/trylink $(CC) $(LDFLAGS) $(CFLAGS) \ -o $@ -Wl,-M \ -Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \ -Wl,--start-group $(busybox-all) -Wl,--end-group \ |
||||||||
Attached Files | |||||||||
|
Copyright © 2000 - 2006 Mantis Group |