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
0000565 [BusyBox] Other minor always 11-27-05 13:00 11-28-05 19:45
Reporter ShaneAnderson View Status public  
Assigned To BusyBox
Priority normal Resolution fixed  
Status closed   Product Version 1.01
Summary 0000565: Invalid compiler options on ARM cross compile
Description When I'm cross-compiling for an ARM processor and I setup the .config file via make menuconfig with the following:

USING_CROSS_COMPILER=y
CROSS_COMPILER_PREFIX="arm-linux-"
EXTRA_CFLAGS_OPTIONS="-march=armv4 -mtune=arm9tdmi"

I figure I should be able to just do a 'make' after that. It fails with the error shown in "Additional Information" below. I figure that 'Rules.mak' is assuming I have an i386 gcc because it's adding all the -malign-xxx=0 options, not the arm gcc option -fstrict-aliasing.

There are many ways to fix this:

1. compile with 'make CROSS=arm-linux-' works
2. move the inclusion of .config higher up in Rules.mak, so it comes before the assignment of CROSS, CC, AR, etc...

I figure 2 is the right way, since the .config file is included in Rules.mak, but it's after some uses of the variables that should've come from .config...
Additional Information # make
arm-linux-gcc -I/export/eng/nve/nasa/src/busybox-1.01/include -I/export/eng/nve/nasa/src/busybox-1.01/include -I/export/eng/nve/nasa/src/busybox-1.01/libbb -Wall -Wstrict-prototypes -Wshadow -Os -malign-functions=0 -malign-jumps=0 -malign-loops=0 -fomit-frame-pointer -D_GNU_SOURCE -DNDEBUG -march=armv4 -mtune=arm9tdmi -c -o /export/eng/nve/nasa/src/busybox-1.01/applets/applets.o /export/eng/nve/nasa/src/busybox-1.01/applets/applets.c
cc1: Invalid option `align-functions=0'
cc1: Invalid option `align-jumps=0'
cc1: Invalid option `align-loops=0'
make: *** [/export/eng/nve/nasa/src/busybox-1.01/applets/applets.o] Error 1

# arm-linux-gcc -v
Reading specs from /usr/lib/gcc-lib/arm-linux/2.95.2/specs
gcc version 2.95.2 20000313 (Debian GNU/Linux)
Attached Files

- Relationships

- Notes
(0000700)
vapier
11-27-05 22:46

TARGET_ARCH is calculated by running `$(CC) -dumpmachine`

what does `arm-linux-gcc -dumpmachine` show ?
 
(0000704)
ShaneAnderson
11-28-05 10:55

arm-linux-gcc -dumpmachine spits out 'arm-linux'...

The problem is the TARGET_ARCH is, like you show, based on $(CC) which is assigned in Rules.mak _before_ the .config file is included, so if CROSS isn't already set, it picks my host gcc instead of arm-linux-gcc...
 
(0000707)
vapier
11-28-05 18:52

indeed ... i missed (2) in your original Description

fixed in svn
 

- Issue History
Date Modified Username Field Change
11-27-05 13:00 ShaneAnderson New Issue
11-27-05 13:01 ShaneAnderson Status new => assigned
11-27-05 13:01 ShaneAnderson Assigned To  => BusyBox
11-27-05 22:46 vapier Note Added: 0000700
11-28-05 10:55 ShaneAnderson Note Added: 0000704
11-28-05 18:52 vapier Note Added: 0000707
11-28-05 19:45 vapier Status assigned => closed
11-28-05 19:45 vapier Resolution open => fixed


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker