Leslie Zhai via llvm-dev
2018-Sep-06 01:09 UTC
[llvm-dev] [RFR] JDK-8156980: Hotspot build doesn't have -std=gnu++98 gcc option
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. Furthermore, I just have interest, did you use clang analyzer, sanitizer and libfuzzer towards hotspot and jdk native library? Thanks! 在 2018年09月06日 02:10, 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 EXTRA_CFLAGS to only apply to C.-- Regards, Leslie Zhai
Martin Buchholz via llvm-dev
2018-Sep-06 01:12 UTC
[llvm-dev] [RFR] JDK-8156980: Hotspot build doesn't have -std=gnu++98 gcc option
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 <zhaixiang at loongson.cn> wrote:> 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. > > Furthermore, I just have interest, did you use clang analyzer, sanitizer > and libfuzzer towards hotspot and jdk native library? Thanks! > > > 在 2018年09月06日 02:10, 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 EXTRA_CFLAGS to only apply to C. >> > > -- > Regards, > Leslie Zhai > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180905/fd436f2d/attachment-0001.html>
Leslie Zhai via llvm-dev
2018-Sep-06 01:17 UTC
[llvm-dev] [RFR] JDK-8156980: Hotspot build doesn't have -std=gnu++98 gcc option
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, Sep 5, 2018 at 6:09 PM, Leslie Zhai <zhaixiang at loongson.cn > <mailto:zhaixiang at loongson.cn>> wrote: > > 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. > > Furthermore, I just have interest, did you use clang analyzer, > sanitizer and libfuzzer towards hotspot and jdk native library? > Thanks! > > > 在 2018年09月06日 02:10, 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 > EXTRA_CFLAGS to only apply to C. > > > -- > Regards, > Leslie Zhai > > >-- Regards, Leslie Zhai
Reasonably Related Threads
- [RFR] JDK-8156980: Hotspot build doesn't have -std=gnu++98 gcc option
- How to add Loongson ISA for Mips target?
- How to add Loongson ISA for Mips target?
- OpenJDK8 failed to work after compiled by LLVM 8 for X86
- Why SI.isSigned() is not equals to E->getType()->isSignedIntegerOrEnumerationType()?