Hello,

This looks good except for the change in toolchain.m4, which looks like it might actually break cross compilation by overriding the value for compiler version for the build compiler using the target compiler. With this change we basically have:

if cross compilation
  TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS([BUILD_], [OPENJDK_BUILD_])
else
  ...
fi
TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS([], [OPENJDK_BUILD_])

The problem you are trying to solve is that in the case of not cross compilation, the TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS macro wasn't called with "OPENJDK_BUILD_". Kim's suggested patch was to add the call in the else clause. I would instead suggest the following:

if cross compilation
  ...
else
  ...
fi
TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS([BUILD_], [OPENJDK_BUILD_])

Just move it out of the conditional blocks and always call it the same way.

/Erik ( - on vacation and only sporadically checking email)

On 2016-07-07 22:42, Andrew Hughes wrote:

----- Original Message -----
On Jul 7, 2016, at 1:48 PM, Andrew Hughes <gnu.and...@redhat.com> wrote:
Revised webrevs:

http://cr.openjdk.java.net/~andrew/8156980/webrev.04/root
http://cr.openjdk.java.net/~andrew/8156980/webrev.04/hotspot
These look good to me.

Minor revision:

http://cr.openjdk.java.net/~andrew/8156980/webrev.05/root
http://cr.openjdk.java.net/~andrew/8156980/webrev.05/hotspot

I spotted that jsig is just a single C file and so doesn't
need the -std flag. In fact, it complains about it:

Compiling jsig.c (for libjsig.so)
( ( /usr/bin/gcc -fPIC -D_GNU_SOURCE -D_REENTRANT -O2 -pipe -march=core2
-std=gnu++98 -m64 -g -DTHIS_FILE='"jsig.c"' -c -MMD -\
MF /home/andrew/builder/dev/hotspot/libjsig/objs/jsig.d -o
/home/andrew/builder/dev/hotspot/libjsig/objs/jsig.o /home/andrew/p\
rojects/openjdk/upstream/dev/hotspot/src/os/linux/vm/jsig.c >
(/usr/bin/tee /home/andrew/builder/dev/hotspot/libjsig/objs/jsi\
g.o.log) 2> >(/usr/bin/tee
/home/andrew/builder/dev/hotspot/libjsig/objs/jsig.o.log >&2) || (
exitcode=$? && /bin/cp /home/and\
rew/builder/dev/hotspot/libjsig/objs/jsig.o.log
/home/andrew/builder/dev/make-support/failure-logs/hotspot_libjsig_objs_jsig.o\
.log && exit $exitcode ) ) && wait )
cc1: warning: command line option '-std=gnu++98' is valid for C++/ObjC++
but not for C

So just ADLC is fixed now.

The root webrev is the same as before.
Oops, glad you caught that.

Looks even better.


The same warning was causing an error in the OpenJDK 8 backport of the original
GCC 6 patch, so I double-checked the logs for 9 and spotted this :-)

Reply via email to