# DP: Fix hotspot build system for GNU make 4.0. Description: Fixes a bug in adjust-mflags.sh that breaks the hotspot build with GNU make 4.0. The adjust-mflags.sh script attempts to replace the -j parameter but it corrupts other parameters containing the character 'j'. make 4.0 is more strict and returns an error in this case. For example: -I/home/ebourg/openjdk8/make/common is transformed into: -I/home/ebourg/open -j2 -dk8/make/common This error is caused by this sed expression: s/ -\([^ ][^ ]*\)j/ -\1 -j/ This expression splits a set of concatenated options containing the 'j' character: -abcdefghijkl --> -abcdefghi -jkl But it breaks the -I parameter which is followed by a path that may contain 'j' (and this is often true when building open*j*dk) The fix consists in ignoring the concatenated options if '/' is found. Author: Emmanuel Bourg Bug: https://bugs.openjdk.java.net/browse/JDK-8028407 --- a/hotspot/make/linux/makefiles/adjust-mflags.sh +++ b/hotspot/make/linux/makefiles/adjust-mflags.sh @@ -64,7 +64,7 @@ echo "$MFLAGS" \ | sed ' s/^-/ -/ - s/ -\([^ I][^ I]*\)j/ -\1 -j/ + s/ -\([^ I][^/ I]*\)j/ -\1 -j/ s/ -j[0-9][0-9]*/ -j/ s/ -j\([^ ]\)/ -j -\1/ s/ -j/ -j'${HOTSPOT_BUILD_JOBS:-${default_build_jobs}}'/