Message ID | c74ee720-05a0-4aa9-107e-66acfcc0f9f0@suse.cz |
---|---|
State | New |
Headers | show |
Hi Martin, > 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. >> >> I'm attaching the resulting assembly (although for Solaris as, the gas >> build is still running). > > Hi. Sorry, I have a stupid mistake in dtor priority > (I used 65534 instead of desired 99). Please try to test it on Solaris 12 > with the attached patch. I'll send the patch to ML soon. > > Can you please test whether it makes any change on a solaris target w/o > prioritized ctors/dtors? sure: I've added your patch to my source tree for the running bootstraps and will have builds on Solaris 12 (with constructor priority) and S10/11 (without) available in a few hours. Rainer
Hi Martin, > 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. >> >> I'm attaching the resulting assembly (although for Solaris as, the gas >> build is still running). > > Hi. Sorry, I have a stupid mistake in dtor priority > (I used 65534 instead of desired 99). Please try to test it on Solaris 12 > with the attached patch. I'll send the patch to ML soon. unfortunately, the patch makes no difference on Solaris 12. The test even FAILs when using gas/gld, which is a different/independent implementation of constructor priority. > Can you please test whether it makes any change on a solaris target w/o > prioritized ctors/dtors? It doesn't: the test PASSes on Solaris 10 and 11 with and without your patch. Rainer
On 10/03/2016 03:03 PM, Rainer Orth wrote: > Hi Martin, > >> 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. >>> >>> I'm attaching the resulting assembly (although for Solaris as, the gas >>> build is still running). >> >> Hi. Sorry, I have a stupid mistake in dtor priority >> (I used 65534 instead of desired 99). Please try to test it on Solaris 12 >> with the attached patch. I'll send the patch to ML soon. > > unfortunately, the patch makes no difference on Solaris 12. The test > even FAILs when using gas/gld, which is a different/independent > implementation of constructor priority. Ok, can you please send me x.S file for Solaris 12? > >> Can you please test whether it makes any change on a solaris target w/o >> prioritized ctors/dtors? > > It doesn't: the test PASSes on Solaris 10 and 11 with and without your > patch. I see, that would require the former approach using atexit, which would be chosen depending on whether target supports prioritized dtors or not. Martin > > Rainer >
diff --git a/gcc/coverage.c b/gcc/coverage.c index 0b8c0b3..a759831 100644 --- a/gcc/coverage.c +++ b/gcc/coverage.c @@ -1078,7 +1078,7 @@ build_gcov_exit_decl (void) append_to_statement_list (stmt, &dtor); /* Generate a destructor to run it (with priority 99). */ - cgraph_build_static_cdtor ('D', dtor, DEFAULT_INIT_PRIORITY - 1); + cgraph_build_static_cdtor ('D', dtor, MAX_RESERVED_INIT_PRIORITY - 1); } /* Create the gcov_info types and object. Generate the constructor