On 10/13/2016 03:46 PM, Rainer Orth wrote:
> Hi Martin,
> sorry for the long delay: I've been extremely busy the last two weeks.
Never mind, still plenty of time before we'll release 7.1.0 :)
>> On 09/30/2016 02:31 PM, Rainer Orth wrote:
>>> this would be i386-pc-solaris2.12. I'm not sure if the constructor
>>> priority detection works in a cross scenario.
>> By the way, I tried to test the cross-compiler:
>> $ ../configure --disable-bootstrap --enable-languages=c,c++,fortran
>> --enable-valgrind-annotations --prefix=/home/marxin/bin/gcc2
>> --disable-multilib --disable-libsanitizer --target=i386-pc-solaris2.12
>> and I get for:
>> cat /tmp/priority.c
>> void __attribute__ ((constructor(150))) foo()
>> void __attribute__ ((constructor(151))) bar()
>> int main()
>> return 0;
>> $ ./xgcc -B. /tmp/priority.c -fprofile-generate -S
>> /tmp/priority.c:2:1: error: constructor priorities are not supported
>> /tmp/priority.c:6:1: error: constructor priorities are not supported
>> I guess even cross compiler should detect whether the target supports
>> ctor/dtor priorities.
> maybe it could, but right now acinclude.m4 (gcc_AC_INITFINI_ARRAY) has
> this for crosses:
> AC_MSG_CHECKING(cross compile... guessing)
> You could work around this by overriding configure with
Good, I've just done that.
>> May I ask you for assembly file of a native compiler with the suggested
> Sure: this time from an i386-pc-solaris2.12 compiler configured to use
> gas and ld.
Just running my previous example (priotity.c), I can see with -S:
.size _GLOBAL__sub_D_00099_1_foo, .-_GLOBAL__sub_D_00099_1_foo
.type .LPBX1, @object
.size .LPBX1, 12
Which looks good. I guess the sent snippet is before r240857, where I fixed the
priority to 99. Can you please test it with current trunk?