Patches from Geoffrey Noer <noer@cygnus.com>:
authorIan Lance Taylor <ian@airs.com>
Tue, 8 Oct 1996 14:41:43 +0000 (14:41 +0000)
committerIan Lance Taylor <ian@airs.com>
Tue, 8 Oct 1996 14:41:43 +0000 (14:41 +0000)
* 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
Makefile.in
configure.in

index 55497d897caf01786ed100cdb068a22829ce5ca6..90555db8fce8877778b7219aefb5e3d120e7db16 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Tue Oct  8 10:39:08 1996  Ian Lance Taylor  <ian@cygnus.com>
+
+       Patches from Geoffrey Noer <noer@cygnus.com>:
+       * 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  <ian@cygnus.com>
 
        * Makefile.in (ETC_SUPPORT): Add configure.
index 06d6de26428d25734285b41e81a493a2d928d016..2b47d351734b34efca62e05fb85e38539b74d0fd 100644 (file)
@@ -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; \
index 1ef9239649ed337fcf572d6d8cb79fcf1fc809ac..ccbb8bbffcf556fcc0a19532ff062ca5a954ccab 100644 (file)
@@ -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 ;;