Why are hotspot tests not always linked with libc?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Why are hotspot tests not always linked with libc?

David Holmes
In make/test/JtregNativeHotspot.gmk we have this ever expanding list:

ifeq ($(TOOLCHAIN_TYPE), solstudio)
     BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_liboverflow := -lc
     BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libSimpleClassFileLoadHook := -lc
     BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libGetOwnedMonitorInfoTest := -lc
     BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libGetNamedModuleTest := -lc
     BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libIsModifiableModuleTest := -lc
     BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libAddModuleReadsTest := -lc
 
BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libAddModuleExportsAndOpensTest := -lc
 
BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libAddModuleUsesAndProvidesTest := -lc
     BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libMAAClassFileLoadHook := -lc
     BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libMAAClassLoadPrepare := -lc
     BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libMAAThreadStart := -lc
     BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libAllowedFunctions := -lc
     BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libRedefineDoubleDelete := -lc
     BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libHandshakeTransitionTest := -lc
     BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libHasNoEntryPoint := -lc
     BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libReturnError := -lc
endif

Why do we need to do this instead of always linking in the basic libraries?

We're investigating a test-image build failure on Solaris x64 slowdebug
that seems to be caused by implicit use of functions in libc.

Thanks,
David
Reply | Threaded
Open this post in threaded view
|

Re: Why are hotspot tests not always linked with libc?

Erik Joelsson
I agree that it should just always be added automatically when linking
with solstudio.

/Erik


On 2017-12-12 22:16, David Holmes wrote:

> In make/test/JtregNativeHotspot.gmk we have this ever expanding list:
>
> ifeq ($(TOOLCHAIN_TYPE), solstudio)
>     BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_liboverflow := -lc
>     BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libSimpleClassFileLoadHook := -lc
>     BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libGetOwnedMonitorInfoTest := -lc
>     BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libGetNamedModuleTest := -lc
>     BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libIsModifiableModuleTest := -lc
>     BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libAddModuleReadsTest := -lc
>
> BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libAddModuleExportsAndOpensTest
> := -lc
>
> BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libAddModuleUsesAndProvidesTest
> := -lc
>     BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libMAAClassFileLoadHook := -lc
>     BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libMAAClassLoadPrepare := -lc
>     BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libMAAThreadStart := -lc
>     BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libAllowedFunctions := -lc
>     BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libRedefineDoubleDelete := -lc
>     BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libHandshakeTransitionTest := -lc
>     BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libHasNoEntryPoint := -lc
>     BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libReturnError := -lc
> endif
>
> Why do we need to do this instead of always linking in the basic
> libraries?
>
> We're investigating a test-image build failure on Solaris x64
> slowdebug that seems to be caused by implicit use of functions in libc.
>
> Thanks,
> David

Reply | Threaded
Open this post in threaded view
|

Re: Why are hotspot tests not always linked with libc?

Magnus Ihse Bursie
On 2017-12-13 09:59, Erik Joelsson wrote:
> I agree that it should just always be added automatically when linking
> with solstudio.
Agree. In fact, some of the common libraries, like pthread, that is not
likely to cause problems if linked but not used, could probably be added
as well to all libraries, so we can minimize the number of test specific
CFLAGS/LIBS.

/Magnus

>
> /Erik
>
>
> On 2017-12-12 22:16, David Holmes wrote:
>> In make/test/JtregNativeHotspot.gmk we have this ever expanding list:
>>
>> ifeq ($(TOOLCHAIN_TYPE), solstudio)
>>     BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_liboverflow := -lc
>> BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libSimpleClassFileLoadHook := -lc
>> BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libGetOwnedMonitorInfoTest := -lc
>>     BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libGetNamedModuleTest := -lc
>>     BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libIsModifiableModuleTest := -lc
>>     BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libAddModuleReadsTest := -lc
>>
>> BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libAddModuleExportsAndOpensTest
>> := -lc
>>
>> BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libAddModuleUsesAndProvidesTest
>> := -lc
>>     BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libMAAClassFileLoadHook := -lc
>>     BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libMAAClassLoadPrepare := -lc
>>     BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libMAAThreadStart := -lc
>>     BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libAllowedFunctions := -lc
>>     BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libRedefineDoubleDelete := -lc
>> BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libHandshakeTransitionTest := -lc
>>     BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libHasNoEntryPoint := -lc
>>     BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libReturnError := -lc
>> endif
>>
>> Why do we need to do this instead of always linking in the basic
>> libraries?
>>
>> We're investigating a test-image build failure on Solaris x64
>> slowdebug that seems to be caused by implicit use of functions in libc.
>>
>> Thanks,
>> David
>