Ok, here is the result: -Wa,-q does not help, the problem is still there with that option added. Adding -DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER (instead of -Wa,-q) works fine. That's gcc-7.2.0 that I am using, not LLVM. Vincent
On Monday, November 20, 2017 at 7:25:19 AM UTC-5, Jeffrey Walton wrote: > > > > On Monday, November 20, 2017 at 6:36:54 AM UTC-5, Vincent Lextrait wrote: >> >> Interesting. That might be due to the fact that I am on MacOS then (works >> neither on Sierra nor on High Sierra). The config.h file must not set the >> flags properly... >> > > Oh yeah,... OS X ships with an early 2000's assembler. > > Uri knows more about this than I do, but when using a modern GCC on OS X, > you should add -Wa-q. That tells GCC to use Clang's integrated assembler. > The integrated assembler can handle modern ISAs (depending on the version > of the LLVM back end). > > Clang's integrated assembler has some problems because it can't consume > .intel_syntax. It can't even handle a simple negate in Intel syntax. So in > the makefile we add a define to disable Intel code paths ( > https://github.com/weidai11/cryptopp/blob/master/GNUmakefile#L310): > > # Tell MacPorts GCC to use Clang integrated assembler > # http://github.com/weidai11/cryptopp/issues/190 > ifeq ($(GCC_COMPILER)$(MACPORTS_COMPILER),11) > ifeq ($(findstring -Wa,-q,$(CXXFLAGS)),) > CXXFLAGS += -Wa,-q > endif > ifeq ($(findstring -DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER,$(CXXFLAGS)),) > CLANG_INTEGRATED_ASSEMBLER := 1 > CXXFLAGS += -DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER=1 > endif > endif > > I thought it was present in Crypto++ 5.6.5, but I guess not. > > So the short of it is, try adding -Wa,-q. If > CRYPTOPP_CLANG_INTEGRATED_ASSEMBLER is missing when source files are > compiled, then add the define, too. Something like: > > $ CXXFLAGS="-DNDEBUG -g2 -O2 -fPIC -march=native -Wa,-q" make -j 8 > > And don't believe a compiler that claims to be GCC by defining __GNUC__. > The LLVM developers have been told several times to stop doing it. LLVM's > fake GCC and MSVC support is so bad, it is the reason we don't support LLVM > on Windows. It took Uri and I several months to work around all the LLVM > issues on Linux and OS X. We were not subjecting ourselves to the same on > Windows. > > Jeff > -- -- You received this message because you are subscribed to the "Crypto++ Users" Google Group. To unsubscribe, send an email to [email protected]. More information about Crypto++ and this group is available at http://www.cryptopp.com. --- You received this message because you are subscribed to the Google Groups "Crypto++ Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
