aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure294
1 files changed, 160 insertions, 134 deletions
diff --git a/configure b/configure
index 0bf47fa..2d615a9 100755
--- a/configure
+++ b/configure
@@ -556,7 +556,6 @@ enable_option_checking=no
ac_subst_vars='LTLIBOBJS
LIBOBJS
compare_exclusions
-host_shared
stage2_werror_flag
stage1_checking
stage1_cflags
@@ -641,14 +640,15 @@ CXXFLAGS_FOR_TARGET
CFLAGS_FOR_TARGET
DEBUG_PREFIX_CFLAGS_FOR_TARGET
SYSROOT_CFLAGS_FOR_TARGET
+get_gcc_base_ver
extra_host_zlib_configure_flags
extra_host_libiberty_configure_flags
stage1_languages
+host_shared
extra_linker_plugin_flags
extra_linker_plugin_configure_flags
islinc
isllibs
-islver
poststage1_ldflags
poststage1_libs
stage1_ldflags
@@ -781,11 +781,13 @@ enable_isl_version_check
enable_lto
enable_linker_plugin_configure_flags
enable_linker_plugin_flags
+enable_host_shared
enable_stage1_languages
enable_objc_gc
with_target_bdw_gc
with_target_bdw_gc_include
with_target_bdw_gc_lib
+with_gcc_major_version_only
with_build_sysroot
with_debug_prefix_map
with_build_config
@@ -795,7 +797,6 @@ with_build_time_tools
enable_maintainer_mode
enable_stage1_checking
enable_werror
-enable_host_shared
'
ac_precious_vars='build_alias
host_alias
@@ -1497,6 +1498,7 @@ Optional Features:
--enable-linker-plugin-flags=FLAGS
additional flags for configuring and building linker
plugins [none]
+ --enable-host-shared build host code as shared libraries
--enable-stage1-languages[=all]
choose additional languages to build during stage1.
Mostly useful for compiler development
@@ -1514,7 +1516,6 @@ Optional Features:
choose additional checking for stage1 of the
compiler
--enable-werror enable -Werror in bootstrap stage2 and later
- --enable-host-shared build host code as shared libraries
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -1562,6 +1563,8 @@ Optional Packages:
files
--with-target-bdw-gc-lib=PATHLIST
specify directories for installed bdw-gc library
+ --with-gcc-major-version-only
+ use only GCC major number in filesystem paths
--with-build-sysroot=SYSROOT
use sysroot as the system root during the build
--with-debug-prefix-map='A=B C=D ...'
@@ -2748,8 +2751,8 @@ target_libraries="target-libgcc \
target-libgloss \
target-newlib \
target-libgomp \
- target-libcilkrts \
target-liboffloadmic \
+ target-libhsail-rt \
target-libatomic \
target-libitm \
target-libstdc++-v3 \
@@ -2957,7 +2960,7 @@ case "${ENABLE_GOLD}" in
*-*-elf* | *-*-sysv4* | *-*-unixware* | *-*-eabi* | hppa*64*-*-hpux* \
| *-*-linux* | *-*-gnu* | frv-*-uclinux* | *-*-irix5* | *-*-irix6* \
| *-*-netbsd* | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* \
- | *-*-solaris2* | *-*-nto* | *-*-nacl* | *-*-fuchsia*)
+ | *-*-solaris2* | *-*-nto* | *-*-nacl*)
case "${target}" in
*-*-linux*aout* | *-*-linux*oldld*)
;;
@@ -3184,25 +3187,6 @@ $as_echo "yes" >&6; }
fi
fi
-# Disable libcilkrts on unsupported systems.
-if test -d ${srcdir}/libcilkrts; then
- if test x$enable_libcilkrts = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcilkrts support" >&5
-$as_echo_n "checking for libcilkrts support... " >&6; }
- if (srcdir=${srcdir}/libcilkrts; \
- . ${srcdir}/configure.tgt; \
- test -n "$UNSUPPORTED")
- then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- noconfigdirs="$noconfigdirs target-libcilkrts"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- fi
- fi
-fi
-
# Disable liboffloadmic on unsupported systems.
if test -d ${srcdir}/liboffloadmic; then
if test x$enable_liboffloadmic != xno; then
@@ -3299,6 +3283,26 @@ $as_echo "yes" >&6; }
fi
fi
+# Disable libhsail-rt on unsupported systems.
+if test -d ${srcdir}/libhsail-rt; then
+ if test x$enable_libhsail_rt = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhsail-rt support" >&5
+$as_echo_n "checking for libhsail-rt support... " >&6; }
+ if (srcdir=${srcdir}/libhsail-rt; \
+ . ${srcdir}/configure.tgt; \
+ test -n "$UNSUPPORTED")
+ then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ unsupported_languages="$unsupported_languages brig"
+ # This implicitly disables also target-libhsail-rt as it won't
+ # get added to the build without BRIG FE.
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ fi
+ fi
+fi
# Disable libquadmath for some systems.
@@ -3439,11 +3443,8 @@ case "${target}" in
noconfigdirs="$noconfigdirs target-libffi"
;;
powerpc-*-aix*)
- # copied from rs6000-*-* entry
- noconfigdirs="$noconfigdirs target-libffi"
;;
rs6000-*-aix*)
- noconfigdirs="$noconfigdirs target-libffi"
;;
ft32-*-*)
noconfigdirs="$noconfigdirs target-libffi"
@@ -3456,7 +3457,7 @@ esac
# Disable the go frontend on systems where it is known to not work. Please keep
# this in sync with contrib/config-list.mk.
case "${target}" in
-*-*-darwin* | *-*-cygwin* | *-*-mingw* | *-*-aix*)
+*-*-darwin* | *-*-cygwin* | *-*-mingw*)
unsupported_languages="$unsupported_languages go"
;;
esac
@@ -3472,9 +3473,6 @@ if test x$enable_libgo = x; then
*-*-cygwin* | *-*-mingw*)
noconfigdirs="$noconfigdirs target-libgo"
;;
- *-*-aix*)
- noconfigdirs="$noconfigdirs target-libgo"
- ;;
esac
fi
@@ -5907,15 +5905,15 @@ $as_echo "$as_me: WARNING: using in-tree isl, disabling version check" >&2;}
LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs} ${gmplibs}"
LIBS="${_isl_saved_LIBS} -lisl -lgmp"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isl 0.16, 0.15, or deprecated 0.14" >&5
-$as_echo_n "checking for isl 0.16, 0.15, or deprecated 0.14... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isl 0.15 or later" >&5
+$as_echo_n "checking for isl 0.15 or later... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <isl/ctx.h>
+#include <isl/schedule.h>
int
main ()
{
-isl_ctx_get_max_operations (isl_ctx_alloc ());
+isl_options_set_schedule_serialize_sccs (NULL, 0);
;
return 0;
}
@@ -5931,36 +5929,8 @@ rm -f core conftest.err conftest.$ac_objext \
$as_echo "$gcc_cv_isl" >&6; }
if test "${gcc_cv_isl}" = no ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: recommended isl version is 0.16 or 0.15, the minimum required isl version 0.14 is deprecated" >&5
-$as_echo "recommended isl version is 0.16 or 0.15, the minimum required isl version 0.14 is deprecated" >&6; }
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isl 0.16 or 0.15" >&5
-$as_echo_n "checking for isl 0.16 or 0.15... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <isl/schedule.h>
-int
-main ()
-{
-isl_options_set_schedule_serialize_sccs (NULL, 0);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_has_isl_options_set_schedule_serialize_sccs=yes
-else
- ac_has_isl_options_set_schedule_serialize_sccs=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_has_isl_options_set_schedule_serialize_sccs" >&5
-$as_echo "$ac_has_isl_options_set_schedule_serialize_sccs" >&6; }
-
- if test x"$ac_has_isl_options_set_schedule_serialize_sccs" = x"yes"; then
- islver="0.15"
-
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: required isl version is 0.15 or later" >&5
+$as_echo "required isl version is 0.15 or later" >&6; }
fi
CFLAGS=$_isl_saved_CFLAGS
@@ -6042,7 +6012,7 @@ if test $target_elf = yes; then :
else
if test x"$default_enable_lto" = x"yes" ; then
case $target in
- *-apple-darwin9* | *-cygwin* | *-mingw* | *djgpp*) ;;
+ *-apple-darwin[912]* | *-cygwin* | *-mingw* | *djgpp*) ;;
# On other non-ELF platforms, LTO has yet to be validated.
*) enable_lto=no ;;
esac
@@ -6087,6 +6057,16 @@ fi
+# Enable --enable-host-shared.
+# Checked early to determine whether jit is an 'all' language
+# Check whether --enable-host-shared was given.
+if test "${enable_host_shared+set}" = set; then :
+ enableval=$enable_host_shared; host_shared=$enableval
+else
+ host_shared=no
+fi
+
+
# By default, C and C++ are the only stage 1 languages.
stage1_languages=,c,
@@ -6105,7 +6085,7 @@ if test -d ${srcdir}/gcc; then
enable_languages="${LANGUAGES}"
echo configure.ac: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2
else
- enable_languages=all
+ enable_languages=default
fi
else
if test x"${enable_languages}" = x ||
@@ -6153,10 +6133,16 @@ if test -d ${srcdir}/gcc; then
language=
lang_requires=
lang_requires_boot_languages=
- . ${lang_frag}
+ # set srcdir during sourcing lang_frag to the gcc dir.
+ # Sadly overriding srcdir on the . line doesn't work in plain sh as it
+ # polutes this shell
+ saved_srcdir=${srcdir}
+ srcdir=${srcdir}/gcc . ${lang_frag}
+ srcdir=${saved_srcdir}
for other in ${lang_requires} ${lang_requires_boot_languages}; do
case ,${enable_languages}, in
*,$other,*) ;;
+ *,default,*) ;;
*,all,*) ;;
*,$language,*)
echo " \`$other' language required by \`$language'; enabling" 1>&2
@@ -6168,6 +6154,7 @@ if test -d ${srcdir}/gcc; then
if test "$other" != "c"; then
case ,${enable_stage1_languages}, in
*,$other,*) ;;
+ *,default,*) ;;
*,all,*) ;;
*)
case ,${enable_languages}, in
@@ -6205,7 +6192,7 @@ if test -d ${srcdir}/gcc; then
esac
fi
- missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ `
+ missing_languages=`echo ",$enable_languages," | sed -e s/,default,/,/ -e s/,all,/,/ -e s/,c,/,/ `
potential_languages=,c,
enabled_target_libs=
@@ -6226,7 +6213,10 @@ if test -d ${srcdir}/gcc; then
subdir_requires=
boot_language=no
build_by_default=yes
- . ${lang_frag}
+ # set srcdir during sourcing. See above about save & restore
+ saved_srcdir=${srcdir}
+ srcdir=${srcdir}/gcc . ${lang_frag}
+ srcdir=${saved_srcdir}
if test x${language} = x; then
echo "${lang_frag} doesn't set \$language." 1>&2
exit 1
@@ -6237,30 +6227,37 @@ if test -d ${srcdir}/gcc; then
fi
add_this_lang=no
- case ,${enable_languages}, in
- *,${language},*)
- # Language was explicitly selected; include it
- # unless it is C, which is enabled by default.
- if test "$language" != "c"; then
+ # C is always enabled, so no need to add it again
+ if test "$language" != "c"; then
+ case ,${enable_languages}, in
+ *,${language},*)
+ # Language was explicitly selected; include it
add_this_lang=yes
- fi
- ;;
- *,all,*)
- # 'all' was selected, select it if it is a default language
- if test "$language" != "c"; then
+ ;;
+ *,all,*)
+ # All languages are enabled
+ add_this_lang=all
+ ;;
+ *,default,*)
+ # 'default' was selected, select it if it is a default language
add_this_lang=${build_by_default}
- fi
- ;;
- esac
+ ;;
+ esac
+ fi
# Disable languages that need other directories if these aren't available.
for i in $subdir_requires; do
test -f "$srcdir/gcc/$i/config-lang.in" && continue
- case ,${enable_languages}, in
- *,${language},*)
+ case ${add_this_lang} in
+ yes)
# Specifically requested language; tell them.
as_fn_error "The gcc/$i directory contains parts of $language but is missing" "$LINENO" 5
;;
+ all)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The gcc/$i directory contains parts of $language but is missing" >&5
+$as_echo "$as_me: WARNING: The gcc/$i directory contains parts of $language but is missing" >&2;}
+ add_this_lang=unsupported
+ ;;
*)
# Silently disable.
add_this_lang=unsupported
@@ -6269,20 +6266,55 @@ if test -d ${srcdir}/gcc; then
done
# Disable Ada if no preexisting GNAT is available.
- case ,${enable_languages},:${language}:${have_gnat} in
- *,${language},*:ada:no)
+ case ${add_this_lang}:${language}:${have_gnat} in
+ yes:ada:no)
# Specifically requested language; tell them.
as_fn_error "GNAT is required to build $language" "$LINENO" 5
;;
+ all:ada:no)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNAT is required to build $language" >&5
+$as_echo "$as_me: WARNING: GNAT is required to build $language" >&2;}
+ add_this_lang=unsupported
+ ;;
*:ada:no)
# Silently disable.
add_this_lang=unsupported
;;
esac
- # Disable a language that is unsupported by the target.
- case " $unsupported_languages " in
- *" $language "*)
+ # Disable jit if -enable-host-shared not specified
+ case ${add_this_lang}:${language}:${host_shared} in
+ yes:jit:no)
+ # PR jit/64780: explicitly specify --enable-host-shared
+ as_fn_error "
+Enabling language \"jit\" requires --enable-host-shared.
+
+--enable-host-shared typically slows the rest of the compiler down by
+a few %, so you must explicitly enable it.
+
+If you want to build both the jit and the regular compiler, it is often
+best to do this via two separate configure/builds, in separate
+directories, to avoid imposing the performance cost of
+--enable-host-shared on the regular compiler." "$LINENO" 5
+ ;;
+ all:jit:no)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-host-shared required to build $language" >&5
+$as_echo "$as_me: WARNING: --enable-host-shared required to build $language" >&2;}
+ add_this_lang=unsupported
+ ;;
+ *:jit:no)
+ # Silently disable.
+ add_this_lang=unsupported
+ ;;
+ esac
+
+ # Disable a language that is unsupported by the target.
+ case "${add_this_lang}: $unsupported_languages " in
+ no:*) ;;
+ unsupported:*) ;;
+ *:*" $language "*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ${language} not supported for this target" >&5
+$as_echo "$as_me: WARNING: ${language} not supported for this target" >&2;}
add_this_lang=unsupported
;;
esac
@@ -6299,7 +6331,7 @@ if test -d ${srcdir}/gcc; then
noconfigdirs="$noconfigdirs $lang_dirs"
potential_languages="${potential_languages}${language},"
;;
- yes)
+ all|yes)
new_enable_languages="${new_enable_languages}${language},"
potential_languages="${potential_languages}${language},"
missing_languages=`echo "$missing_languages" | sed "s/,$language,/,/"`
@@ -6437,19 +6469,19 @@ $as_echo "using paths configured with --with-target-bdw-gc options" >&6; }
fi
esac
-# Disable libcilkrts, libitm, libsanitizer, libvtv, liboffloadmic if we're not building C++
+# Disable libitm, libsanitizer, libvtv, liboffloadmic if we're not building C++
case ,${enable_languages}, in
*,c++,*)
- # Disable libcilkrts, libitm, libsanitizer if we're not building libstdc++
+ # Disable libitm, libsanitizer if we're not building libstdc++
case "${noconfigdirs}" in
*target-libstdc++-v3*)
- noconfigdirs="$noconfigdirs target-libcilkrts target-libitm target-libsanitizer"
+ noconfigdirs="$noconfigdirs target-libitm target-libsanitizer"
;;
*) ;;
esac
;;
*)
- noconfigdirs="$noconfigdirs target-libcilkrts target-liboffloadmic target-libitm target-libsanitizer target-libvtv"
+ noconfigdirs="$noconfigdirs target-liboffloadmic target-libitm target-libsanitizer target-libvtv"
;;
esac
@@ -6612,6 +6644,20 @@ if test "${PATH_SEPARATOR+set}" != set; then
fi
+ get_gcc_base_ver="cat"
+
+# Check whether --with-gcc-major-version-only was given.
+if test "${with_gcc_major_version_only+set}" = set; then :
+ withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
+ get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+ fi
+
+fi
+
+
+
+
+
if test "x$exec_prefix" = xNONE; then
if test "x$prefix" = xNONE; then
@@ -6627,7 +6673,11 @@ fi
# case, if there is no compiler in the tree nobody should use
# AS_FOR_TARGET and LD_FOR_TARGET.
if test x$host = x$build && test -f $srcdir/gcc/BASE-VER; then
- gcc_version=`cat $srcdir/gcc/BASE-VER`
+ if test x$with_gcc_major_version_only = xyes ; then
+ gcc_version=`sed -e 's/^\([0-9]*\).*$/\1/' $srcdir/gcc/BASE-VER`
+ else
+ gcc_version=`cat $srcdir/gcc/BASE-VER`
+ fi
gcc_cv_tool_dirs="$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical/$gcc_version$PATH_SEPARATOR"
gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical$PATH_SEPARATOR"
gcc_cv_tool_dirs="$gcc_cv_tool_dirs/usr/lib/gcc/$target_noncanonical/$gcc_version$PATH_SEPARATOR"
@@ -6855,6 +6905,9 @@ case "${target}" in
nios2-*-elf*)
target_makefile_frag="config/mt-nios2-elf"
;;
+ *-*-linux-android*)
+ target_makefile_frag="config/mt-android"
+ ;;
*-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
target_makefile_frag="config/mt-gnu"
;;
@@ -14566,60 +14619,33 @@ fi
# Check whether --enable-werror was given.
if test "${enable_werror+set}" = set; then :
enableval=$enable_werror;
-else
- if test -d ${srcdir}/gcc && test x"`cat $srcdir/gcc/DEV-PHASE`" = xexperimental; then
- enable_werror=yes
-else
- enable_werror=no
-fi
-fi
-
case ${enable_werror} in
yes) stage2_werror_flag="--enable-werror-always" ;;
*) stage2_werror_flag="" ;;
esac
-
-# Enable --enable-host-shared.
-# Check whether --enable-host-shared was given.
-if test "${enable_host_shared+set}" = set; then :
- enableval=$enable_host_shared; host_shared=$enableval
else
- host_shared=no
-fi
+if test -d ${srcdir}/gcc && test x"`cat $srcdir/gcc/DEV-PHASE`" = xexperimental; then
+ case $BUILD_CONFIG in
+ bootstrap-debug)
+ stage2_werror_flag="--enable-werror-always" ;;
+ "")
+ stage2_werror_flag="--enable-werror-always" ;;
+ esac
+fi
+fi
-# PR jit/64780: Require the user to explicitly specify
-# --enable-host-shared if the jit is enabled, hinting
-# that they might want to do a separate configure/build of
-# the jit, to avoid users from slowing down the rest of the
-# compiler by enabling the jit.
-if test ${host_shared} = "no" ; then
- case "${enable_languages}" in
- *jit*)
- as_fn_error "
-Enabling language \"jit\" requires --enable-host-shared.
---enable-host-shared typically slows the rest of the compiler down by
-a few %, so you must explicitly enable it.
-If you want to build both the jit and the regular compiler, it is often
-best to do this via two separate configure/builds, in separate
-directories, to avoid imposing the performance cost of
---enable-host-shared on the regular compiler." "$LINENO" 5
- ;;
- *)
- ;;
- esac
-fi
# Specify what files to not compare during bootstrap.
compare_exclusions="gcc/cc*-checksum\$(objext) | gcc/ada/*tools/*"
case "$target" in
hppa*64*-*-hpux*) ;;
- hppa*-*-hpux*) compare_exclusions="gcc/cc*-checksum\$(objext) | */libgcc/lib2funcs* | gcc/ada/*tools/*" ;;
+ hppa*-*-hpux*) compare_exclusions="gcc/cc*-checksum\$(objext) | */libgcc/lib2funcs* | gcc/ada/*tools/* | gcc/function-tests.o" ;;
powerpc*-ibm-aix*) compare_exclusions="gcc/cc*-checksum\$(objext) | gcc/ada/*tools/* | *libgomp*\$(objext)" ;;
esac