This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Top-level configure.in patch to support building newlib natively onlinux


This patch seems to have been lost in a gcc -> sources.redhat.com merge.
See http://gcc.gnu.org/ml/gcc-patches/2002-03/msg01171.html for the
original message.

I've modified the original patch slightly, to remove the requirement
that the platform vendor be "pc".

This patch has been approved and committed to sources.redhat.com by the
newlib maintainers.  It is posted here to prevent divergence of the gcc
and s.r.c top-level configure.in's.

Tom

2002-03-19  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* configure.in (noconfigdirs): Do not add target-newlib if
	target == i[3456]86-*-linux*, and host == target.

Index: configure.in
===================================================================
RCS file: /cvsroot/gcc/gcc/configure.in,v
retrieving revision 1.140
diff -c -3 -p -r1.140 configure.in
*** configure.in	30 Apr 2002 03:30:19 -0000	1.140
--- configure.in	1 May 2002 20:52:53 -0000
*************** case "${target}" in
*** 806,811 ****
--- 806,825 ----
      # linux has rx in libc
      skipdirs="$skipdirs target-librx"
      ;;
+   i[3456]86-*-linux*)
+     # This section makes it possible to build newlib natively on linux.
+     # If we are using a cross compiler then don't configure newlib.
+     if [ x${is_cross_compiler} != xno ] ; then
+          noconfigdirs="$noconfigdirs target-newlib"
+     fi
+     noconfigdirs="$noconfigdirs target-libgloss"
+     # If we are not using a cross compiler, do configure newlib.
+     # Note however, that newlib will only be configured in this situation
+     # if the --with-newlib option has been given, because otherwise
+     # 'target-newlib' will appear in skipdirs.
+     # linux has rx in libc
+     skipdirs="$skipdirs target-librx"
+     ;;
    *-*-linux*)
      noconfigdirs="$noconfigdirs target-newlib target-libgloss"
      # linux has rx in libc
*************** case " $skipdirs " in
*** 1506,1512 ****
     fi
  
     case "${target}-${is_cross_compiler}" in
!    i[3456]86-pc-linux*-no)
        # Here host == target, so we don't need to build gcc,
        # so we don't want to discard standard headers.
        FLAGS_FOR_TARGET=`echo " $FLAGS_FOR_TARGET " | sed -e 's/ -nostdinc / /'`
--- 1520,1526 ----
     fi
  
     case "${target}-${is_cross_compiler}" in
!    i[3456]86-*-linux*-no)
        # Here host == target, so we don't need to build gcc,
        # so we don't want to discard standard headers.
        FLAGS_FOR_TARGET=`echo " $FLAGS_FOR_TARGET " | sed -e 's/ -nostdinc / /'`


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]