Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/gnu Make this at least pretend to work when cross-compiling.



details:   https://anonhg.NetBSD.org/src/rev/2c50f5271b68
branches:  trunk
changeset: 484121:2c50f5271b68
user:      mycroft <mycroft%NetBSD.org@localhost>
date:      Sun Mar 26 09:54:28 2000 +0000

description:
Make this at least pretend to work when cross-compiling.

diffstat:

 gnu/dist/libio/gen-params         |  18 +++++++++---------
 gnu/lib/libstdc++/config/Makefile |  11 +++++++++--
 2 files changed, 18 insertions(+), 11 deletions(-)

diffs (85 lines):

diff -r 6ea711ee7f29 -r 2c50f5271b68 gnu/dist/libio/gen-params
--- a/gnu/dist/libio/gen-params Sun Mar 26 09:16:01 2000 +0000
+++ b/gnu/dist/libio/gen-params Sun Mar 26 09:54:28 2000 +0000
@@ -48,13 +48,13 @@
 rootdir=`pwd`/..
 gccdir=${gccdir-${rootdir}/gcc}
 binutilsdir=${binutilsdir-${rootdir}/binutils}
-CC=${CC-`if [ -f ${gccdir}/xgcc ] ; \
+CC="${CC-`if [ -f ${gccdir}/xgcc ] ; \
        then echo ${gccdir}/xgcc -B${gccdir}/ ; \
-       else echo cc ; fi`}
-CXX=${CXX-`if [ -f ${gccdir}/xgcc ] ; \
+       else echo cc ; fi`} ${CPPFLAGS}"
+CXX="${CXX-`if [ -f ${gccdir}/xgcc ] ; \
        then echo ${gccdir}/xgcc -B${gccdir}/ ; \
-       else echo gcc ; fi`}
-CPP=${CPP-`echo ${CC} -E`}
+       else echo gcc ; fi`} ${CPPFLAGS}"
+CPP="${CPP-`echo ${CC} -E`} ${CPPFLAGS}"
 CONFIG_NM=${CONFIG_NM-`if [ -f ${binutilsdir}/nm.new ] ; \
        then echo ${binutilsdir}/nm.new ; \
        else echo nm ; fi`}
@@ -190,7 +190,7 @@
 main () {}
 !EOF!
 
-if ${CC} dummy.c -lm 2>&1 >/dev/null | grep clog >/dev/null; then
+if ${CC} ${LDPRE} dummy.c -lm ${LDSUF} 2>&1 >/dev/null | grep clog >/dev/null; then
   echo "#define ${macro_prefix}CLOG_CONFLICT 1"
 fi
 
@@ -543,7 +543,7 @@
   atexit (0);
 }
 !EOF!
-  if ${CC} dummy.c >/dev/null 2>&1 ; then
+  if ${CC} ${LDPRE} dummy.c ${LDSUF} >/dev/null 2>&1 ; then
     echo "#define ${macro_prefix}HAVE_ATEXIT 1"
   else
     echo "#define ${macro_prefix}HAVE_ATEXIT 0"
@@ -570,7 +570,7 @@
   }
 !EOF!
   # Note: We link because some systems have sys/resource, but not getrusage().
-  if ${CC} dummy.c >/dev/null 2>&1 ; then
+  if ${CC} ${LDPRE} dummy.c ${LDSUF} >/dev/null 2>&1 ; then
     echo "#define ${macro_prefix}HAVE_SYS_RESOURCE 1"
   else
     echo "#define ${macro_prefix}HAVE_SYS_RESOURCE 0"
@@ -711,7 +711,7 @@
 }
 EOF
 
-if ${CC} dummy.c >/dev/null 2>&1 ; then
+if ${CC} ${LDPRE} dummy.c ${LDSUF} >/dev/null 2>&1 ; then
   echo "#define ${macro_prefix}HAVE_PRINTF_FP 1"
   echo "#define ${macro_prefix}HAVE_LONG_DOUBLE_IO 1"
 else
diff -r 6ea711ee7f29 -r 2c50f5271b68 gnu/lib/libstdc++/config/Makefile
--- a/gnu/lib/libstdc++/config/Makefile Sun Mar 26 09:16:01 2000 +0000
+++ b/gnu/lib/libstdc++/config/Makefile Sun Mar 26 09:54:28 2000 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.3 1999/02/13 23:53:57 lukem Exp $
+#      $NetBSD: Makefile,v 1.4 2000/03/26 09:54:28 mycroft Exp $
 
 # Makefile for _G_config.h, a machine-dependent automatically generated
 # configuration file.
@@ -9,9 +9,16 @@
 CLEANFILES=    dummy.c dummy.h dummy.C _G_config.h
 DIST=          ${.CURDIR}/../../../dist
 
+.ifdef DESTDIR
+LDPRE= -nostdlib -L${DESTDIR}/usr/lib -R${DESTDIR}/usr/lib ${LIBCRT0} \
+       ${LIBCRTBEGIN}
+LDSUF= -lgcc -lc -lgcc ${LIBCRTEND}
+.endif
+
 _G_config.h: Makefile ${DIST}/libio/gen-params
        rootme=${.OBJDIR} CC="${CC}" CXX="${CXX}" CONFIG_NM="${NM}" \
-           CPP="${CC} -E -nostdinc -idirafter ${DESTDIR}/usr/include" \
+           CPP="${CC} -E" CPPFLAGS="${CPPFLAGS}" LDPRE="${LDPRE}" \
+           LDSUF="${LDSUF}" \
            /bin/sh ${DIST}/libio/gen-params LIB_VERSION=2.9.0 >$@
 
 all: ${DPSRCS}



Home | Main Index | Thread Index | Old Index