[BusyBox 0000565]: Invalid compiler options on ARM cross compile
bugs at busybox.net
bugs at busybox.net
Mon Nov 28 18:55:08 UTC 2005
A NOTE has been added to this issue.
======================================================================
http://busybox.net/bugs/view.php?id=565
======================================================================
Reported By: ShaneAnderson
Assigned To: BusyBox
======================================================================
Project: BusyBox
Issue ID: 565
Category: Other
Reproducibility: always
Severity: minor
Priority: normal
Status: assigned
======================================================================
Date Submitted: 11-27-2005 13:00 PST
Last Modified: 11-28-2005 10:55 PST
======================================================================
Summary: 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 http://busybox.net/bugs/view.php?id=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...
======================================================================
----------------------------------------------------------------------
vapier - 11-27-05 22:46
----------------------------------------------------------------------
TARGET_ARCH is calculated by running `$(CC) -dumpmachine`
what does `arm-linux-gcc -dumpmachine` show ?
----------------------------------------------------------------------
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...
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
======================================================================
More information about the busybox-cvs
mailing list