diff mbox

Disable libitm if unsupported

Message ID EB3B3361-22F9-4B8A-B567-0376341A4F19@sandoe-acoustics.co.uk
State New
Headers show

Commit Message

Iain Sandoe Nov. 9, 2011, 4:14 p.m. UTC
Hi Richard,

On 8 Nov 2011, at 21:29, Richard Henderson wrote:

> On 11/08/2011 01:20 PM, Iain Sandoe wrote:
>> is it expected for  libitm to work on x86 darwin?
>
> Yes.

hmmm...

powerpc-darwin is not affected (doesn't auto configure because there's  
no powerpc directory under libitm/config).

However ...

On i686-darwin9 it fails with "target only supports weak alias"
(I need to understand better where that comes from - but the machine  
is tied up right now).

On x86_64-darwin10 it fails to build sjlj.S because that file makes  
use of assembler constructs not available on the system as
(I think Rainer perhaps already observed this for some solaris  
versions).

I had a quick look at config/x86/target.h and observe that the jmpbuf  
layout in that header is different from the system definition...

.. so I'm thinking that maybe some porting work is needed ...

Unless I've missed sth ...

>> /bin/sh ./libtool --tag=CXX   --mode=compile  -B/GCC/gcc-4-7- 
>> install/i686-apple-darwin9/bin/ -B/GCC/gcc-4-7-install/i686-apple- 
>> darwin9/lib/ -isystem /GCC/gcc-4-7-install/i686-apple-darwin9/ 
>> include -isystem /GCC/gcc-4-7-install/i686-apple-darwin9/sys- 
>> include    -DHAVE_CONFIG_H -I. -I/GCC/gcc-live-trunk/libitm  -I/GCC/ 
>> gcc-live-trunk/libitm/config/posix -I/GCC/gcc-live-trunk/libitm/ 
>> config/generic -I/GCC/gcc-live-trunk/libitm  -std=gnu++0x -funwind- 
>> tables -fno-exceptions -fno-rtti -march=i486 -mtune=i686 -fomit- 
>> frame-pointer -Wall -Werror  -Wc,-pthread -fabi-version=4 -g -O2 - 
>> MT cacheline.lo -MD -MP -MF .deps/cacheline.Tpo -c -o cacheline.lo / 
>> GCC/gcc-live-trunk/libitm/config/generic/cacheline.cc
>> libtool: compile: unrecognized option `-B/GCC/gcc-4-7-install/i686- 
>> apple-darwin9/bin/'
>> libtool: compile: Try `libtool --help' for more information.
>> make[3]: *** [barrier.lo] Error 1
>
> That's ... odd.
>
> Top-level makefile has passed down the empty string instead of the g+ 
> + executable.
> I have zero idea how to fix this.  It sounds similar to the horror  
> that I eventually
> bypassed wrt the include paths.

this happens when, in an attempt to debug things, one deletes the  
failed build and tries to do

make all-target-libitm.

so .. perhaps we should disable darwin for now so that at least it  
bootstraps  ... unless this is only affecting me :-)

cheers
Iain

Comments

Richard Henderson Nov. 9, 2011, 5:01 p.m. UTC | #1
On 11/09/2011 08:14 AM, Iain Sandoe wrote:
> On i686-darwin9 it fails with "target only supports weak alias"
> (I need to understand better where that comes from - but the machine is tied up right now).

This is fixed.  I removed the alias in favor of a plain function for portability.
I also added PR 51065 to track the automatic optimization possibility.

> On x86_64-darwin10 it fails to build sjlj.S because that file makes
> use of assembler constructs not available on the system as (I think
> Rainer perhaps already observed this for some solaris versions).

Testing a fix for the cfi pseudos now.

That won't totally fix darwin, because there are also elf-specific pseudos as well (e.g. ".type").  I'll crib a patch together for that from cross-compiled examples for you to test later.

> I had a quick look at config/x86/target.h and observe that the jmpbuf
> layout in that header is different from the system definition...

Irrelevant.  It's a local jmpbuf for the local definition in sjlj.S.  Which is Special because we're  actually recording the state for an outer frame.  One can NOT use the system setjmp/longjmp to  implement libitm.

> Index: libitm/configure.tgt
> ===================================================================
> --- libitm/configure.tgt    (revision 181206)
> +++ libitm/configure.tgt    (working copy)
> @@ -93,10 +93,14 @@ case "${target}" in
>    *-*-gnu* | *-*-k*bsd*-gnu \
>    | *-*-netbsd* | *-*-freebsd* | *-*-openbsd* \
>    | *-*-solaris2* | *-*-sysv4* | *-*-irix6* | *-*-osf* | *-*-hpux11* \
> -  | *-*-darwin* | *-*-aix*)
> +  | *-*-aix*)
>      # POSIX system.  The OS is supported.
>      ;;
> 
> +  *-*-darwin*)    # POSIX, but needs some work.
> +    UNSUPPORTED=1
> +    ;;
> +
>    *)    # Non-POSIX, or embedded system
>      UNSUPPORTED=1

If you want to commit that right away, that's fine by me.


r~
Iain Sandoe Nov. 9, 2011, 5:14 p.m. UTC | #2
On 9 Nov 2011, at 17:01, Richard Henderson wrote:

> On 11/09/2011 08:14 AM, Iain Sandoe wrote:
>> On i686-darwin9 it fails with "target only supports weak alias"
>> (I need to understand better where that comes from - but the  
>> machine is tied up right now).
>
> This is fixed.  I removed the alias in favor of a plain function for  
> portability.
> I also added PR 51065 to track the automatic optimization possibility.
>
>> On x86_64-darwin10 it fails to build sjlj.S because that file makes
>> use of assembler constructs not available on the system as (I think
>> Rainer perhaps already observed this for some solaris versions).
>
> Testing a fix for the cfi pseudos now.
>
> That won't totally fix darwin, because there are also elf-specific  
> pseudos as well (e.g. ".type").  I'll crib a patch together for that  
> from cross-compiled examples for you to test later.
>
>> I had a quick look at config/x86/target.h and observe that the jmpbuf
>> layout in that header is different from the system definition...
>
> Irrelevant.  It's a local jmpbuf for the local definition in  
> sjlj.S.  Which is Special because we're  actually recording the  
> state for an outer frame.  One can NOT use the system setjmp/longjmp  
> to  implement libitm.
>
>> Index: libitm/configure.tgt
>> ===================================================================
>> --- libitm/configure.tgt    (revision 181206)
>> +++ libitm/configure.tgt    (working copy)
>> @@ -93,10 +93,14 @@ case "${target}" in
>>   *-*-gnu* | *-*-k*bsd*-gnu \
>>   | *-*-netbsd* | *-*-freebsd* | *-*-openbsd* \
>>   | *-*-solaris2* | *-*-sysv4* | *-*-irix6* | *-*-osf* | *-*- 
>> hpux11* \
>> -  | *-*-darwin* | *-*-aix*)
>> +  | *-*-aix*)
>>     # POSIX system.  The OS is supported.
>>     ;;
>>
>> +  *-*-darwin*)    # POSIX, but needs some work.
>> +    UNSUPPORTED=1
>> +    ;;
>> +
>>   *)    # Non-POSIX, or embedded system
>>     UNSUPPORTED=1
>
> If you want to commit that right away, that's fine by me.

I'll hang on .. and test stuff ;-)

cheers
Iain
diff mbox

Patch

Index: libitm/configure.tgt
===================================================================
--- libitm/configure.tgt	(revision 181206)
+++ libitm/configure.tgt	(working copy)
@@ -93,10 +93,14 @@  case "${target}" in
    *-*-gnu* | *-*-k*bsd*-gnu \
    | *-*-netbsd* | *-*-freebsd* | *-*-openbsd* \
    | *-*-solaris2* | *-*-sysv4* | *-*-irix6* | *-*-osf* | *-*-hpux11* \
-  | *-*-darwin* | *-*-aix*)
+  | *-*-aix*)
  	# POSIX system.  The OS is supported.
  	;;

+  *-*-darwin*)	# POSIX, but needs some work.
+	UNSUPPORTED=1
+	;;
+
    *)	# Non-POSIX, or embedded system
  	UNSUPPORTED=1
  	;;