diff mbox

Fix bootstrap/51072 -- libitm not disabled without c++

Message ID 4F04FF09.3090108@redhat.com
State New
Headers show

Commit Message

Richard Henderson Jan. 5, 2012, 1:38 a.m. UTC
Second try.  Unlike adjusting the gcc/cp fragment, I can't imagine 
this has any other side effects.

Tested on x86_64-linux.  Committed.


r~

Comments

Jakub Jelinek Jan. 5, 2012, 1:53 a.m. UTC | #1
On Thu, Jan 05, 2012 at 12:38:17PM +1100, Richard Henderson wrote:
> +# Disable libitm if we're not building C++
> +case ,${enable_languages}, in
> +  *,c++) ;;

Shouldn't that be *,c++,* ?  C++ might not be the last in the list...

	Jakub
Richard Henderson Jan. 5, 2012, 2:25 a.m. UTC | #2
On 01/05/2012 12:53 PM, Jakub Jelinek wrote:
> On Thu, Jan 05, 2012 at 12:38:17PM +1100, Richard Henderson wrote:
>> +# Disable libitm if we're not building C++
>> +case ,${enable_languages}, in
>> +  *,c++) ;;
> 
> Shouldn't that be *,c++,* ?  C++ might not be the last in the list...

Gah, of course it should.  It's what I meant.
I guess you can tell exactly what I tested too...


r~
Richard Biener Jan. 5, 2012, 9:28 a.m. UTC | #3
On Thu, Jan 5, 2012 at 3:25 AM, Richard Henderson <rth@redhat.com> wrote:
> On 01/05/2012 12:53 PM, Jakub Jelinek wrote:
>> On Thu, Jan 05, 2012 at 12:38:17PM +1100, Richard Henderson wrote:
>>> +# Disable libitm if we're not building C++
>>> +case ,${enable_languages}, in
>>> +  *,c++) ;;
>>
>> Shouldn't that be *,c++,* ?  C++ might not be the last in the list...
>
> Gah, of course it should.  It's what I meant.
> I guess you can tell exactly what I tested too...

I suppose we should mention the C++ language requirement for TM in
install.texi alongside the --disable/enable-libitm docs (which I can't
find ... ;))

Otherwise a very reasonable fix.

Thanks,
Richard.

>
> r~
diff mbox

Patch

diff --git a/ChangeLog b/ChangeLog
index b9d08f3..a8019b3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@ 
+2012-01-05  Richard Henderson  <rth@redhat.com>
+
+	PR bootstrap/51072
+	* configure.ac: Disable libitm if c++ is not enabled.
+	* configure: Rebuild.
+
 2012-01-02  Balaji V. Iyer  <bviyer@gmail.com>
 
 	* MAINTAINERS (Write After Approval): Add myself.
diff --git a/configure b/configure
index fd6defa..d970c1d 100755
--- a/configure
+++ b/configure
@@ -6473,6 +6473,14 @@  case ,${enable_languages},:${enable_objc_gc} in
     ;;
 esac
 
+# Disable libitm if we're not building C++
+case ,${enable_languages}, in
+  *,c++) ;;
+  *)
+    noconfigdirs="$noconfigdirs target-libitm"
+    ;;
+esac
+
 # Remove the entries in $skipdirs and $noconfigdirs from $configdirs,
 # $build_configdirs and $target_configdirs.
 # If we have the source for $noconfigdirs entries, add them to $notsupp.
diff --git a/configure.ac b/configure.ac
index 9fee563..b97c505 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1982,6 +1982,14 @@  case ,${enable_languages},:${enable_objc_gc} in
     ;;
 esac
 
+# Disable libitm if we're not building C++
+case ,${enable_languages}, in
+  *,c++) ;;
+  *)
+    noconfigdirs="$noconfigdirs target-libitm"
+    ;;
+esac
+
 # Remove the entries in $skipdirs and $noconfigdirs from $configdirs,
 # $build_configdirs and $target_configdirs.
 # If we have the source for $noconfigdirs entries, add them to $notsupp.