Port-powerpc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/gnu



Are you guys actively working on the rs6000 port?  Can I help?

Regards,
Kevin

On Fri, Feb 25, 2011 at 3:40 PM, Matt Thomas <matt%3am-software.com@localhost> 
wrote:
>
> On Feb 24, 2011, at 5:15 PM, riz%netbsd.org@localhost wrote:
>
>> On Thu, Feb 10, 2011 at 07:18:30AM +0000, Matt Thomas wrote:
>>> Module Name: src
>>> Committed By:        matt
>>> Date:                Thu Feb 10 07:18:29 UTC 2011
>>>
>>> Modified Files:
>>>      src/gnu/dist/gcc4/gcc: config.gcc
>>>      src/gnu/dist/gcc4/gcc/config/rs6000: netbsd.h
>>>      src/gnu/usr.bin/gcc4/arch/powerpc: tm.h
>>>
>>> Log Message:
>>> Default NetBSD to -msecure-plt now.
>>>
>>>
>>> To generate a diff of this commit:
>>> cvs rdiff -u -r1.21 -r1.22 src/gnu/dist/gcc4/gcc/config.gcc
>>> cvs rdiff -u -r1.4 -r1.5 src/gnu/dist/gcc4/gcc/config/rs6000/netbsd.h
>>> cvs rdiff -u -r1.4 -r1.5 src/gnu/usr.bin/gcc4/arch/powerpc/tm.h
>>>
>>> Please note that diffs are not public domain; they are subject to the
>>> copyright notices on the relevant files.
>>>
>>
>> I just identified this change as the one that's preventing the building of
>> shared libs which work on my macppc.  The problem was identified by pooka
>> while troubleshooting some rump stuff on one of my systems;  on a system
>> built with this change, one of the tests in /usr/tests/toolchain/cc fails.
>> When the system is built without -msecure-plt the default, it succeeds.
>>
>> The test creates two src files, building one as a shared lib:
>>
>> cat > test.c << EOF
>> #include <stdlib.h>
>> int main(void) {callpic();exit(0);}
>> EOF
>>        cat > pic.c << EOF
>> #include <stdio.h>
>> int callpic(void) {printf("hello world\n");}
>> EOF
>>
>> Then:
>>            cc -fPIC -dPIC -shared -o libtest.so pic.c
>>            cc -o hello test.c -L. -ltest
>>
>> env LD_LIBRARY_PATH=. ./hello
>>
>> ...which segfaults if the toolchain was built with -msecure-plt.
>>
>> Thoughts?
>
> This is a build issue but I don't know how to fix that.  So I checked
> in a workaround in rs6000/netbsd.h which causes the right thing to
> happen.
>
> When the "native" compiler is built, the host programs aren't getting
> all right config defines set up right.  This causes all the patterns
> for TARGET_SECURE_PLT to get dropped and so the compiler was emitting
> bad code.
>


Home | Main Index | Thread Index | Old Index