Backport fix for JDK-8014669 to JDK7

BILL PITTORE bill.pittore at oracle.com
Thu May 23 09:57:05 PDT 2013


Would like to backport the fix for 
https://jbs.oracle.com/bugs/browse/JDK-8014669, "arch specific flags not 
passed to some link commands" to JDK7. Same fix as for JDK8:

http://cr.openjdk.java.net/~bpittore/8014669/webrev.01/

thanks,
bill



On 5/15/2013 9:37 PM, BILL PITTORE wrote:
> I'm fine with these changes. I can commit if someone can do the push 
> if you think we need to get this in tonight.
>
> bill
>
> On 5/15/2013 8:43 PM, David Holmes wrote:
>> Hi Bill,
>>
>> On 16/05/2013 10:05 AM, David Holmes wrote:
>>> Hi Bill,
>>>
>>> (re-fixed the build-dev alias)
>>>
>>> On 16/05/2013 6:48 AM, BILL PITTORE wrote:
>>>> Some architecture dependent flags do not make it through to the
>>>> libjsig.so and libsaproc.so makefiles. As a result, the libs are not
>>>> compiled/linked with the correct flags for that particular variant. 
>>>> Fix
>>>> is to make sure EXTRA_CFLAGS propogates down correctly.
>>>>
>>>> http://cr.openjdk.java.net/~bpittore/8014669/webrev.00/
>>>
>>> I need to look closer at this. Passing all of the EXTRA_CFLAGS as link
>>> options seems wrong to me as they may not be valid linker options. That
>>> said I see that in this case we are actually using the C compiler to do
>>> the linking. But that said, in the saproc case we are also compiling C
>>> source files at the same time which means that EXTRA_CFLAGS is 
>>> needed on
>>> the main command line, not tucked onto the LD flags. And the 
>>> implication
>>> here is that cross-compilation of libsaproc has been broken all this
>>> time for any platform where the default gcc output would be wrong!
>>
>> Given in both cases we use CC to compile and link I think the more 
>> explicit solution here is to add EXTRA_CFLAGS as a primary argument 
>> to the $(CC) invocation  - see below.
>>
>> Thanks,
>> David
>>
>> diff -r 293b99787401 make/linux/makefiles/jsig.make
>> --- a/make/linux/makefiles/jsig.make
>> +++ b/make/linux/makefiles/jsig.make
>> @@ -54,7 +54,7 @@
>>  $(LIBJSIG): $(JSIGSRCDIR)/jsig.c $(LIBJSIG_MAPFILE)
>>         @echo Making signal interposition lib...
>>         $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) 
>> $(PICFLAG) \
>> -                         $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) -o $@ 
>> $< -ldl
>> +                         $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) 
>> $(EXTRA_CFLAGS) -o $@ $< -ldl
>>  ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
>>         $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJSIG_DEBUGINFO)
>>         $(QUIETLY) $(OBJCOPY) 
>> --add-gnu-debuglink=$(LIBJSIG_DEBUGINFO) $@
>> diff -r 293b99787401 make/linux/makefiles/saproc.make
>> --- a/make/linux/makefiles/saproc.make
>> +++ b/make/linux/makefiles/saproc.make
>> @@ -92,6 +92,7 @@
>> $(SASRCFILES)                                        \
>> $(SA_LFLAGS)                                         \
>> $(SA_DEBUG_CFLAGS)                                   \
>> + $(EXTRA_CFLAGS) \
>>                    -o 
>> $@                                                \
>>                    -lthread_db
>>  ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
>>
>
>




More information about the hotspot-dev mailing list