This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
fix for building cross targets
- To: gcc-patches at gcc dot gnu dot org
- Subject: fix for building cross targets
- From: Geoffrey Keating <geoffk at thief dot cygnus dot com>
- Date: Thu, 8 Feb 2001 23:14:31 -0800
Some cross targets don't build a GCC that works without special
options, and during a combined-tree build it's unusual for a cross-gcc
to work at all until it is installed. This patch suppresses those
parts of the libf2c and libobjc configure scripts that try to check
for a working compiler. Similar code is already in libstdc++ and
libjava.
Tested building powerpc-eabisim as a combined tree. It now works
out-of-the-box.
--
Geoff Keating <geoffk@redhat.com>
===File ~/patches/gcc-xcompile.patch========================
Index: libf2c/ChangeLog
2001-02-08 Geoffrey Keating <geoffk@redhat.com>
* configure.in: Don't run AC_PROG_CC_WORKS, because
we're not interested in the result and it might fail.
* libF77/configure.in: Likewise.
* libI77/configure.in: Likewise.
* libU77/configure.in: Likewise.
* configure: Regenerated.
* libF77/configure: Likewise.
* libI77/configure: Likewise.
* libU77/configure: Likewise.
Index: libobjc/ChangeLog
2001-02-08 Geoffrey Keating <geoffk@redhat.com>
* configure.in: Don't run AC_PROG_CC_WORKS or AC_EXEEXT, because
we're not interested in the result and they might fail.
* configure: Regenerated.
Index: libf2c/configure.in
===================================================================
RCS file: /cvs/gcc/egcs/libf2c/configure.in,v
retrieving revision 1.27
diff -p -u -p -r1.27 configure.in
--- configure.in 2000/05/18 17:44:27 1.27
+++ configure.in 2001/02/09 07:08:53
@@ -64,8 +64,14 @@ then
fi
dnl Checks for programs.
+
+dnl FIXME AC_PROG_CC wants CC to be able to link things, but it may
+dnl not be able to.
+define([AC_PROG_CC_WORKS],[])
+
# For g77 we'll set CC to point at the built gcc, but this will get it into
# the makefiles
+
AC_PROG_CC
dnl These should be inherited in the recursive make, but ensure they are
Index: libf2c/libF77/configure.in
===================================================================
RCS file: /cvs/gcc/egcs/libf2c/libF77/configure.in,v
retrieving revision 1.3
diff -p -u -p -r1.3 configure.in
--- configure.in 2000/03/12 19:20:47 1.3
+++ configure.in 2001/02/09 07:08:54
@@ -23,6 +23,11 @@ AC_PREREQ(2.12.1)
AC_INIT(getarg_.c)
dnl Checks for programs.
+
+dnl FIXME AC_PROG_CC wants CC to be able to link things, but it may
+dnl not be able to.
+define([AC_PROG_CC_WORKS],[])
+
# For g77 we'll set CC to point at the built gcc, but this will get it into
# the makefiles
AC_PROG_CC
Index: libf2c/libI77/configure.in
===================================================================
RCS file: /cvs/gcc/egcs/libf2c/libI77/configure.in,v
retrieving revision 1.3
diff -p -u -p -r1.3 configure.in
--- configure.in 2000/11/15 18:26:42 1.3
+++ configure.in 2001/02/09 07:08:54
@@ -23,6 +23,11 @@ AC_PREREQ(2.12.1)
AC_INIT(ftell_.c)
dnl Checks for programs.
+
+dnl FIXME AC_PROG_CC wants CC to be able to link things, but it may
+dnl not be able to.
+define([AC_PROG_CC_WORKS],[])
+
# For g77 we'll set CC to point at the built gcc, but this will get it into
# the makefiles
AC_PROG_CC
Index: libf2c/libU77/configure.in
===================================================================
RCS file: /cvs/gcc/egcs/libf2c/libU77/configure.in,v
retrieving revision 1.8
diff -p -u -p -r1.8 configure.in
--- configure.in 1999/10/12 08:39:35 1.8
+++ configure.in 2001/02/09 07:08:54
@@ -24,6 +24,11 @@ AC_INIT(access_.c)
AC_CONFIG_HEADER(config.h:config.hin)
dnl Checks for programs.
+
+dnl FIXME AC_PROG_CC wants CC to be able to link things, but it may
+dnl not be able to.
+define([AC_PROG_CC_WORKS],[])
+
# For g77 we'll set CC to point at the built gcc, but this will get it into
# the makefiles
AC_PROG_CC
Index: libobjc/configure.in
===================================================================
RCS file: /cvs/gcc/egcs/libobjc/configure.in,v
retrieving revision 1.13
diff -p -u -p -r1.13 configure.in
--- configure.in 2000/08/15 07:37:23 1.13
+++ configure.in 2001/02/09 07:08:54
@@ -65,6 +65,11 @@ then
fi
dnl Checks for programs.
+
+dnl FIXME AC_PROG_CC wants CC to be able to link things, but it may
+dnl not be able to.
+define([AC_PROG_CC_WORKS],[])
+
# For ObjC we'll set CC to point at the built gcc, but this will get it into
# the makefiles
AC_PROG_CC
@@ -77,6 +82,17 @@ else
AC_PROG_RANLIB
fi
AC_PROG_INSTALL
+
+# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
+# at least currently, we never actually build a program, so we never
+# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
+# fails, because we are probably configuring with a cross compiler
+# which cant create executables. So we include AC_EXEEXT to keep
+# automake happy, but we dont execute it, since we dont care about
+# the result.
+if false; then
+ AC_EXEEXT
+fi
dnl Checks for libraries.
============================================================