This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
building a cross libf2c
- To: egcs at cygnus dot com
- Subject: building a cross libf2c
- From: Richard Earnshaw <rearnsha at arm dot com>
- Date: Fri, 26 Jun 1998 14:02:03 +0100
- Cc: richard dot earnshaw at arm dot com
- Cc: burley at gnu dot org
- Organization: Advanced RISC Machines Ltd.
- Reply-To: richard dot earnshaw at arm dot com
The following patch (or something like it) is needed to allow
cross-building of libf2c to succeed, since the "libraries" subdir doesn't
exist for a cross build.
<date> Richard Earnshaw (rearnsha@arm.com)
* Makefile.in (BASE_FLAGS_TO_PASS): Pass TARGET_SUBDIR to submakes.
* libf2c/Makefile.in (TARGET_SUBDIR): Provide default definition.
(FLAGS_TO_PASS): Use TARGET_SUBDIR in definition of G2C_H_DIR.
Index: Makefile.in
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/Makefile.in,v
retrieving revision 1.25
diff -p -r1.25 Makefile.in
*** Makefile.in 1998/06/19 05:42:13 1.25
--- Makefile.in 1998/06/26 12:49:38
*************** BASE_FLAGS_TO_PASS = \
*** 352,357 ****
--- 352,358 ----
"EXPECT=$(EXPECT)" \
"RUNTEST=$(RUNTEST)" \
"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
+ "TARGET_SUBDIR=$(TARGET_SUBDIR)" \
"WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
"YACC=$(YACC)" \
"exec_prefix=$(exec_prefix)" \
Index: libf2c/Makefile.in
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/libf2c/Makefile.in,v
retrieving revision 1.9
diff -p -r1.9 Makefile.in
*** Makefile.in 1998/06/24 06:16:17 1.9
--- Makefile.in 1998/06/26 12:49:38
*************** CC = gcc
*** 58,63 ****
--- 58,66 ----
CFLAGS = -g
LIBCFLAGS = $(CFLAGS)
+ # This is correct for a native build, but will be overridden for a cross build
+ TARGET_SUBDIR = libraries
+
# List of variables to pass to sub-makes. This should not be needed'
# by GNU make or Sun make (both of which pass command-line variable'
# overrides thouh $(MAKE)) but may be needed by older versions.'
*************** FLAGS_TO_PASS= \
*** 66,72 ****
"CC=$(CC)" \
"CFLAGS=$(CFLAGS)" \
"F2C_H_DIR=$(s)/libf2c" \
! "G2C_H_DIR=$(r)/libraries/libf2c" \
"GCC_H_DIR=$(s)/include" \
"LIBCFLAGS=$(LIBCFLAGS)" \
"PICFLAG=$(PICFLAG)" \
--- 69,75 ----
"CC=$(CC)" \
"CFLAGS=$(CFLAGS)" \
"F2C_H_DIR=$(s)/libf2c" \
! "G2C_H_DIR=$(r)/$(TARGET_SUBDIR)/libf2c" \
"GCC_H_DIR=$(s)/include" \
"LIBCFLAGS=$(LIBCFLAGS)" \
"PICFLAG=$(PICFLAG)" \