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.

Hi.

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.
May I ask you for assembly file of a native compiler with the suggested patch?

Thanks,
Martin

Reply via email to