Looks good now! Thanks, Volker
On Tue, Dec 20, 2016 at 9:30 AM, Thomas Stüfe <[email protected]> wrote: > Hi guys, > > updated webrev: > http://cr.openjdk.java.net/~stuefe/webrevs/8171408-aix-TOC-overflow-when-linking-the-gtest-libjvm/webrev.01/webrev/ > > Only change is that I removed the offending filter-out expression. This > means that gtest modules are compiled with both -qpic followed by > -qpic=large, but the latter should take precedence, so it is ok. Also keeps > the makefile simple. > > Kind Regards, Thomas > > On Tue, Dec 20, 2016 at 9:21 AM, Thomas Stüfe <[email protected]> > wrote: >> >> Hi Erik, >> >> On Tue, Dec 20, 2016 at 9:17 AM, Erik Joelsson <[email protected]> >> wrote: >>> >>> Hello, >>> >>> I understand why you want to filter out the -qpic flag from the general >>> JVM_CFLAGS, but that kind of logic is brittle so we try to avoid it unless >>> absolutely necessary. I prefer to just rely on the tools treating command >>> line options as the last one takes precedence. I assume the AIX compiler >>> behaves that way too and that a -qpic=large will override a -qpic earlier on >>> the command line. We have consciously designed SetupNativeCompilation to add >>> all the *FLAGS in the order of most specific flags last for this reason. >>> >> >> You are right, and Volker just complained about the same thing :) I'll >> post an updated ref where I just rely on qpic=large following qpic. I was >> not happy with that filter-out expression either. >> >> ..Thomas >> >>> >>> So, could you try removing the filtering and see if it still works? >>> >>> /Erik >>> >>> >>> >>> On 2016-12-18 13:50, Thomas Stüfe wrote: >>>> >>>> Hi all, >>>> >>>> please take a look at this small fix. In short, on AIX when linking the >>>> gtest version of libjvm.so, the TOC overflows. >>>> >>>> So the gtest libjvm.so must be linked with -bbigtoc, in contrast to the >>>> regular libjvm.so, which has no problems and can keep using a small TOC. >>>> >>>> Also, I compile all gtest objects with -qpic=large. Note that this only >>>> affects the gtest objects. The regular objects - which the gtest >>>> libjvm.so >>>> shares with the regular libjvm.so - I left at -qpic[=small]. This means >>>> we >>>> pay a bit of a performance overhead in the gtest libjvm.so but leave the >>>> regular libjvm.so at its optimal linker settings. >>>> >>>> Issue: >>>> https://bugs.openjdk.java.net/browse/JDK-8171408 >>>> >>>> Webrev: >>>> >>>> http://cr.openjdk.java.net/~stuefe/webrevs/8171408-aix-TOC-overflow-when-linking-the-gtest-libjvm/webrev.00/ >>>> >>>> (Hope the webrev link works, the webserver is still down). >>>> >>>> Kind Regards, Thomas >>> >>> >> >
