jdk/src/solaris - time to re-visit it?
philip.race at oracle.com
Tue Nov 29 19:34:06 UTC 2011
* 95%+ of the code will be the same across solaris/linux/etc
And remember this includes all the X11 code.
* Of the remaining 5%, most of it is best dealt with via ifdef
because its a few line delta in a large file.
I'd guess 2% of the code might merit a separate source file.
So whilst these may exist in ports that doesn't mean they should all exist
in mainline. I suggest to keep src/solaris (for historical reasons) as
meaing "src shared across the unix/X11 family" and others in mainline
only for the core supported platforms, which will add macosx in JDK 8,
largely because of client code differences
Ports would add their own platform dir if they need to, or add ifdefs in src/solaris
if that's easier.
On 11/29/2011 8:36 AM, Steve Poole wrote:
> On Mon, 2011-11-28 at 17:20 +0100, Fredrik Öhrström wrote:
>> 2011-11-28 16:46, Ulf Zibis skrev:
>>> I guess you meant:
>>> | |--solaris
>>> | |--aix
>>> | |--linux
>>> | |
>>> against current ...
>> The directory structure ought to be more flat than
>> the possible combinations that form a product.
>> For example if:
>> HOST_API = posix winapi
>> HOST_OS = solaris aix gnu linux darwin freebsd windows wince
>> HOST_OS_PEDIGREE = SYSV GNU BSD
>> then the directories are stored flat under src:
> I think that make sense. This is one of these discussions in which there
> is no simple answer. Trying to architect a directory structure to match
> all the possible combinations (now and for the future) is likely just to
> make things even more complicated.
> This approach is simple and makes it easy for new platforms to just drop
>> Then, when compiling, the union of the directories and files below
>> the selected src subdirectories, form the source of the product.
>> For example:
>> This gives less confusion about which subdirs to src/posix
>> are configuration directories, and which are posix directories with code.
> I do like this approach -especially if the union of directories per
> platform is well documented and visible. That would really help
> understand the impact when someone has to change a file in one of these
More information about the build-dev