"expr: syntax error" on jdk9/dev build
Edward Nevill
edward.nevill at linaro.org
Wed Nov 4 15:45:45 UTC 2015
Hi,
Could I +1 a request for this to be fixed. I appreciate it is harmless, but it is an annoyance and it is just going to be a source of bug reports forever:-)
If you wish I can author a changeset for this.
Regards,
Ed.
On Wed, 2015-11-04 at 08:49 +0100, Volker Simonis wrote:
> Hi Johnathan,
>
> this is a known problem - at least to me :)
>
> 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)
>
> 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 expaands to something like "expr 4 = 4 & 3 = 1 & = 1"
>
> I haven't fixed it until now because it does no harm. The
> corresponding check is for gcc 4.1.1 but the affected Ubuntu gcc
> compilers are 4.6, 4.7 and 4.8.
>
> A trivial fix would be to set CC_VER_MICRO to "0" by default.
>
> Regards,
> Volker
More information about the build-dev
mailing list