> On Nov 4, 2015, at 8:21 AM, Volker Simonis <volker.simo...@gmail.com> wrote: > > Hi, > > can somebody please review and sponsor the following tiny build fix: > > http://cr.openjdk.java.net/~simonis/webrevs/2015/8141416/ > https://bugs.openjdk.java.net/browse/JDK-8141416 > > Building hotspot on certain systems results in a series of: > expr: syntax error > expr: syntax error > expr: syntax error > expr: syntax error > > It is caused by a peculiarity of the gcc version on Ubuntu where "gcc > -dumpversion" doesn't print a micro-version: > > Ubuntu: > $ gcc -dumpversion > 4.6 > > Any other Linux: > $ gcc -dumpversion > 4.8.3 > > This "feature" is tracked under > https://bugs.launchpad.net/ubuntu/+source/gcc-4.8/+bug/1360404 and has > been fixed for gcc 4.9 but won't be fixed for older versions of gcc. > > In hotspot/make/linux/makefiles/gcc.make we parse the micro-version of > gcc and use it in the following way: > > CC_VER_MICRO := $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f3)
I’ve added this. Thanks for fixing it. > > ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 1 \& > $(CC_VER_MICRO) = 1), 1) > $(error "GCC $(CC_VER_MAJOR).$(CC_VER_MINOR).$(CC_VER_MICRO) not > supported because of > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=27724") > endif > > The shell expression results in a syntax error if $(CC_VER_MICRO) > because it expands to something like "expr 4 = 4 & 3 = 1 & = 1" > > Thank you and best regards, > Volker