Re: [RFR] JDK-8156980: Hotspot build doesn't have -std=gnu++98 gcc option

2018-09-13 Thread Leslie Zhai
Hi Andrew, Thanks for your kind response! 在 2018年09月11日 01:19, Andrew Hughes 写道: On Wed, 5 Sep 2018 at 10:52, Leslie Zhai wrote: Hi Andrew, Thanks for your response! I just quote it from here: http://mail.openjdk.java.net/pipermail/build-dev/2016-July/017464.html I spotted that jsig is j

Re: [RFR] JDK-8156980: Hotspot build doesn't have -std=gnu++98 gcc option

2018-09-10 Thread Andrew Hughes
On Wed, 5 Sep 2018 at 10:52, Leslie Zhai wrote: > > Hi Andrew, > > Thanks for your response! > > I just quote it from here: > > http://mail.openjdk.java.net/pipermail/build-dev/2016-July/017464.html > > I spotted that jsig is just a single C file and so doesn't > need the -std flag. In fact, it co

Re: [RFR] JDK-8156980: Hotspot build doesn't have -std=gnu++98 gcc option

2018-09-08 Thread Martin Buchholz
It would be awesome to use the sanitizers to find native code bugs in openjdk, but it seems like a serious project. Here at Google we are doing our small part by improving support for clang on Linux. On Wed, Sep 5, 2018 at 6:17 PM, Leslie Zhai wrote: > It might be UBSan false positive :) What a

Re: [RFR] JDK-8156980: Hotspot build doesn't have -std=gnu++98 gcc option

2018-09-05 Thread Leslie Zhai
It might be UBSan false positive :) What about ASan? https://bugs.openjdk.java.net/browse/JDK-8189800 在 2018年09月06日 09:12, Martin Buchholz 写道: it's difficult to use llvm tools like sanitizers on openjdk sources, because of the "cheating" - relying on undefined behavior, and the JIT. On Wed,

Re: [RFR] JDK-8156980: Hotspot build doesn't have -std=gnu++98 gcc option

2018-09-05 Thread Martin Buchholz
it's difficult to use llvm tools like sanitizers on openjdk sources, because of the "cheating" - relying on undefined behavior, and the JIT. On Wed, Sep 5, 2018 at 6:09 PM, Leslie Zhai wrote: > Hi Martin, > > Thanks for your response! > > I haven't tested compiling OpenJDK 12-dev with LLVM toolc

Re: [RFR] JDK-8156980: Hotspot build doesn't have -std=gnu++98 gcc option

2018-09-05 Thread Leslie Zhai
Hi Martin, Thanks for your response! I haven't tested compiling OpenJDK 12-dev with LLVM toolchain, perhaps the issue had been fixed already, because clang treat invalid argument '-std=gnu++98' not allowed with 'C' as error. It is better only apply EXTRA_CFLAGS to C without EXTRA_CXXFLAGS.

Re: [RFR] JDK-8156980: Hotspot build doesn't have -std=gnu++98 gcc option

2018-09-05 Thread Martin Buchholz
We seem to have some confusion about flags for C vs. flags for C++. Most flags for most toolchains apply to both C and C++, so it's understandable that we want to unify them. But some flags, notably -std, are language-specific. We have both EXTRA_CFLAGS and EXTRA_CXXFLAGS, so we should expect EX

Re: [RFR] JDK-8156980: Hotspot build doesn't have -std=gnu++98 gcc option

2018-09-05 Thread Leslie Zhai
Hi Andrew, Thanks for your response! I just quote it from here: http://mail.openjdk.java.net/pipermail/build-dev/2016-July/017464.html 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/

Re: [RFR] JDK-8156980: Hotspot build doesn't have -std=gnu++98 gcc option

2016-07-11 Thread David Holmes
On 12/07/2016 1:40 PM, Andrew Hughes wrote: - Original Message - Catching up ... On 11/07/2016 7:05 AM, Andrew Hughes wrote: - Original Message - On Jul 8, 2016, at 2:38 AM, Erik Joelsson wrote: Hello, This looks good except for the change in toolchain.m4, which looks lik

Re: [RFR] JDK-8156980: Hotspot build doesn't have -std=gnu++98 gcc option

2016-07-11 Thread Andrew Hughes
- Original Message - > Catching up ... > > On 11/07/2016 7:05 AM, Andrew Hughes wrote: > > > > > > - Original Message - > >>> On Jul 8, 2016, at 2:38 AM, Erik Joelsson > >>> wrote: > >>> > >>> Hello, > >>> > >>> This looks good except for the change in toolchain.m4, which looks li

Re: [RFR] JDK-8156980: Hotspot build doesn't have -std=gnu++98 gcc option

2016-07-11 Thread David Holmes
Catching up ... On 11/07/2016 7:05 AM, Andrew Hughes wrote: - Original Message - On Jul 8, 2016, at 2:38 AM, Erik Joelsson wrote: 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 com

Re: [RFR] JDK-8156980: Hotspot build doesn't have -std=gnu++98 gcc option

2016-07-11 Thread Kim Barrett
> On Jul 10, 2016, at 5:05 PM, Andrew Hughes wrote: > > > > - Original Message - >>> On Jul 8, 2016, at 2:38 AM, Erik Joelsson wrote: >>> >>> Hello, >>> >>> This looks good except for the change in toolchain.m4, which looks like it >>> might actually break cross compilation by overri

Re: [RFR] JDK-8156980: Hotspot build doesn't have -std=gnu++98 gcc option

2016-07-11 Thread Omair Majid
* Andrew Hughes [2016-07-07 11:53]: > Sadly, I celebrated too soon; it seems that change just delayed the failure > until much later in the build. > > I've found the problem though. In > src/share/vm/utilities/globalDefinitions.hpp, > we have: > > #ifdef max > #undef max > #endif > > #ifdef mi

Re: [RFR] JDK-8156980: Hotspot build doesn't have -std=gnu++98 gcc option

2016-07-10 Thread Andrew Hughes
- Original Message - > > On Jul 8, 2016, at 2:38 AM, Erik Joelsson wrote: > > > > 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

Re: [RFR] JDK-8156980: Hotspot build doesn't have -std=gnu++98 gcc option

2016-07-08 Thread Kim Barrett
> On Jul 8, 2016, at 2:38 AM, Erik Joelsson wrote: > > 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 chang

Re: [RFR] JDK-8156980: Hotspot build doesn't have -std=gnu++98 gcc option

2016-07-07 Thread Erik Joelsson
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

Re: [RFR] JDK-8156980: Hotspot build doesn't have -std=gnu++98 gcc option

2016-07-07 Thread Andrew Hughes
- Original Message - > > On Jul 7, 2016, at 1:48 PM, Andrew Hughes 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. > >> > > > > Mino

Re: [RFR] JDK-8156980: Hotspot build doesn't have -std=gnu++98 gcc option

2016-07-07 Thread Kim Barrett
> On Jul 7, 2016, at 1:48 PM, Andrew Hughes 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

Re: [RFR] JDK-8156980: Hotspot build doesn't have -std=gnu++98 gcc option

2016-07-07 Thread Andrew Hughes
snip... > > > 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/

Re: [RFR] JDK-8156980: Hotspot build doesn't have -std=gnu++98 gcc option

2016-07-07 Thread Andrew Hughes
snip... > > > I'm also now seeing a problem with GCC 6 only that is unique to the > > > latest > > > OpenJDK 9 > > > and what looks like the gtest code. It seems to be the result of the > > > header > > > changes > > > also documented in [0] which were introduced in January [1] (and so > > > proba

Re: [RFR] JDK-8156980: Hotspot build doesn't have -std=gnu++98 gcc option

2016-07-06 Thread Andrew Hughes
snip... > >> > >> What I'm worried about is that by keeping those checks we might get > >> and use the wrong answer in some cases where the BUILD and TARGET > >> compilers are of different vintage. Maybe that will just encourage > >> someone to fix them... > > > > Thanks. I agree it's an issue

Re: [RFR] JDK-8156980: Hotspot build doesn't have -std=gnu++98 gcc option

2016-07-06 Thread Kim Barrett
> On Jul 6, 2016, at 1:23 AM, Andrew Hughes wrote: > > - Original Message - >>> On Jul 5, 2016, at 1:33 PM, Andrew Hughes wrote: >>> >>> - Original Message - > On Jul 5, 2016, at 11:22 AM, Andrew Hughes wrote: common/autoconf/flags.m4 716 $2JVM_CFLAGS="${$2JVM

Re: [RFR] JDK-8156980: Hotspot build doesn't have -std=gnu++98 gcc option

2016-07-05 Thread Andrew Hughes
- Original Message - > > On Jul 5, 2016, at 1:33 PM, Andrew Hughes wrote: > > > > - Original Message - > >>> On Jul 5, 2016, at 11:22 AM, Andrew Hughes wrote: > >> common/autoconf/flags.m4 > >> 716 $2JVM_CFLAGS="${$2JVM_CFLAGS} ${$2CXXSTD_CXXFLAG}" > >> > >> There is a pre-e

Re: [RFR] JDK-8156980: Hotspot build doesn't have -std=gnu++98 gcc option

2016-07-05 Thread Kim Barrett
> On Jul 5, 2016, at 1:33 PM, Andrew Hughes wrote: > > - Original Message - >>> On Jul 5, 2016, at 11:22 AM, Andrew Hughes wrote: >> common/autoconf/flags.m4 >> 716 $2JVM_CFLAGS="${$2JVM_CFLAGS} ${$2CXXSTD_CXXFLAG}" >> >> There is a pre-existing bug in the setup of ${$2CXXSTD_CXXFLA

Re: [RFR] JDK-8156980: Hotspot build doesn't have -std=gnu++98 gcc option

2016-07-05 Thread Andrew Hughes
- Original Message - > > On Jul 5, 2016, at 11:22 AM, Andrew Hughes wrote: > > > > - Original Message - > >> Hello, > >> > >> In general it looks good. It's nice to see that this also fixes that > >> warning output from configure. My only nit is the comment describing the > >> pa

Re: [RFR] JDK-8156980: Hotspot build doesn't have -std=gnu++98 gcc option

2016-07-05 Thread Kim Barrett
> On Jul 5, 2016, at 11:22 AM, Andrew Hughes wrote: > > - Original Message - >> Hello, >> >> In general it looks good. It's nice to see that this also fixes that >> warning output from configure. My only nit is the comment describing the >> parameters for FLAGS_SETUP_GCC6_COMPILER_FLAGS.

Re: [RFR] JDK-8156980: Hotspot build doesn't have -std=gnu++98 gcc option

2016-07-05 Thread Andrew Hughes
- Original Message - > Hello, > > In general it looks good. It's nice to see that this also fixes that > warning output from configure. My only nit is the comment describing the > parameters for FLAGS_SETUP_GCC6_COMPILER_FLAGS. It indicates that it > takes named parameters while it actuall

Re: [RFR] JDK-8156980: Hotspot build doesn't have -std=gnu++98 gcc option

2016-07-05 Thread Erik Joelsson
Hello, In general it looks good. It's nice to see that this also fixes that warning output from configure. My only nit is the comment describing the parameters for FLAGS_SETUP_GCC6_COMPILER_FLAGS. It indicates that it takes named parameters while it actually just takes positional. Please eith

[RFR] JDK-8156980: Hotspot build doesn't have -std=gnu++98 gcc option

2016-07-04 Thread Andrew Hughes
Webrev: http://cr.openjdk.java.net/~andrew/8156980/webrev.01/ Bug: https://bugs.openjdk.java.net/browse/JDK-8156980 With "8151841: Build needs additional flags to compile with GCC 6", we added a number of compiler flags which were needed to build OpenJDK with GCC 6. Checks for these flags were add