+2017-05-25 Nathan Sidwell <nathan@acm.org>
+
+ * configure.ac: Add --enable-languages=default to mean default and
+ make --enable-languages=all mean all supported languages.
+ * configure: Regenerated.
+
2017-05-24 Segher Boessenkool <segher@kernel.crashing.org>
* config.gcc (powerpc*-*-*spe*): New.
ac_subst_vars='LTLIBOBJS
LIBOBJS
compare_exclusions
-host_shared
stage2_werror_flag
stage1_checking
stage1_cflags
extra_host_zlib_configure_flags
extra_host_libiberty_configure_flags
stage1_languages
+host_shared
extra_linker_plugin_flags
extra_linker_plugin_configure_flags
islinc
enable_lto
enable_linker_plugin_configure_flags
enable_linker_plugin_flags
+enable_host_shared
enable_stage1_languages
enable_objc_gc
with_target_bdw_gc
enable_maintainer_mode
enable_stage1_checking
enable_werror
-enable_host_shared
'
ac_precious_vars='build_alias
host_alias
--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
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]
+# 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,
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 ||
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
if test "$other" != "c"; then
case ,${enable_stage1_languages}, in
*,$other,*) ;;
+ *,default,*) ;;
*,all,*) ;;
*)
case ,${enable_languages}, in
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=
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
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
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,/,/"`
-# 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
-
-
-
-# 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/*"
extra_linker_plugin_flags=)
AC_SUBST(extra_linker_plugin_flags)
+# Enable --enable-host-shared.
+# Checked early to determine whether jit is an 'all' language
+AC_ARG_ENABLE(host-shared,
+[AS_HELP_STRING([--enable-host-shared],
+ [build host code as shared libraries])],
+[host_shared=$enableval], [host_shared=no])
+AC_SUBST(host_shared)
# By default, C and C++ are the only stage 1 languages.
stage1_languages=,c,
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 ||
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
if test "$other" != "c"; then
case ,${enable_stage1_languages}, in
*,$other,*) ;;
+ *,default,*) ;;
*,all,*) ;;
*)
case ,${enable_languages}, in
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=
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.
AC_MSG_ERROR([The gcc/$i directory contains parts of $language but is missing])
;;
+ all)
+ AC_MSG_WARN([The gcc/$i directory contains parts of $language but is missing])
+ add_this_lang=unsupported
+ ;;
*)
# Silently disable.
add_this_lang=unsupported
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.
AC_MSG_ERROR([GNAT is required to build $language])
;;
+ all:ada:no)
+ AC_MSG_WARN([GNAT is required to build $language])
+ 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
+ AC_MSG_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.])
+ ;;
+ all:jit:no)
+ AC_MSG_WARN([--enable-host-shared required to build $language])
+ 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 "*)
+ AC_MSG_WARN([${language} not supported for this target])
add_this_lang=unsupported
;;
esac
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,/,/"`
AC_SUBST(stage2_werror_flag)
-# Enable --enable-host-shared.
-AC_ARG_ENABLE(host-shared,
-[AS_HELP_STRING([--enable-host-shared],
- [build host code as shared libraries])],
-[host_shared=$enableval], [host_shared=no])
-AC_SUBST(host_shared)
-
-# 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*)
- AC_MSG_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.])
- ;;
- *)
- ;;
- esac
-fi
-
# Specify what files to not compare during bootstrap.
compare_exclusions="gcc/cc*-checksum\$(objext) | gcc/ada/*tools/*"
+2017-05-25 Nathan Sidwell <nathan@acm.org>
+
+ * doc/invoke.texi (--enable-languages): Update documentation.
+
2017-05-25 Martin Liska <mliska@suse.cz>
* dumpfile.c: Add TDF_FOLDING.
grep ^language= */config-lang.in
@end smallexample
Currently, you can use any of the following:
-@code{all}, @code{ada}, @code{c}, @code{c++}, @code{fortran},
+@code{all}, @code{default}, @code{ada}, @code{c}, @code{c++}, @code{fortran},
@code{go}, @code{jit}, @code{lto}, @code{objc}, @code{obj-c++}.
Building the Ada compiler has special requirements, see below.
-If you do not pass this flag, or specify the option @code{all}, then all
+If you do not pass this flag, or specify the option @code{default}, then the
default languages available in the @file{gcc} sub-tree will be configured.
Ada, Go, Jit, and Objective-C++ are not default languages. LTO is not a
default language, but is built by default because @option{--enable-lto} is
-enabled by default. The other languages are default languages.
+enabled by default. The other languages are default languages. If
+@code{all} is specified, then all available languages are built. An
+exception is @code{jit} language, which requires
+@option{--enable-host-shared} to be included with @code{all}.
@item --enable-stage1-languages=@var{lang1},@var{lang2},@dots{}
Specify that a particular subset of compilers and their runtime