2000-09-12 Kazu Hirata <kazu@hxi.com>
[deliverable/binutils-gdb.git] / configure.in
index e270f3ad1942ead1e0cee7a3764d0e4b25e00f53..8daa3f3bd93136cb8afa007aa864b3a8b2240bbd 100644 (file)
@@ -51,7 +51,7 @@ fi
 if [ "${enable_libstdcxx_v3}" = "yes" ] && test -d $srcdir/libstdc++-v3; then
         libstdcxx_version="target-libstdc++-v3"
        # Don't use libstdc++-v3's flags to configure/build itself.
-       libstdcxx_flags='`test "x$$dir" != xlibstdc++-v3 && test -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/mkcheck && $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/mkcheck 2 $$r/$(TARGET_SUBDIR)/libstdc++-v3 $$s/libstdc++-v3 | sed -e "s/-I/-isystem /g"` -L$$r/$(TARGET_SUBDIR)/libstd++-v3/src -L$$r/$(TARGET_SUBDIR)/libstd++-v3/src/.libs'
+       libstdcxx_flags='`case $$dir in libstdc++-v3) ;; *) cat $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/libstdc++.INC 2>/dev/null || : ;; esac` -L$$r/$(TARGET_SUBDIR)/libstd++-v3/src -L$$r/$(TARGET_SUBDIR)/libstd++-v3/src/.libs'
 else
         libstdcxx_version="target-libio target-libstdc++"
         libstdcxx_flags='-isystem $$s/libstdc++ -isystem $$s/libstdc++/std -isystem $$s/libstdc++/stl -isystem $$s/libio/ -isystem $$s/libio/stdio -L$$r/$(TARGET_SUBDIR)/libstdc++'
@@ -60,7 +60,7 @@ fi
 # these tools are built for the host environment
 # Note, the powerpc-eabi build depends on sim occurring before gdb in order to
 # know that we are building the simulator.
-host_tools="texinfo byacc flex bison binutils ld gas gcc sim gdb make patch prms send-pr gprof gdbtest tgas etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool ispell grep diff rcs cvssrc fileutils shellutils time textutils wdiff find emacs emacs19 uudecode hello tar gzip indent recode release sed utils guile perl apache inet gawk findutils snavigator libtool gettext zip"
+host_tools="texinfo byacc flex bison binutils ld gas gcc cgen sim gdb make patch prms send-pr gprof gdbtest tgas etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool ispell grep diff rcs cvssrc fileutils shellutils time textutils wdiff find emacs emacs19 uudecode hello tar gzip indent recode release sed utils guile perl apache inet gawk findutils snavigator libtool gettext zip"
 
 # these libraries are built for the target environment, and are built after
 # the host libraries and the host tools (which may be a cross compiler)
@@ -916,6 +916,11 @@ case "${noconfigdirs}" in
   *target-newlib*) noconfigdirs="$noconfigdirs target-libgloss" ;;
 esac
 
+# Only configure cgen if --enable-cgen-maint.
+if [ "x$enable_cgen_maint" != xyes ] ; then
+    noconfigdirs="$noconfigdirs cgen"
+fi
+
 # Make sure we don't let GNU ld be added if we didn't want it.
 if [ x$with_gnu_ld = xno ]; then
   use_gnu_ld=no
@@ -1220,15 +1225,6 @@ else
 fi
 
 FLAGS_FOR_TARGET=
-if test -d ${topsrcdir}/gcc; then
-  # Directories specified with -B are searched for libraries after those
-  # specified with -L, but for headers (in sub-directory `include')
-  # before those specified with -I and -isystem.  Fortunately, we don't
-  # expect include directories to exist in build_tooldir/{bin,lib} (see
-  # below), and we want gcc/include to be searched first.
-  FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/gcc/'
-fi
-
 case " $skipdirs " in
 *" target-newlib "*) ;;
 *)
@@ -1237,11 +1233,27 @@ case " $skipdirs " in
      FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/winsup -L$$r/$(TARGET_SUBDIR)/winsup/cygwin -L$$r/$(TARGET_SUBDIR)/winsup/w32api/lib -isystem $$s/winsup/include -isystem $$s/winsup/cygwin/include -isystem $$s/winsup/w32api/include -isystem $$s/newlib/libc/sys/cygwin -isystem $$s/newlib/libc/sys/cygwin32' ;;
    esac
 
-   # If we're using a pre-built compiler (which is the case for
-   # Canadian crosses or when gcc isn't being built), don't discard
-   # standard headers.
-   if test "${build}" = "${host}" && test ! -d ${topsrcdir}/gcc; then
+   # If we're not building GCC, don't discard standard headers.
+   if test -d ${topsrcdir}/gcc; then
      FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -nostdinc'
+
+     if test "${build}" != "${host}"; then
+       # On Canadian crosses, CC_FOR_TARGET will have already been set
+       # by `configure', so we won't have an opportunity to add -Bgcc/
+       # to it.  This is right: we don't want to search that directory
+       # for binaries, but we want the header files in there, so add
+       # them explicitly.
+       FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/gcc/include'
+
+       # Someone might think of using the pre-installed headers on
+       # Canadian crosses, in case the installed compiler is not fully
+       # compatible with the compiler being built.  In this case, it
+       # would be better to flag an error than risking having
+       # incompatible object files being constructed.  We can't
+       # guarantee that an error will be flagged, but let's hope the
+       # compiler will do it, when presented with incompatible header
+       # files.
+     fi
    fi
 
    # If we're building newlib, use its generic headers last, but search
@@ -1270,7 +1282,7 @@ fi
 if test "x${CC_FOR_TARGET+set}" = xset; then
   :
 elif test -d ${topsrcdir}/gcc; then
-  CC_FOR_TARGET='$$r/gcc/xgcc'
+  CC_FOR_TARGET='$$r/gcc/xgcc -B$$r/gcc/'
 elif test "$host" = "$target"; then
   CC_FOR_TARGET='$(CC)'
 else
@@ -1285,10 +1297,8 @@ esac
 
 if test "x${CHILL_FOR_TARGET+set}" = xset; then
   :
-elif test -d ${topsrcdir}/gcc &&
-   echo ",${enable_languages-`echo ${LANGUAGES-CHILL} | tr ' ' ','`}," |
-   grep ',CHILL,' > /dev/null ; then
-  CHILL_FOR_TARGET='$$r/gcc/xgcc -L$$r/gcc/ch/runtime/'
+elif test -d ${topsrcdir}/gcc; then
+  CHILL_FOR_TARGET='$$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/'
 elif test "$host" = "$target"; then
   CHILL_FOR_TARGET='$(CC)'
 else
@@ -1301,10 +1311,8 @@ esac
 
 if test "x${CXX_FOR_TARGET+set}" = xset; then
   :
-elif test -d ${topsrcdir}/gcc &&
-   echo ",${enable_languages-`echo ${LANGUAGES-c++} | tr ' ' ','`}," |
-   grep ',c[+][+],' > /dev/null ; then
-  CXX_FOR_TARGET='$$r/gcc/g++ -nostdinc++ '$libstdcxx_flags
+elif test -d ${topsrcdir}/gcc; then
+  CXX_FOR_TARGET='$$r/gcc/g++ -B$$r/gcc/ -nostdinc++ '$libstdcxx_flags
 elif test "$host" = "$target"; then
   CXX_FOR_TARGET='$(CXX)'
 else
This page took 0.025109 seconds and 4 git commands to generate.