[uClibc] Cross compile toolchain
Earl Chew
earl_chew at agilent.com
Sat Oct 9 12:22:58 UTC 2004
I'm trying to build a powerpc toolchain hosted on cygwin.
The build failed with the message:
mv: `Tcollect2' and `collect2' are the same file
It took me a little while to figure out that the toolchain makefile
assumes a linux pc host, whereas I need to specify i686-pc-cygwin.
I'm surprised that the build got as far as it did!
On cygwin, gcc -dumpmachine yields the correct content (i686-pc-cygwin)
for the host compiler specification.
Would the following patch allow the GNU_HOST_NAME to be correctly
determined?
--- ../orig/gcc-3.3.x/Makefile 2004-08-06 10:00:27.000000000 -0700
+++ Makefile 2004-10-09 04:57:54.000000000 -0700
@@ -159,7 +159,8 @@
STRIP=$(TARGET_CROSS)strip --remove-section=.comment
--remove-section=.note
-HOST_ARCH:=$(shell $(HOSTCC) -dumpmachine | sed -e s'/-.*//' \
+GNU_HOST_NAME:=$(shell $(HOSTCC) -dumpmachine)
+HOST_ARCH:=$(shell echo $(GNU_HOST_NAME) | sed -e s'/-.*//' \
-e 's/sparc.*/sparc/' \
-e 's/arm.*/arm/g' \
-e 's/m68k.*/m68k/' \
@@ -171,7 +172,6 @@
-e 's/cris.*/cris/' \
-e 's/i[3-9]86/i386/' \
)
-GNU_HOST_NAME:=$(HOST_ARCH)-pc-linux-gnu
TARGET_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \
AR=$(TARGET_CROSS)ar \
AS=$(TARGET_CROSS)as \
Earl
More information about the uClibc
mailing list