[OpenJDK 2D-Dev] RFR: 8056213 : Clean up unix/native/common/sun/awt

Erik Joelsson erik.joelsson at oracle.com
Thu Sep 11 08:56:32 UTC 2014


This looks good to me.

/Erik

On 2014-09-10 23:10, Phil Race wrote:
> Updated webrev :- http://cr.openjdk.java.net/~prr/8056213.1/
>
> -phil.
>
> On 09/10/2014 01:28 PM, Phil Race wrote:
>> I now see InitIDs.m defines  more stubs than initIDs.c since
>> 1) some stubs for xawt are instead defined in XToolkit.c
>> 2) some xawt cases (eg Button) have more than an empty stub - actual 
>> content.
>> 3) Some aren't defined at all in the case you have headless awt but
>> they can't be reached because of checks in the classes for headless
>>
>> So I'll leave the OS X files alone
>>
>> -phil.
>>
>>
>> On 09/10/2014 12:37 PM, Phil Race wrote:
>>> > That means that instead of having to add even more excludes, you 
>>> can delete some existing
>>>
>>>
>>> Doing that leaves just this one :-
>>>
>>> ifeq ($(OPENJDK_TARGET_OS), macosx)
>>>   LIBAWT_EXFILES += initIDs.c sun/awt/image/cvutils/img_colors.c
>>> endif
>>>
>>> So its actually excluded from the core libawt on OS X.
>>> It seems that instead they are defined there in libawt_lwawt
>>> in a file initIDs.m
>>>
>>> This might be necessary if they do something but it seems
>>> they are the same stubs used elsewhere and initIDs.h is no
>>> more than a GPL header with no content !
>>>
>>> Its going to be a bit more work and testing but it seems like we could
>>> scrap the lwawt Objectionable C versions and just used the
>>> shared one.
>>>
>>> I don't believe the mapfiles are used on OSX (there isn't
>>> even a map file directory for lwawt) so it hasn't
>>> mattered that they were in a different DLL, so long as they
>>> were loaded in time.
>>>
>>> -phil.
>>>
>>>
>>> On 09/10/2014 01:12 AM, Magnus Ihse Bursie wrote:
>>>> On 2014-09-09 23:17, Phil Race wrote:
>>>>> After looking at the issues in the bug report below I think the only
>>>>> think that must be fixed is the unnecessary inclusion of initIDS.c 
>>>>> in libawt_xawt.so
>>>>
>>>> You are correct indeed. I had missed the fact that awt_Font.c, 
>>>> fontpath.c and X11Color.c was included in libawt_headless. :-(
>>>>
>>>>>
>>>>> https://bugs.openjdk.java.net/browse/JDK-8056213
>>>>> http://cr.openjdk.java.net/~prr/8056213/
>>>>
>>>> Since initIDs.c are now only used in a single library, I think it 
>>>> is better to move it away from the "common" directory, into 
>>>> src/java.desktop/unix/native/libawt/sun/awt where it will get 
>>>> picked up automatically, but just for libawt. That means that 
>>>> instead of having to add even more excludes, you can delete some 
>>>> existing, like this:
>>>>
>>>> diff --git a/make/lib/Awt2dLibraries.gmk b/make/lib/Awt2dLibraries.gmk
>>>> --- a/make/lib/Awt2dLibraries.gmk
>>>> +++ b/make/lib/Awt2dLibraries.gmk
>>>> @@ -748,7 +748,6 @@
>>>> -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libsunwjdga/ 
>>>> \
>>>>          $(LIBJAVA_HEADER_FLAGS) \
>>>>          #
>>>> -    LIBAWT_HEADLESS_EXFILES := initIDs.c
>>>>
>>>>      LIBAWT_HEADLESS_REORDER :=
>>>>      ifeq ($(OPENJDK_TARGET_OS), solaris)
>>>> @@ -761,7 +760,6 @@
>>>>          LIBRARY := awt_headless, \
>>>>          OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
>>>>          SRC := $(LIBAWT_HEADLESS_DIRS), \
>>>> -        EXCLUDE_FILES := $(LIBAWT_HEADLESS_EXFILES), \
>>>>          EXCLUDES := $(LIBAWT_HEADLESS_EXCLUDES), \
>>>>          LANG := C, \
>>>>          OPTIMIZATION := LOW, \
>>>> @@ -932,7 +930,7 @@
>>>>        $(LIBJAVA_HEADER_FLAGS) \
>>>>        #
>>>>
>>>> -  LIBAWT_LWAWT_EXFILES := fontpath.c awt_Font.c X11Color.c initIDs.c
>>>> +  LIBAWT_LWAWT_EXFILES := fontpath.c awt_Font.c X11Color.c
>>>>    LIBAWT_LWAWT_EXCLUDES := 
>>>> $(JDK_TOPDIR)/src/java.desktop/unix/native/common/sun/awt/medialib
>>>>
>>>>    $(eval $(call SetupNativeCompilation,BUILD_LIBAWT_LWAWT, \
>>>>
>>>>
>>>> /Magnus
>>>
>>
>




More information about the build-dev mailing list