This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Forcing gnu toolchain configure to build cross-compiler?


I tried running my script to build an x86 compiler
on my x86 system, and ran into all sorts of trouble
because I didn't have a good way to tell gcc and glibc's
configure scripts that I wanted to build a cross-compiler
even though host == target.  In other words, that I didn't
want the configure scripts to look at my /usr/include or /usr/lib,
and pull in stuff that it shouldn't.
Anyone know a good recipe to force that?

Ideally you could just add --is-cross to the configure line.  I've tried
setting  ac_cv_prog_cc_cross=yes when configuring glibc, and doing
kludgy things like the following, but that didn't quite do it.
Guess I'll have to really go through those configure scripts
and look at all the places it thinks about whether it's a cross
build.
- Dan

--- gcc-3.3/configure.in.old    2003-05-30 12:01:52.000000000 -0700
+++ gcc-3.3/configure.in        2003-05-30 12:05:03.000000000 -0700
@@ -111,6 +111,8 @@
   is_cross_compiler=yes
 fi

+is_cross_compiler=yes
+
 # We always want to use the same name for this directory, so that dejagnu
 # can reliably find it.
 target_subdir=${target_alias}
--- gcc-3.3/gcc/configure.in.old        2003-05-30 16:09:53.000000000 -0700
+++ gcc-3.3/gcc/configure.in    2003-05-30 16:12:40.000000000 -0700
@@ -1186,7 +1186,8 @@
 CROSS=                                         AC_SUBST(CROSS)
 ALL=all.internal                               AC_SUBST(ALL)
 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'        AC_SUBST(SYSTEM_HEADER_DIR)
-if test x$host != x$target
+#if test x$host != x$target
+if /bin/true
 then
        CROSS="-DCROSS_COMPILE"
        ALL=all.cross


-- Dan Kegel http://www.kegel.com http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045


------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]