aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure151
1 files changed, 130 insertions, 21 deletions
diff --git a/configure b/configure
index 036142a..ccec3f2 100755
--- a/configure
+++ b/configure
@@ -653,6 +653,7 @@ RANLIB_FOR_BUILD
NM_FOR_BUILD
LD_FOR_BUILD
LDFLAGS_FOR_BUILD
+GNATMAKE_FOR_BUILD
GDC_FOR_BUILD
GOC_FOR_BUILD
GFORTRAN_FOR_BUILD
@@ -730,6 +731,7 @@ CPPFLAGS
LDFLAGS
CFLAGS
CC
+cpu_type
target_subdir
host_subdir
build_subdir
@@ -3395,6 +3397,13 @@ case "${target}" in
;;
esac
+cpu_type=`echo ${host} | sed 's/-.*$//'`
+# Special case cpu_type for x86_64 as it shares AUTO_PROFILE from i386.
+if test "${cpu_type}" = "x86_64" ; then
+ cpu_type="i386"
+fi
+
+
# Disable libssp for some systems.
case "${target}" in
avr-*-*)
@@ -3571,31 +3580,28 @@ case ,${enable_languages}, in
*,cobol,*)
case ,${enable_languages}, in
*,c++,*)
- ;;
+ ;;
*)
# We have an explicit cobol, but no c++. We need c++, because cobol
# requires libstdc++
enable_languages="$enable_languages,c++"
- ;;
+ ;;
esac
;;
*)
case "${target}" in
- *-*-darwin*)
- unsupported_languages="$unsupported_languages cobol"
- ;;
- x86_64-*-*|aarch64-*-*)
+ aarch64-*-linux*|x86_64-*-linux*)
;;
*-*-*)
- unsupported_languages="$unsupported_languages cobol"
- ;;
+ unsupported_languages="$unsupported_languages cobol"
+ ;;
esac
case "${host}" in
- x86_64-*-*|aarch64-*-*)
+ aarch64-*-linux*|x86_64-*-linux*)
;;
*-*-*)
- unsupported_languages="$unsupported_languages cobol"
- ;;
+ unsupported_languages="$unsupported_languages cobol"
+ ;;
esac
;;
esac
@@ -4248,11 +4254,12 @@ if test "${build}" != "${host}" ; then
CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
CPP_FOR_BUILD="${CPP_FOR_BUILD-\$(CC_FOR_BUILD) -E}"
CXX_FOR_BUILD=${CXX_FOR_BUILD-g++}
+ DLLTOOL_FOR_BUILD=${DLLTOOL_FOR_BUILD-dlltool}
DSYMUTIL_FOR_BUILD=${DSYMUTIL_FOR_BUILD-dsymutil}
GFORTRAN_FOR_BUILD=${GFORTRAN_FOR_BUILD-gfortran}
GOC_FOR_BUILD=${GOC_FOR_BUILD-gccgo}
GDC_FOR_BUILD=${GDC_FOR_BUILD-gdc}
- DLLTOOL_FOR_BUILD=${DLLTOOL_FOR_BUILD-dlltool}
+ GNATMAKE_FOR_BUILD=${GNATMAKE_FOR_BUILD-gnatmake}
LD_FOR_BUILD=${LD_FOR_BUILD-ld}
NM_FOR_BUILD=${NM_FOR_BUILD-nm}
RANLIB_FOR_BUILD=${RANLIB_FOR_BUILD-ranlib}
@@ -4263,11 +4270,12 @@ else
AS_FOR_BUILD="\$(AS)"
CC_FOR_BUILD="\$(CC)"
CXX_FOR_BUILD="\$(CXX)"
+ DLLTOOL_FOR_BUILD="\$(DLLTOOL)"
DSYMUTIL_FOR_BUILD="\$(DSYMUTIL)"
GFORTRAN_FOR_BUILD="\$(GFORTRAN)"
GOC_FOR_BUILD="\$(GOC)"
GDC_FOR_BUILD="\$(GDC)"
- DLLTOOL_FOR_BUILD="\$(DLLTOOL)"
+ GNATMAKE_FOR_BUILD="\$(GNATMAKE)"
LD_FOR_BUILD="\$(LD)"
NM_FOR_BUILD="\$(NM)"
RANLIB_FOR_BUILD="\$(RANLIB)"
@@ -11598,13 +11606,17 @@ if test x"${build}" = x"${host}" ; then
LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-${LDFLAGS}}
fi
-# 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 ${srcdir}/gcc; then
+if test -d ${srcdir}/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
+ # executable directories within the install tree of the compiler being built;
+ # programs in there won't even run.
+ if test "${build}" = "${host}"; then
+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/'
+ fi
+
# 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 -isystem $(build_tooldir)/sys-include'
+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $(build_tooldir)/include -isystem $(build_tooldir)/sys-include'
fi
if test "x${use_gnu_ld}" = x &&
@@ -11687,6 +11699,7 @@ done
+
# Generate default definitions for YACC, M4, LEX and other programs that run
# on the build machine. These are used if the Makefile can't locate these
# programs in objdir.
@@ -19081,7 +19094,101 @@ $as_echo "pre-installed" >&6; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target c++" >&5
+case $target in
+ *-*-darwin*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target c++" >&5
+$as_echo_n "checking where to find the target c++... " >&6; }
+if test "x${build}" != "x${host}" ; then
+ if expr "x$CXX_FOR_TARGET" : "x/" > /dev/null; then
+ # We already found the complete path
+ ac_dir=`dirname $CXX_FOR_TARGET`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
+$as_echo "pre-installed in $ac_dir" >&6; }
+ else
+ # Canadian cross, just use what we found
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
+$as_echo "pre-installed" >&6; }
+ fi
+else
+ ok=yes
+ case " ${configdirs} " in
+ *" gcc "*) ;;
+ *) ok=no ;;
+ esac
+ case ,${enable_languages}, in
+ *,c++,*) ;;
+ *) ok=no ;;
+ esac
+ if test $ok = yes; then
+ # An in-tree tool is available and we can use it
+ CXX_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xg++ -B$$r/$(HOST_SUBDIR)/gcc/ -nostdinc++ `if test -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags; then $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags --build-includes; else echo -funconfigured-libstdc++-v3 ; fi` -B$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -B$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs -B$$r/$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs'
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
+$as_echo "just compiled" >&6; }
+ elif expr "x$CXX_FOR_TARGET" : "x/" > /dev/null; then
+ # We already found the complete path
+ ac_dir=`dirname $CXX_FOR_TARGET`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
+$as_echo "pre-installed in $ac_dir" >&6; }
+ elif test "x$target" = "x$host"; then
+ # We can use an host tool
+ CXX_FOR_TARGET='$(CXX)'
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
+$as_echo "host tool" >&6; }
+ else
+ # We need a cross tool
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
+$as_echo "pre-installed" >&6; }
+ fi
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target c++ for libstdc++" >&5
+$as_echo_n "checking where to find the target c++ for libstdc++... " >&6; }
+if test "x${build}" != "x${host}" ; then
+ if expr "x$RAW_CXX_FOR_TARGET" : "x/" > /dev/null; then
+ # We already found the complete path
+ ac_dir=`dirname $RAW_CXX_FOR_TARGET`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
+$as_echo "pre-installed in $ac_dir" >&6; }
+ else
+ # Canadian cross, just use what we found
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
+$as_echo "pre-installed" >&6; }
+ fi
+else
+ ok=yes
+ case " ${configdirs} " in
+ *" gcc "*) ;;
+ *) ok=no ;;
+ esac
+ case ,${enable_languages}, in
+ *,c++,*) ;;
+ *) ok=no ;;
+ esac
+ if test $ok = yes; then
+ # An in-tree tool is available and we can use it
+ RAW_CXX_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xgcc -shared-libgcc -B$$r/$(HOST_SUBDIR)/gcc -nostdinc++ -B$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -B$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs -B$$r/$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs'
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
+$as_echo "just compiled" >&6; }
+ elif expr "x$RAW_CXX_FOR_TARGET" : "x/" > /dev/null; then
+ # We already found the complete path
+ ac_dir=`dirname $RAW_CXX_FOR_TARGET`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
+$as_echo "pre-installed in $ac_dir" >&6; }
+ elif test "x$target" = "x$host"; then
+ # We can use an host tool
+ RAW_CXX_FOR_TARGET='$(CXX)'
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
+$as_echo "host tool" >&6; }
+ else
+ # We need a cross tool
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
+$as_echo "pre-installed" >&6; }
+ fi
+fi
+
+ ;;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target c++" >&5
$as_echo_n "checking where to find the target c++... " >&6; }
if test "x${build}" != "x${host}" ; then
if expr "x$CXX_FOR_TARGET" : "x/" > /dev/null; then
@@ -19126,7 +19233,7 @@ $as_echo "pre-installed" >&6; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target c++ for libstdc++" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target c++ for libstdc++" >&5
$as_echo_n "checking where to find the target c++ for libstdc++... " >&6; }
if test "x${build}" != "x${host}" ; then
if expr "x$RAW_CXX_FOR_TARGET" : "x/" > /dev/null; then
@@ -19171,6 +19278,8 @@ $as_echo "pre-installed" >&6; }
fi
fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target dlltool" >&5
$as_echo_n "checking where to find the target dlltool... " >&6; }
if test "x${build}" != "x${host}" ; then