Hi Phil,

thank you for looking at the changes. Please find my answers inline:


On Thu, Sep 19, 2013 at 12:22 AM, Phil Race <philip.r...@oracle.com> wrote:

> Volker,
>
> I've skimmed the client related changes - mostly based on the descriptions.
> I'll look in more detail as soon as I can after JavaOne. We also have some
> engineers out on vacation who might want to look at these too.
>
> A couple of things that stood out :
> "On AIX, fontconfig is not a standard package supported by IBM."
> I am surprised AIX does not support fontconfig.
> That is something IBM should reconsider as its hard to imagine
> a modern Unix based system working without it ..
>

I totally agree, but this is an OpenJDK port not a AIX renovation:)

That said, IBM offers fontconfig packages from a special "AIX Toolbox for
Linux Applications" OpenSource site. But these OpenSource packages are not
supported and users have to install them manually (i.e. they are not part
of the standard installation images and you can not rely on them beeing
installed).


>
> Very basic start for AIX -  feel free to complete ..
>  169  */
>  170 static char *fullAixFontPath[] = {
> ...
>

I'd really like to see it completed but these days
> that's largely a fall back for no fontconfig.
>
>
Again, this can get quite complicated and AIX-version dependent. I think
the provided list is a good starting point.


> /* AIX does not provide the 'dladdr' function. But fortunately, we've
>   42  * already implemented it in the HotSpot, because we need it there as
>   43  * well (see hotspot/src/os/aix/vm/porting_**aix.{hpp,cpp}).
>
> Whilst this is in "ifdef AIX" this reliance on an exported hotspot
> function sounds hacky. What actual requirement is there that the
> AIX class libraries be so tightly-coupled with that VM?
> There is no contract there.
>
>
You're right, there is no contract. It's just pragmatic solution and I
think it should always work because the libjvm will always be loaded at the
point in AWT where it is used. Another solution would be to re-implement
the functionality in the class library and I don't like code duplication
either.


> -phil.
>
>
>
>
> On 9/16/2013 12:30 PM, Volker Simonis wrote:
>
>> Resending this to more lists as requested by Alan Bateman with the kind
>> request to anybody to review the parts for which he feels responsible:)
>>
>> For those not up to date, this change is part of the ongoing PowerPC/AIX
>> Porting Project:
>> http://openjdk.java.net/**projects/ppc-aix-port<http://openjdk.java.net/projects/ppc-aix-port>
>> https://wiki.openjdk.java.net/**display/PPCAIXPort<https://wiki.openjdk.java.net/display/PPCAIXPort>
>> http://openjdk.java.net/jeps/**175 <http://openjdk.java.net/jeps/175>
>>
>> Please send reviews to all currently included recipients.
>>
>> Thank you and best regards,
>> Volker
>>
>>
>> ---------- Forwarded message ----------
>> From: *Volker Simonis*
>> Date: Monday, September 16, 2013
>> Subject: RFR(L): 8024854: Basic changes and files to build the class
>> library on AIX
>> To: 
>> "ppc-aix-port-dev@openjdk.**java.net<ppc-aix-port-...@openjdk.java.net><mailto:
>> ppc-aix-port-dev@**openjdk.java.net <ppc-aix-port-...@openjdk.java.net>>"
>> <ppc-aix-port-dev@openjdk.**java.net 
>> <ppc-aix-port-...@openjdk.java.net><mailto:
>> ppc-aix-port-dev@**openjdk.java.net <ppc-aix-port-...@openjdk.java.net>>>,
>> Java Core Libs 
>> <core-libs-...@openjdk.java.**net<core-libs-dev@openjdk.java.net><mailto:
>> core-libs-dev@openjdk.**java.net <core-libs-dev@openjdk.java.net>>>
>>
>>
>>         Hi,
>>
>> could you please review the following webrev which contains the basic
>> changes and files needed in the 'jdk' repository in order to build the
>> OpenJDK on AIX:
>>
>> http://cr.openjdk.java.net/~**simonis/webrevs/8024854<http://cr.openjdk.java.net/~simonis/webrevs/8024854><
>> http://cr.openjdk.java.net/%**7Esimonis/webrevs/8024854<http://cr.openjdk.java.net/%7Esimonis/webrevs/8024854>
>> >
>>
>> This change together with "8024265: Enable new build on AIX (jdk part) <
>> http://cr.openjdk.java.net/%**7Esimonis/webrevs/8024265_jdk/<http://cr.openjdk.java.net/%7Esimonis/webrevs/8024265_jdk/>
>> **>" allows it to configure and completely build the staging repository
>> on AIX 5.3 and 7.1 with the following command:
>>
>>
>> configure --with-boot-jdk=<jdk-image> --with-jvm-variants=core
>> --with-jvm-interpreter=cpp --with-cups-include=/opt/**freeware/include
>> --x-includes=/opt/freeware/**include
>>
>> Below you can find the changes and additions I've done, sorted by file.
>> Most of them are just additions which are only active during the AIX build
>> anyway or simple changes where AIX has been added to conditions which
>> already check for Linux and/or Solaris. The files with the biggest changes
>> which you're probably want to look on more thoroughly are
>> 'src/solaris/native/java/net/**NetworkInterface.c' and
>> 'src/solaris/native/sun/nio/**ch/Net.c' altough they shouldn't change
>> anything on the current OpenJDK platforms as well.
>>
>> Notice that there are still some files and some functionality missing
>> from the current change (notably NIO) but it still yields a running JDK
>> which can execute "HelloWorld" on the command line and as AWT application.
>> I've intentionally tried to keep this initial change as simple as possible
>> (with respect tot shared changes) in order to get it reviewed as fast as
>> possible. The missing parts can then be added later on, grouped by logical
>> topics, to simplify the review process.
>>
>> Thank you and best regards,
>>
>> Volker
>>
>>
>>         src/share/bin/jli_util.h
>>
>>   * Define |JLI_Lseek| on AIX.
>>
>>
>>         src/share/lib/security/java.**security-aix
>>
>>   * Provide default |java.security-aix| for AIX.
>>
>>
>>         src/share/native/sun/awt/**medialib/mlib_sys.c
>>
>>   * |malloc| always returns 8-byte aligned pointers on AIX as well.
>>
>>
>>         src/share/native/sun/awt/**medialib/mlib_types.h
>>
>>   * Add AIX to the list of known platforms.
>>
>>
>>         src/share/native/sun/font/**layout/KernTable.cpp
>>
>>   * Rename the macro |DEBUG| to |DEBUG_KERN_TABLE| because |DEBUG| is
>>
>>     too common and may be defined in other headers as well as on the
>>     command line and |xlc| bails out on macro redefinitions with a
>>     different value.
>>
>>
>>         src/share/native/sun/security/**ec/impl/ecc_impl.h
>>
>>   * Define required types and macros on AIX.
>>
>>
>>         src/solaris/back/exec_md.c
>>
>>   * AIX behaves like Linux in this case so check for it in the Linux
>>     branch.
>>
>>
>>         src/solaris/bin/java_md_**solinux.c,
>>         src/solaris/bin/java_md_**solinux.h
>>
>>   * On AIX |LD_LIBRARY_PATH| is called |LIBPATH|
>>   * Always use |LD_LIBRARY_PATH| macro instead of using the string
>>
>>     "|LD_LIBRARY_PATH|" directly to cope with different library path
>>     names.
>>   * Add |jre/lib/<arch>/jli| to the standard library search path on
>>
>>     AIX because the AIX linker doesn't support the |-rpath| option.
>>   * Replace |#ifdef __linux__| by |#ifndef __solaris__| because in
>>
>>     this case, AIX behaves like Linux.
>>
>>
>>         src/solaris/classes/sun/awt/**fontconfigs/aix.fontconfig.**
>> properties
>>
>>   * Provide basic |fontconfig.properties|for AIX.
>>
>>
>>         src/solaris/classes/java/lang/**UNIXProcess.java.aix,
>>         src/solaris/classes/sun/tools/**attach/AixAttachProvider.java,
>>         src/solaris/classes/sun/tools/**attach/AixVirtualMachine.java
>>
>>   * Provide AIX specific Java versions, mostly based on the
>>     corresponding Linux versions.
>>
>>
>>         src/solaris/demo/jvmti/hprof/**hprof_md.c
>>
>>   * Add AIX support. AIX mostly behaves like Linux, with the one
>>
>>     exception that it has no |dladdr| functionality.
>>   * Implement |dladdr| functionality for AIX.
>>
>>
>>         src/solaris/native/com/sun/**management/**
>> UnixOperatingSystem_md.c
>>
>>   * Adapt for AIX (i.e. use |libperfstat| on AIX to query OS memory).
>>
>>
>>         src/solaris/native/common/jdk_**util_md.h
>>
>>   * Add AIX definitions of the |ISNANF| and |ISNAND| macros.
>>
>>
>>         src/solaris/native/java/io/io_**util_md.c
>>
>>   * AIX behaves like Linux in this case so check for it in the Linux
>>     branch.
>>
>>
>>         src/solaris/native/java/net/**NetworkInterface.c
>>
>>   * Add AIX support into the Linux branch because AIX mostly behaves
>>     like AIX for IPv4.
>>   * AIX needs a special function to enumerate IPv6 interfaces and to
>>
>>     query the MAC address.
>>
>>
>>         src/solaris/native/java/net/**PlainSocketImpl.c
>>
>>   * On AIX (like on Solaris) |setsockopt| will set errno to |EINVAL|
>>
>>     if the socket is closed. The default error message is then confusing.
>>
>>
>>         src/solaris/native/java/net/**linux_close.c,
>>         src/share/native/java/net/net_**util.c
>>
>>   * Also use the file and socket wrappers on AIX.
>>   * Add initialization of some previously uninitialized data structures.
>>   * On AIX we don't have |__attribute((constructor))| so we need to
>>
>>     initialize manually (from |JNI_OnLoad()| in
>>     'src/share/native/java/net/**net_util.c'
>>
>>
>>         src/solaris/native/java/net/**net_util_md.h
>>
>>   * AIX needs the same workaround for I/O cancellation like Linux and
>>     MacOSX.
>>
>>
>>         src/solaris/native/java/util/**TimeZone_md.c
>>
>>   * Currently on AIX the only way to get the platform time zone is to
>>
>>     read it from the |TZ| environment variable.
>>
>>
>>         src/solaris/native/sun/awt/**awt_LoadLibrary.c
>>
>>   * There's no |dladdr| on AIX, but we can use the implementation from
>>
>>     the HotSpot in this case because |libjvm.so| will be always loaded
>>     before the AWT.
>>
>>
>>         src/solaris/native/sun/awt/**fontpath.c
>>
>>   * Add AIX specific fontpath settings and library search paths for
>>     |libfontconfig.so|.
>>
>>
>>         src/solaris/native/sun/java2d/**x11/X11SurfaceData.c
>>
>>   * Only define |MIN| and |MAX| if they're not already defined because
>>
>>     xlc on AIX fails on macro redefinitions.
>>
>>
>>         src/solaris/native/sun/java2d/**x11/XRBackendNative.c
>>
>>   * Handle AIX like Solaris.
>>
>>
>>         src/solaris/native/sun/nio/ch/**Net.c
>>
>>   * Add AIX-specific includes and constant definitions.
>>   * On AIX "socket extensions for multicast source filters" support
>>
>>     depends on the OS version. Check for this and throw appropriate
>>     exceptions if it requested but not supported. This is needed to
>>     pass
>>     JCK-api/java_nio/channels/**DatagramChannel/**
>> DatagramChannel.html#Multicast
>>
>>
>>         src/solaris/native/sun/**security/pkcs11/j2secmod_md.c
>>
>>   * Use |RTLD_LAZY| instead of |RTLD_NOLOAD| on AIX.
>>
>>
>>         src/solaris/native/sun/tools/**attach/AixVirtualMachine.c
>>
>>   * AIX version mostly derived from the corresponding Linux version.
>>
>>
>>
>

Reply via email to