From d5a8bfde90285188640879d2791ada8976e0c12c Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 8 Oct 1996 14:41:43 +0000 Subject: [PATCH] Patches from Geoffrey Noer : * configure.in: If configuring for newlib, pass --with-newlib to subdirectories. * Makefile.in (CC_FOR_TARGET): If winsup/Makefile exists, pass a -Bnewlib/ and -Lwinsup to gcc. (CXX_FOR_TARGET): Likewise. --- ChangeLog | 9 +++++++++ Makefile.in | 12 ++++++++++-- configure.in | 8 ++++++++ 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 55497d897ca..90555db8fce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Tue Oct 8 10:39:08 1996 Ian Lance Taylor + + Patches from Geoffrey Noer : + * configure.in: If configuring for newlib, pass --with-newlib to + subdirectories. + * Makefile.in (CC_FOR_TARGET): If winsup/Makefile exists, pass a + -Bnewlib/ and -Lwinsup to gcc. + (CXX_FOR_TARGET): Likewise. + Mon Oct 7 10:59:35 1996 Ian Lance Taylor * Makefile.in (ETC_SUPPORT): Add configure. diff --git a/Makefile.in b/Makefile.in index 06d6de26428..2b47d351734 100644 --- a/Makefile.in +++ b/Makefile.in @@ -172,7 +172,11 @@ INSTALL_TARGET = install-dirs \ CC_FOR_TARGET = ` \ if [ -f $$r/gcc/Makefile ] ; then \ if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \ - echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $${srcroot}/newlib/libc/include -nostdinc; \ + if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \ + echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/newlib/ -L$$r/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $${srcroot}/newlib/libc/include -nostdinc; \ + else \ + echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $${srcroot}/newlib/libc/include -nostdinc; \ + fi; \ else \ echo $$r/gcc/xgcc -B$$r/gcc/; \ fi; \ @@ -201,7 +205,11 @@ CHILL_FOR_TARGET = ` \ CXX_FOR_TARGET = ` \ if [ -f $$r/gcc/Makefile ] ; then \ if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \ - echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $${srcroot}/newlib/libc/include -nostdinc; \ + if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \ + echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/newlib/ -L$$r/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $${srcroot}/newlib/libc/include -nostdinc; \ + else \ + echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $${srcroot}/newlib/libc/include -nostdinc; \ + fi; \ else \ echo $$r/gcc/xgcc -B$$r/gcc/; \ fi; \ diff --git a/configure.in b/configure.in index 1ef9239649e..ccbb8bbffcf 100644 --- a/configure.in +++ b/configure.in @@ -747,6 +747,14 @@ if [ x${use_gnu_ld} = x ] ; then fi fi +# If using newlib, add --with-newlib to the withoptions so that gcc/configure +# can detect this case. + +if [ x${with_newlib} != xno ] && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 && [ -d ${srcdir}/newlib ] ; then + with_newlib=yes + withoptions="$withoptions --with-newlib" +fi + if [ x${shared} = xyes ]; then case "${target}" in hppa*) target_makefile_frag=config/mt-papic ;; -- 2.30.2