On Thu, Dec 08, 2011 at 05:55:37PM +0000, Iain Sandoe wrote:
>
> On 8 Dec 2011, at 17:24, Jack Howarth wrote:
>
>> On Thu, Dec 08, 2011 at 05:05:12PM +0000, Iain Sandoe wrote:
>>>
>>> On 8 Dec 2011, at 16:58, Jack Howarth wrote:
>>>
>>>> On Thu, Dec 08, 2011 at 03:54:35PM +0000, Iain Sandoe wrote:
>>>>>
>>>>> On 8 Dec 2011, at 15:38, Jack Howarth wrote:
>>>>>
>>>>>> Currently the boehm-gc testsuite fails...
>>>>>>
>>>>>> FAIL: boehm-gc.c/gctest.c -O2 execution test
>>>>>> FAIL: boehm-gc.c/leak_test.c -O2 execution test
>>>>>> FAIL: boehm-gc.c/thread_leak_test.c -O2 execution test
>>>>>> FAIL: boehm-gc.lib/staticrootstest.c -O2 execution test
>>>>>
>>>>> you have not answered these questions:
>>>>>
>>>>> a) "what is anything being built in these tests which is not PIC"?
>>>>> b) and why is it being built that way?
>>>>>
>>>>> ISTM the fix below should not be required
>>>>> - and the problem lies in something being built with -mdynamic-no-
>>>>> pic or
>>>>> similar
>>>>
>>>> Nothing in boehm-gc is built non-PIC (see the attached log for  
>>>> boehm-
>>>> gc).
>>>> Likewise nothing in the testsuite is built non-PIC. For example,
>>>> gctest.c
>>>> at -O2 is built, according to -v, as...
>>>>
>>>> /sw/src/fink.build/gcc47-4.7.0-1/darwin_objdir/gcc/cc1 -quiet -v - 
>>>> I /
>>>> sw/src/fink.build/gcc47-4.7.0-1/darwin_objdir/x86_64-apple-
>>>> darwin11.2.0/./boehm-gc/include -I /sw/src/fink.build/gcc47-4.7.0-1/
>>>> gcc-4.7-20111207/boehm-gc/testsuite/../include -iprefix /sw/src/
>>>> fink.build/gcc47-4.7.0-1/darwin_objdir/gcc/../lib/gcc/x86_64-apple-
>>>> darwin11.2.0/4.7.0/ -isystem /sw/src/fink.build/gcc47-4.7.0-1/
>>>> darwin_objdir/gcc/include -isystem /sw/src/fink.build/gcc47-4.7.0-1/
>>>> darwin_objdir/gcc/include-fixed -D__DYNAMIC__ /sw/src/fink.build/
>>>> gcc47-4.7.0-1/gcc-4.7-20111207/boehm-gc/testsuite/boehm-gc.c/ 
>>>> gctest.c
>>>> -fPIC -quiet -dumpbase gctest.c -mmacosx-version-min=10.7.2
>>>> -mtune=core2 -auxbase gctest -O2 -version -o /var/tmp//ccgHCNRC.s
>>>>
>>>> The test is also just linked to the the libgcjgcj built in boehm- 
>>>> gc...
>>>>
>>>> /sw/src/fink.build/gcc47-4.7.0-1/darwin_objdir/gcc/collect-ld - 
>>>> dynamic
>>>> -arch x86_64 -macosx_version_min 10.7.2 -weak_reference_mismatches
>>>> non-weak -o ./.libs/gctest -lcrt1.10.6.o -
>>>> L/sw/src/fink.build/gcc47-4.7.0-1/darwin_objdir/gcc /var/tmp//
>>>> ccb3OaQl.o /sw/src/fink.build/gcc47-4.7.0-1/darwin_objdir/x86_64-
>>>> apple-darwin11.2.0/./boehm-gc/.libs/libgcjgc.dylib - 
>>>> no_compact_unwind
>>>> -lSystem -lgcc_ext.10.5 -lgcc -lSystem -v
>>>>
>>>> so the build in boehm-gc appears to be self-contained.
>>>
>>> OK- so it appears ...
>>> ... so why is ld complaining that there's non-PIC code present?
>>
>> Where do you see ld complaining of non-PIC code?
>
> OK.  Different problem - I recalled that there were [PIE] issues with ld 
> complaining.
>
> .. if  PIE is fundamentally incompatible with boehm-gc (is it??) - then, 
> right, we need to make sure it's off -
>
> -  presumably it's not affecting any other target - because they don't  
> do PIE unless told to ...
>
> Perhaps it would be better to adjust the spec that you made (and has  
> been applied) to ensure that -no_pie is passed to the linker  *unless*  
> pie is explicitly given on the c/l?
>

Iain,
   Isn't exactly opposite of your original preference for handling darwin11
(that we shouldn't degrade darwin11 by disabling its automatic use of PIE)?
Your suggestion would seem to do exactly that.
                Jack

> At present, you pass it when "no-pic, no-pie" etc. are - perhaps it  
> should just be the default and *only* switched on for -pie something  
> like....
>
>  %{!fpie: %{!PIE: %:version-compare(>= 10.7 mmacosx-version-min= - 
> no_pie) } }
>
> Otherwise, D11 is behaving differently from other targets for the whole 
> test-suite - not just boehm-gc.
>
> cheers
> Iain
>

Reply via email to