Re: RFR: JDK-8170632 Stop modifying VERSION_OPT for adhoc builds on reconfigure

2016-12-01 Thread David Holmes

On 2/12/2016 8:39 AM, Magnus Ihse Bursie wrote:

Our current default is to create a version-opt string on the format
'..' during configure.

The problem with this is that each time the configure script has change,
a reconfigure is triggered. This will create a new version-opt, and
hence a new version string. This in turn will trigger a rebuild of
hotspot and java.base, and that in turn rebuilds the whole world.


Surely after a reconfigure you _have_ to rebuild the world? It even 
warns you to do a clean after a reconfigure.


David
-


It does not have to be like that. In fact, storing the time stamp of the
last configure, rather than the time stamp of the last build is rather
silly anyhow.

In a perfect world we could just update the version-opt string and have
this resulting in an extremely short rebuild time. Unfortunately, we do
not live in a perfect world, and here it makes more sense to drop the
timestamp.

Note that this only affects adhoc (developer) builds.

Bug: https://bugs.openjdk.java.net/browse/JDK-8170632

Patch inline:
diff --git a/common/autoconf/jdk-version.m4
b/common/autoconf/jdk-version.m4
--- a/common/autoconf/jdk-version.m4
+++ b/common/autoconf/jdk-version.m4
@@ -160,11 +160,10 @@
 fi
   else
 if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
-  # Default is to calculate a string like this
..
-  timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
+  # Default is to calculate a string like this
'adhoc..'
   # Outer [ ] to quote m4.
   [ basedirname=`$BASENAME "$TOPDIR" | $TR -d -c
'[a-z][A-Z][0-9].-'` ]
-  VERSION_OPT="$timestamp.$USERNAME.$basedirname"
+  VERSION_OPT="adhoc.$USERNAME.$basedirname"
 fi
   fi

/Magnus


RFR: JDK-8170632 Stop modifying VERSION_OPT for adhoc builds on reconfigure

2016-12-01 Thread Magnus Ihse Bursie
Our current default is to create a version-opt string on the format 
'..' during configure.


The problem with this is that each time the configure script has change, 
a reconfigure is triggered. This will create a new version-opt, and 
hence a new version string. This in turn will trigger a rebuild of 
hotspot and java.base, and that in turn rebuilds the whole world.


It does not have to be like that. In fact, storing the time stamp of the 
last configure, rather than the time stamp of the last build is rather 
silly anyhow.


In a perfect world we could just update the version-opt string and have 
this resulting in an extremely short rebuild time. Unfortunately, we do 
not live in a perfect world, and here it makes more sense to drop the 
timestamp.


Note that this only affects adhoc (developer) builds.

Bug: https://bugs.openjdk.java.net/browse/JDK-8170632

Patch inline:
diff --git a/common/autoconf/jdk-version.m4 b/common/autoconf/jdk-version.m4
--- a/common/autoconf/jdk-version.m4
+++ b/common/autoconf/jdk-version.m4
@@ -160,11 +160,10 @@
 fi
   else
 if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
-  # Default is to calculate a string like this 
..

-  timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
+  # Default is to calculate a string like this 
'adhoc..'

   # Outer [ ] to quote m4.
   [ basedirname=`$BASENAME "$TOPDIR" | $TR -d -c 
'[a-z][A-Z][0-9].-'` ]

-  VERSION_OPT="$timestamp.$USERNAME.$basedirname"
+  VERSION_OPT="adhoc.$USERNAME.$basedirname"
 fi
   fi

/Magnus


Re: RFR: JDK-8056215 AWT source dirs should only point to java2d, not below

2016-12-01 Thread Erik Joelsson

Looks good.

/Erik


On 2016-12-01 12:42, Magnus Ihse Bursie wrote:

On 2016-11-28 11:01, Erik Joelsson wrote:
It looks like this will result in the same files being built, but 
just to be sure, have you verified the result to be equal?
I thought I had done that, but it turned out I used an incorrect 
command line so I didn't verify anything. A proper verification made 
some problems with include files surface. I have now fixed them, and 
verified-honest-to-god that it is correct. :)


New webrev: 
http://cr.openjdk.java.net/~ihse/JDK-8056215-cleanup-awt-src-dirs/webrev.02


I have sorted the include files fully according to the principle: 
, , .


/Magnus



/Erik


On 2016-11-28 10:47, Magnus Ihse Bursie wrote:
This is from a code review following the jigsaw source file 
restructuring:


* The makefiles include too specific directories. Instead of 
including e.g. ./*/native/common/sun/java2d/opengl and 
./*/native/common/sun/java2d/x11, we should just include 
./*/native/common/sun/java2d. This level corresponds to a logical 
grouping of the source code, and not the directory structure in that 
grouping.


Bug: https://bugs.openjdk.java.net/browse/JDK-8056215
WebRev: 
http://cr.openjdk.java.net/~ihse/JDK-8056215-cleanup-awt-src-dirs/webrev.01


/Magnus








Re: RFR: JDK-8056215 AWT source dirs should only point to java2d, not below

2016-12-01 Thread Magnus Ihse Bursie

On 2016-11-28 11:01, Erik Joelsson wrote:
It looks like this will result in the same files being built, but just 
to be sure, have you verified the result to be equal?
I thought I had done that, but it turned out I used an incorrect command 
line so I didn't verify anything. A proper verification made some 
problems with include files surface. I have now fixed them, and 
verified-honest-to-god that it is correct. :)


New webrev: 
http://cr.openjdk.java.net/~ihse/JDK-8056215-cleanup-awt-src-dirs/webrev.02


I have sorted the include files fully according to the principle: lib>, , .


/Magnus



/Erik


On 2016-11-28 10:47, Magnus Ihse Bursie wrote:
This is from a code review following the jigsaw source file 
restructuring:


* The makefiles include too specific directories. Instead of 
including e.g. ./*/native/common/sun/java2d/opengl and 
./*/native/common/sun/java2d/x11, we should just include 
./*/native/common/sun/java2d. This level corresponds to a logical 
grouping of the source code, and not the directory structure in that 
grouping.


Bug: https://bugs.openjdk.java.net/browse/JDK-8056215
WebRev: 
http://cr.openjdk.java.net/~ihse/JDK-8056215-cleanup-awt-src-dirs/webrev.01


/Magnus






Re: RFR: JDK-8170576 Silence error message in compare.sh when selecting images

2016-12-01 Thread Erik Joelsson

Looks good

/Erik


On 2016-12-01 09:31, Magnus Ihse Bursie wrote:
If compare.sh does not find any images, as the last test it will look 
for licensee-src, using $(ls .../*/...). If this does not match any 
directories, ls will write an error message to stderr which will leak 
through.


Bug: https://bugs.openjdk.java.net/browse/JDK-8170576
Patch inline:
diff --git a/common/bin/compare.sh b/common/bin/compare.sh
--- a/common/bin/compare.sh
+++ b/common/bin/compare.sh
@@ -1295,8 +1295,8 @@
 OTHER_JDK="$OTHER/images/jdk"
 OTHER_JRE="$OTHER/images/jre"
 echo "Selecting jdk images for compare"
-elif [ -d "$(ls -d $THIS/licensee-src/build/*/images/jdk)" ] \
-&& [ -d "$(ls -d $OTHER/licensee-src/build/*/images/jdk)" ]
+elif [ -d "$(ls -d $THIS/licensee-src/build/*/images/jdk 2> 
/dev/null)" ] \
+&& [ -d "$(ls -d $OTHER/licensee-src/build/*/images/jdk 2> 
/dev/null)" ]

 then
 echo "Selecting licensee images for compare"
 # Simply override the THIS and OTHER dir with the build dir from

/Magnus





Re: RFR: JDK-8164304: JDK should build with Oracle Developer Studio

2016-12-01 Thread Magnus Ihse Bursie

On 2016-11-30 17:14, Erik Joelsson wrote:
This patch slightly adjusts the matching pattern which identifies the 
C/C++ compilers as Solaris Studio/Oracle Developer Studio so that the 
new output of 12.5 is also matched. Note that this only makes 
configure accept the new version as a valid compiler. The build dies 
almost immediately due to compilation errors.


Bug: https://bugs.openjdk.java.net/browse/JDK-8164304

Patch:

diff -r 059a089b973d common/autoconf/toolchain.m4
--- a/common/autoconf/toolchain.m4  Wed Nov 30 19:28:45 2016 +0530
+++ b/common/autoconf/toolchain.m4  Wed Nov 30 17:04:40 2016 +0100
@@ -333,9 +333,11 @@
   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
 # cc -V output typically looks like
 # cc: Sun C 5.12 Linux_i386 2011/11/16
+# or
+# cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
 COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
 # Check that this is likely to be the Solaris Studio cc.
-$ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun 
$COMPILER_NAME" > /dev/null
+$ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" 
> /dev/null

 if test $? -ne 0; then
   ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
   AC_MSG_NOTICE([The $COMPILER_NAME compiler (located as 
$COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler.])


Looks good to me.

/Magnus



/Erik





RFR: JDK-8170576 Silence error message in compare.sh when selecting images

2016-12-01 Thread Magnus Ihse Bursie
If compare.sh does not find any images, as the last test it will look 
for licensee-src, using $(ls .../*/...). If this does not match any 
directories, ls will write an error message to stderr which will leak 
through.


Bug: https://bugs.openjdk.java.net/browse/JDK-8170576
Patch inline:
diff --git a/common/bin/compare.sh b/common/bin/compare.sh
--- a/common/bin/compare.sh
+++ b/common/bin/compare.sh
@@ -1295,8 +1295,8 @@
 OTHER_JDK="$OTHER/images/jdk"
 OTHER_JRE="$OTHER/images/jre"
 echo "Selecting jdk images for compare"
-elif [ -d "$(ls -d $THIS/licensee-src/build/*/images/jdk)" ] \
-&& [ -d "$(ls -d $OTHER/licensee-src/build/*/images/jdk)" ]
+elif [ -d "$(ls -d $THIS/licensee-src/build/*/images/jdk 2> 
/dev/null)" ] \
+&& [ -d "$(ls -d $OTHER/licensee-src/build/*/images/jdk 2> 
/dev/null)" ]

 then
 echo "Selecting licensee images for compare"
 # Simply override the THIS and OTHER dir with the build dir from

/Magnus