This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[RFA:] Enable libf2c build for cross with nothing installed.
- To: <gcc-patches at gcc dot gnu dot org>
- Subject: [RFA:] Enable libf2c build for cross with nothing installed.
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- Date: Sat, 20 Oct 2001 06:00:22 -0400 (EDT)
Most simulator targets fail a clean build ever since the libtool
changes to libf2c, because now libf2c configury wants to find
out whether there is an executable suffix on linked programs,
and when the toolchain isn't installed, it will not find crt0.o
if it's elsewhere than newlib (e.g. in libgloss). This is true
for powerpc-eabisim too, so I guess the autotester defaults to
some installed version. When building you'd see this (for
mn10300-elf):
...
Configuring in mn10300-elf/libf2c
loading cache ../config.cache
...
checking how to recognise dependant libraries... (cached) unknown
checking for object suffix... (cached) o
checking for executable suffix... configure: error: installation or configuration problem: compiler cannot create executables.
make[1]: *** [configure-target-libf2c] Error 1
Now, AFAICT no program is supposed to be actually linked in
libf2c, so the test seems useless. It seems libobjc has
suffered from the same problem; I copied its solution below
without changes. Now libf2c can be configured for a
cross-target with no installed toolchain again.
Bootstrapped and tested on i686-pc-linux-gnu. Tests now build
on cross of above to: i960-unknown-coff (with
--enable-languages=c++,f77,java), mn10300-unknown-elf and
powerpc-unknown-eabisim (others didn't fail for this reason).
Ok to commit?
libf2c:
* configure.in: Fake AC_EXEEXT invocation.
* configure: Regenerate.
Index: configure.in
===================================================================
RCS file: /cvs/gcc/egcs/libf2c/configure.in,v
retrieving revision 1.29
diff -p -c -r1.29 configure.in
*** configure.in 2001/09/30 22:06:22 1.29
--- configure.in 2001/10/20 09:45:45
*************** dnl FIXME AC_PROG_CC wants CC to be able
*** 69,74 ****
--- 69,89 ----
dnl not be able to.
define([AC_PROG_CC_WORKS],[])
+ # 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
+ # autoconf 2.50 runs AC_EXEEXT by default, and the macro expands
+ # to nothing, so nothing would remain between `then' and `fi' if it
+ # were not for the `:' below.
+ :
+ AC_EXEEXT
+ fi
+
# For g77 we'll set CC to point at the built gcc, but this will get it into
# the makefiles
brgds, H-P