diff options
author | DJ Delorie <dj@redhat.com> | 2000-08-02 18:56:20 +0000 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2000-08-02 18:56:20 +0000 |
commit | 63266560e98843b391a571290bc6d5dfb788d0f5 (patch) | |
tree | 2f5f02272123a2dea2272d2caefce5a06b21c59b | |
parent | 8a902701255a16c49f7f893ebbdae91275ef9512 (diff) | |
download | gdb-63266560e98843b391a571290bc6d5dfb788d0f5.zip gdb-63266560e98843b391a571290bc6d5dfb788d0f5.tar.gz gdb-63266560e98843b391a571290bc6d5dfb788d0f5.tar.bz2 |
2000-08-01 Alexandre Oliva <aoliva@redhat.com>
* configure.in (qCXX_FOR_TARGET): Use echo instead of expr.
2000-07-31 Alexandre Oliva <aoliva@redhat.com>
* configure.in (qCXX_FOR_TARGET): Quote `&' characters in
CXX_FOR_TARGET for sed.
2000-07-30 Alexandre Oliva <aoliva@redhat.com>
* configure.in (CC_FOR_TARGET, CHILL_FOR_TARGET, CXX_FOR_TARGET):
Do not override if already set in the environment or in configure.
Don't duplicate $(FLAGS_FOR_TARGET) if it already appears in them.
(FLAGS_FOR_TARGET): Don't use host directories on Canadian crosses.
-rw-r--r-- | ChangeLog | 16 | ||||
-rw-r--r-- | configure.in | 55 |
2 files changed, 61 insertions, 10 deletions
@@ -1,3 +1,19 @@ +2000-08-01 Alexandre Oliva <aoliva@redhat.com> + + * configure.in (qCXX_FOR_TARGET): Use echo instead of expr. + +2000-07-31 Alexandre Oliva <aoliva@redhat.com> + + * configure.in (qCXX_FOR_TARGET): Quote `&' characters in + CXX_FOR_TARGET for sed. + +2000-07-30 Alexandre Oliva <aoliva@redhat.com> + + * configure.in (CC_FOR_TARGET, CHILL_FOR_TARGET, CXX_FOR_TARGET): + Do not override if already set in the environment or in configure. + Don't duplicate $(FLAGS_FOR_TARGET) if it already appears in them. + (FLAGS_FOR_TARGET): Don't use host directories on Canadian crosses. + 2000-07-27 Alexandre Oliva <aoliva@redhat.com> * Makefile.in (FLAGS_FOR_TARGET): New macro. diff --git a/configure.in b/configure.in index 66d495f..98ccdcc 100644 --- a/configure.in +++ b/configure.in @@ -1068,6 +1068,9 @@ if [ x${shared} = xyes ]; then i[3456]86-*) target_makefile_frag="${target_makefile_frag} config/mt-x86pic" ;; + ia64-*) + target_makefile_frag="${target_makefile_frag} config/mt-ia64pic" + ;; powerpc*-*-aix*) # We don't want -fPIC on AIX. ;; @@ -1225,24 +1228,38 @@ if test -d ${topsrcdir}/gcc; then # 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 "*) ;; *) case "$target" in - i[3456]86-*-cygwin*) + *-cygwin*) 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 + FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -nostdinc' + fi + # If we're building newlib, use its generic headers last, but search # for any libc-related directories first (so make it the last -B # switch). - FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -nostdinc -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include' + FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include' ;; esac -if test -d ${topsrcdir}/gcc; then + +# On Canadian crosses, we'll be searching the right directories for +# the previously-installed cross compiler, so don't bother to add +# flags for directories within the install tree of the compiler +# being built; programs in there won't even run. +if test "${build}" = "${host}" && test -d ${topsrcdir}/gcc; then # Search for pre-installed headers if nothing else fits. FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include' fi + if test "x${use_gnu_ld}" = x && test "x${with_gnu_ld}" != xno && echo " ${configdirs} " | grep " ld " > /dev/null && test -d ${srcdir}/ld; then @@ -1250,16 +1267,25 @@ if test "x${use_gnu_ld}" = x && test "x${with_gnu_ld}" != xno && FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/ld' fi -if test -d ${topsrcdir}/gcc; then +if test "x${CC_FOR_TARGET+set}" = xset; then + : +elif test -d ${topsrcdir}/gcc; then CC_FOR_TARGET='$$r/gcc/xgcc' elif test "$host" = "$target"; then CC_FOR_TARGET='$(CC)' else CC_FOR_TARGET=`echo gcc | sed -e 's/x/x/' ${program_transform_name}` fi -CC_FOR_TARGET=$CC_FOR_TARGET' $(FLAGS_FOR_TARGET)' +# On Canadian crosses, configure reads CC_FOR_TARGET from Makefile, +# if Makefile exists. Prevent $(FLAGS_FOR_TARGET) from being duplicated. +case $CC_FOR_TARGET in +*' $(FLAGS_FOR_TARGET)') ;; +*) CC_FOR_TARGET=$CC_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;; +esac -if test -d ${topsrcdir}/gcc && +if test "x${CHILL_FOR_TARGET+set}" = xset; then + : +elif test -d ${topsrcdir}/gcc && echo ",${enable_languages-${LANGUAGES-CHILL}}," | grep ,CHILL, > /dev/null ; then CHILL_FOR_TARGET='$$r/gcc/xgcc -L$$r/gcc/ch/runtime/' @@ -1268,9 +1294,14 @@ elif test "$host" = "$target"; then else CHILL_FOR_TARGET=`echo gcc | sed -e 's/x/x/' ${program_transform_name}` fi -CHILL_FOR_TARGET=$CHILL_FOR_TARGET' $(FLAGS_FOR_TARGET)' +case $CHILL_FOR_TARGET in +*' $(FLAGS_FOR_TARGET)') ;; +*) CHILL_FOR_TARGET=$CHILL_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;; +esac -if test -d ${topsrcdir}/gcc && +if test "x${CXX_FOR_TARGET+set}" = xset; then + : +elif test -d ${topsrcdir}/gcc && echo ",${enable_languages-${LANGUAGES-c++}}," | grep ',c[+][+],' > /dev/null ; then CXX_FOR_TARGET='$$r/gcc/g++ -nostdinc++ '$libstdcxx_flags @@ -1279,7 +1310,11 @@ elif test "$host" = "$target"; then else CXX_FOR_TARGET=`echo c++ | sed -e 's/x/x/' ${program_transform_name}` fi -CXX_FOR_TARGET=$CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)' +case $CXX_FOR_TARGET in +*' $(FLAGS_FOR_TARGET)') ;; +*) CXX_FOR_TARGET=$CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;; +esac +qCXX_FOR_TARGET=`echo "$CXX_FOR_TARGET" | sed 's,&,\\\&,g'` targargs="--cache-file=../config.cache --host=${target_alias} --build=${build_alias} ${targargs}" sed -e "s:^TARGET_CONFIGDIRS[ ]*=.*$:TARGET_CONFIGDIRS = ${target_configdirs}:" \ @@ -1287,7 +1322,7 @@ sed -e "s:^TARGET_CONFIGDIRS[ ]*=.*$:TARGET_CONFIGDIRS = ${target_configdirs}:" -e "s%^FLAGS_FOR_TARGET[ ]*=.*$%FLAGS_FOR_TARGET = ${FLAGS_FOR_TARGET}%" \ -e "s%^CC_FOR_TARGET[ ]*=.*$%CC_FOR_TARGET = ${CC_FOR_TARGET}%" \ -e "s%^CHILL_FOR_TARGET[ ]*=.*$%CHILL_FOR_TARGET = ${CHILL_FOR_TARGET}%" \ - -e "s%^CXX_FOR_TARGET[ ]*=.*$%CXX_FOR_TARGET = ${CXX_FOR_TARGET}%" \ + -e "s%^CXX_FOR_TARGET[ ]*=.*$%CXX_FOR_TARGET = ${qCXX_FOR_TARGET}%" \ -e "s%^TARGET_SUBDIR[ ]*=.*$%TARGET_SUBDIR = ${target_subdir}%" \ -e "s%^gxx_include_dir[ ]*=.*$%gxx_include_dir=${gxx_include_dir}%" \ Makefile > Makefile.tem |