Hello, as discussed in previous thread (https://gcc.gnu.org/ml/gcc-patches/2014-07/msg02010.html), I would like to add more intuitive behavior for --enable-languages configure option.
Thank you, Martin
2014-07-30 Martin Liska <mli...@suse.cz> * configure: New value for configure option --enable-languages added (default). * configure.ac: Likewise. * doc/install.texi (enable-languages): New value usage explained.
diff --git a/configure b/configure index c8b20b6..c50b5c6 100755 --- a/configure +++ b/configure @@ -6209,7 +6209,7 @@ if test -d ${srcdir}/gcc; then enable_languages="${LANGUAGES}" echo configure.in: 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 || @@ -6261,6 +6261,7 @@ if test -d ${srcdir}/gcc; then 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 @@ -6272,6 +6273,7 @@ if test -d ${srcdir}/gcc; then if test "$other" != "c"; then case ,${enable_stage1_languages}, in *,$other,*) ;; + *,default,*) ;; *,all,*) ;; *) case ,${enable_languages}, in @@ -6304,7 +6306,7 @@ if test -d ${srcdir}/gcc; then fi - missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ ` + missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,default,/,/ -e s/,c,/,/ ` potential_languages=,c, enabled_target_libs= @@ -6344,12 +6346,18 @@ if test -d ${srcdir}/gcc; then add_this_lang=yes fi ;; - *,all,*) - # 'all' was selected, select it if it is a default language + *,default,*) + # 'default' was selected, select it if it is a default language if test "$language" != "c"; then add_this_lang=${build_by_default} fi ;; + *,all,*) + # 'all' was selected, add the language + if test "$language" != "c"; then + add_this_lang=yes + fi + ;; esac # Disable languages that need other directories if these aren't available. diff --git a/configure.ac b/configure.ac index 163de5f..29281dd 100644 --- a/configure.ac +++ b/configure.ac @@ -1756,7 +1756,7 @@ if test -d ${srcdir}/gcc; then enable_languages="${LANGUAGES}" echo configure.in: 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 || @@ -1808,6 +1808,7 @@ if test -d ${srcdir}/gcc; then 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 @@ -1819,6 +1820,7 @@ if test -d ${srcdir}/gcc; then if test "$other" != "c"; then case ,${enable_stage1_languages}, in *,$other,*) ;; + *,default,*) ;; *,all,*) ;; *) case ,${enable_languages}, in @@ -1851,7 +1853,7 @@ if test -d ${srcdir}/gcc; then fi AC_SUBST(extra_host_libiberty_configure_flags) - missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ ` + missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,default,/,/ -e s/,c,/,/ ` potential_languages=,c, enabled_target_libs= @@ -1891,12 +1893,18 @@ if test -d ${srcdir}/gcc; then add_this_lang=yes fi ;; - *,all,*) - # 'all' was selected, select it if it is a default language + *,default,*) + # 'default' was selected, select it if it is a default language if test "$language" != "c"; then add_this_lang=${build_by_default} fi ;; + *,all,*) + # 'all' was selected, add the language + if test "$language" != "c"; then + add_this_lang=yes + fi + ;; esac # Disable languages that need other directories if these aren't available. diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index 31b8c8b..c9c6dea 100644 --- a/gcc/doc/install.texi +++ b/gcc/doc/install.texi @@ -1423,12 +1423,13 @@ their runtime libraries should be built. For a list of valid values for 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{default}, @code{all}, @code{ada}, @code{c}, @code{c++}, @code{fortran}, @code{go}, @code{java}, @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 default languages available in the @file{gcc} sub-tree will be configured. Ada, Go and Objective-C++ are not default languages; the rest are. +To configure all available languages, specify the option @code{all}. @item --enable-stage1-languages=@var{lang1},@var{lang2},@dots{} Specify that a particular subset of compilers and their runtime