BusyBox Bug and Patch Tracking
BusyBox
  

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

- Relationships

- Notes
(0004614)
vda
02-14-08 04:24

Fixed in rev 21016. Thanks!
 

- Issue History
Date Modified Username Field Change
05-31-07 06:18 zdevai New Issue
05-31-07 06:18 zdevai Status new => assigned
05-31-07 06:18 zdevai Assigned To  => BusyBox
02-14-08 04:24 vda Status assigned => closed
02-14-08 04:24 vda Note Added: 0004614
02-14-08 04:24 vda Resolution open => fixed


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker