This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, DOC]: New value 'default' for --enable-languages


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

Attachment: enable-languages.changelog
Description: Text document

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]