This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH to configure.ac to fix --enable-languages=all
- From: Jason Merrill <jason at redhat dot com>
- To: gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Cc: Jakub Jelinek <jakub at redhat dot com>, Steven Bosscher <steven at gcc dot gnu dot org>
- Date: Tue, 04 Sep 2012 14:37:53 -0400
- Subject: PATCH to configure.ac to fix --enable-languages=all
I configure GCC with --enable-languages=all,obj-c++ for testing, and
this started breaking recently, because I ended up with 'c' twice in the
list of languages, so reconfiguring breaks. This seems to be because
r189080 didn't adjust the "all" case along with the language name case.
Tested x86_64-pc-linux-gnu, applying to trunk as obvious.
commit 1e901c1bd7814cd5e3b6800fe035255ab6c3976f
Author: Jason Merrill <jason@redhat.com>
Date: Tue Sep 4 13:25:21 2012 -0400
* configure.ac: Fix --enable-languages=all.
diff --git a/configure b/configure
index 0f655b8..cd06e4e 100755
--- a/configure
+++ b/configure
@@ -6112,6 +6112,7 @@ if test -d ${srcdir}/gcc; then
boot_language=yes
fi
+ add_this_lang=no
case ,${enable_languages}, in
*,${language},*)
# Language was explicitly selected; include it
@@ -6122,10 +6123,9 @@ if test -d ${srcdir}/gcc; then
;;
*,all,*)
# 'all' was selected, select it if it is a default language
- add_this_lang=${build_by_default}
- ;;
- *)
- add_this_lang=no
+ if test "$language" != "c"; then
+ add_this_lang=${build_by_default}
+ fi
;;
esac
diff --git a/configure.ac b/configure.ac
index 02174b3..9bee624 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1758,6 +1758,7 @@ if test -d ${srcdir}/gcc; then
boot_language=yes
fi
+ add_this_lang=no
case ,${enable_languages}, in
*,${language},*)
# Language was explicitly selected; include it
@@ -1768,10 +1769,9 @@ if test -d ${srcdir}/gcc; then
;;
*,all,*)
# 'all' was selected, select it if it is a default language
- add_this_lang=${build_by_default}
- ;;
- *)
- add_this_lang=no
+ if test "$language" != "c"; then
+ add_this_lang=${build_by_default}
+ fi
;;
esac