Not sure what to say - here’s MacOS High Sierra 10.13.1 with Macports-installed 
GCC-7.2:

rm -f adhoc.cpp adhoc.cpp.copied GNUmakefile.deps benchmarks.html cryptest.txt 
cryptest-*.txt
g++ -maes -mpclmul -mrdrnd -msse2 -mssse3 -msse4.2 -mtune=native -Os -Ofast 
-std=c++11 -fPIC -Wa,-q -DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER=1 -pthread -pipe 
-c cryptlib.cpp
g++ -maes -mpclmul -mrdrnd -msse2 -mssse3 -msse4.2 -mtune=native -Os -Ofast 
-std=c++11 -fPIC -Wa,-q -DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER=1 -pthread -pipe 
-c cpu.cpp
g++ -maes -mpclmul -mrdrnd -msse2 -mssse3 -msse4.2 -mtune=native -Os -Ofast 
-std=c++11 -fPIC -Wa,-q -DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER=1 -pthread -pipe 
-c integer.cpp
g++ -maes -mpclmul -mrdrnd -msse2 -mssse3 -msse4.2 -mtune=native -Os -Ofast 
-std=c++11 -fPIC -Wa,-q -DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER=1 -pthread -pipe 
-c 3way.cpp
g++ -maes -mpclmul -mrdrnd -msse2 -mssse3 -msse4.2 -mtune=native -Os -Ofast 
-std=c++11 -fPIC -Wa,-q -DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER=1 -pthread -pipe 
-c adler32.cpp
g++ -maes -mpclmul -mrdrnd -msse2 -mssse3 -msse4.2 -mtune=native -Os -Ofast 
-std=c++11 -fPIC -Wa,-q -DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER=1 -pthread -pipe 
-c algebra.cpp
g++ -maes -mpclmul -mrdrnd -msse2 -mssse3 -msse4.2 -mtune=native -Os -Ofast 
-std=c++11 -fPIC -Wa,-q -DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER=1 -pthread -pipe 
-c algparam.cpp
g++ -maes -mpclmul -mrdrnd -msse2 -mssse3 -msse4.2 -mtune=native -Os -Ofast 
-std=c++11 -fPIC -Wa,-q -DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER=1 -pthread -pipe 
-c arc4.cpp
g++ -maes -mpclmul -mrdrnd -msse2 -mssse3 -msse4.2 -mtune=native -Os -Ofast 
-std=c++11 -fPIC -Wa,-q -DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER=1 -pthread -pipe 
-mssse3 -c aria-simd.cpp
g++ -maes -mpclmul -mrdrnd -msse2 -mssse3 -msse4.2 -mtune=native -Os -Ofast 
-std=c++11 -fPIC -Wa,-q -DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER=1 -pthread -pipe 
-c aria.cpp
g++ -maes -mpclmul -mrdrnd -msse2 -mssse3 -msse4.2 -mtune=native -Os -Ofast 
-std=c++11 -fPIC -Wa,-q -DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER=1 -pthread -pipe 
-c ariatab.cpp
g++ -maes -mpclmul -mrdrnd -msse2 -mssse3 -msse4.2 -mtune=native -Os -Ofast 
-std=c++11 -fPIC -Wa,-q -DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER=1 -pthread -pipe 
-c asn.cpp
g++ -maes -mpclmul -mrdrnd -msse2 -mssse3 -msse4.2 -mtune=native -Os -Ofast 
-std=c++11 -fPIC -Wa,-q -DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER=1 -pthread -pipe 
-c authenc.cpp
g++ -maes -mpclmul -mrdrnd -msse2 -mssse3 -msse4.2 -mtune=native -Os -Ofast 
-std=c++11 -fPIC -Wa,-q -DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER=1 -pthread -pipe 
-c base32.cpp
g++ -maes -mpclmul -mrdrnd -msse2 -mssse3 -msse4.2 -mtune=native -Os -Ofast 
-std=c++11 -fPIC -Wa,-q -DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER=1 -pthread -pipe 
-c base64.cpp
g++ -maes -mpclmul -mrdrnd -msse2 -mssse3 -msse4.2 -mtune=native -Os -Ofast 
-std=c++11 -fPIC -Wa,-q -DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER=1 -pthread -pipe 
-c basecode.cpp
g++ -maes -mpclmul -mrdrnd -msse2 -mssse3 -msse4.2 -mtune=native -Os -Ofast 
-std=c++11 -fPIC -Wa,-q -DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER=1 -pthread -pipe 
-c bfinit.cpp
g++ -maes -mpclmul -mrdrnd -msse2 -mssse3 -msse4.2 -mtune=native -Os -Ofast 
-std=c++11 -fPIC -Wa,-q -DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER=1 -pthread -pipe 
-msse4.1 -c blake2-simd.cpp
g++ -maes -mpclmul -mrdrnd -msse2 -mssse3 -msse4.2 -mtune=native -Os -Ofast 
-std=c++11 -fPIC -Wa,-q -DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER=1 -pthread -pipe 
-c blake2.cpp
g++ -maes -mpclmul -mrdrnd -msse2 -mssse3 -msse4.2 -mtune=native -Os -Ofast 
-std=c++11 -fPIC -Wa,-q -DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER=1 -pthread -pipe 
-c blowfish.cpp
g++ -maes -mpclmul -mrdrnd -msse2 -mssse3 -msse4.2 -mtune=native -Os -Ofast 
-std=c++11 -fPIC -Wa,-q -DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER=1 -pthread -pipe 
-c blumshub.cpp
. . . . .
g++ -maes -mpclmul -mrdrnd -msse2 -mssse3 -msse4.2 -mtune=native -Os -Ofast 
-std=c++11 -fPIC -Wa,-q -DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER=1 -pthread -pipe 
-c dlltest.cpp
g++ -maes -mpclmul -mrdrnd -msse2 -mssse3 -msse4.2 -mtune=native -Os -Ofast 
-std=c++11 -fPIC -Wa,-q -DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER=1 -pthread -pipe 
-c fipsalgt.cpp
libtool -static -o libcryptopp.a cryptlib.o cpu.o integer.o 3way.o adler32.o 
algebra.o algparam.o arc4.o aria-simd.o aria.o ariatab.o asn.o authenc.o 
base32.o base64.o basecode.o bfinit.o blake2-simd.o blake2.o blowfish.o 
blumshub.o camellia.o cast.o casts.o cbcmac.o ccm.o chacha.o channels.o cmac.o 
crc-simd.o crc.o default.o des.o dessp.o dh.o dh2.o dll.o dsa.o eax.o ec2n.o 
eccrypto.o ecp.o elgamal.o emsa2.o eprecomp.o esign.o files.o filters.o 
fips140.o fipstest.o gcm-simd.o gcm.o gf256.o gf2_32.o gf2n.o gfpcrypt.o gost.o 
gzip.o hex.o hmac.o hrtimer.o ida.o idea.o iterhash.o kalyna.o kalynatab.o 
keccak.o luc.o mars.o marss.o md2.o md4.o md5.o misc.o modes.o mqueue.o mqv.o 
nbtheory.o neon-simd.o network.o oaep.o osrng.o padlkrng.o panama.o pkcspad.o 
poly1305.o polynomi.o ppc-simd.o pssr.o pubkey.o queue.o rabin.o randpool.o 
rc2.o rc5.o rc6.o rdrand.o rdtables.o rijndael-simd.o rijndael.o ripemd.o rng.o 
rsa.o rw.o safer.o salsa.o seal.o seed.o serpent.o sha-simd.o sha.o sha3.o 
shacal2-simd.o shacal2.o shark.o sharkbox.o skipjack.o socketft.o sosemanuk.o 
speck.o square.o squaretb.o sse-simd.o strciphr.o tea.o tftables.o threefish.o 
tiger.o tigertab.o trdlocal.o ttmac.o twofish.o vmac.o wait.o wake.o whrlpool.o 
xtr.o xtrcrypt.o zdeflate.o zinflate.o zlib.o
libtool: file: ppc-simd.o has no symbols
ranlib libcryptopp.a
ranlib: file: libcryptopp.a(ppc-simd.o) has no symbols
g++ -maes -mpclmul -mrdrnd -msse2 -mssse3 -msse4.2 -mtune=native -Os -Ofast 
-std=c++11 -fPIC -Wa,-q -DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER=1 -pthread -pipe 
-c adhoc.cpp
g++ -o cryptest.exe -maes -mpclmul -mrdrnd -msse2 -mssse3 -msse4.2 
-mtune=native -Os -Ofast -std=c++11 -fPIC -Wa,-q 
-DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER=1 -pthread -pipe adhoc.o test.o bench1.o 
bench2.o validat0.o validat1.o validat2.o validat3.o datatest.o regtest1.o 
regtest2.o regtest3.o dlltest.o fipsalgt.o ./libcryptopp.a -L/opt/local/lib 
sudo mkdir -p /opt/local/share/cryptopp
Password:
sudo cp -r TestData /opt/local/share/cryptopp
sudo cp -r TestVectors /opt/local/share/cryptopp
sudo chmod 0755 /opt/local/share/cryptopp
sudo chmod 0755 /opt/local/share/cryptopp/TestData
sudo chmod 0755 /opt/local/share/cryptopp/TestVectors
sudo chmod 0644 /opt/local/share/cryptopp/TestData/*.dat
sudo chmod 0644 /opt/local/share/cryptopp/TestVectors/*.txt
./cryptest.exe v
Using seed: 1511229706      

Testing Settings...

passed:  Your machine is little endian.
passed:  Aligned data access (no CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS).
passed:  sizeof(byte) == 1
passed:  sizeof(word16) == 2
passed:  sizeof(word32) == 4
passed:  sizeof(word64) == 8
passed:  sizeof(word128) == 16
passed:  sizeof(hword) == 4, sizeof(word) == 8, sizeof(dword) == 16
passed:  cacheLineSize == 64
hasSSE2 == 1, hasSSSE3 == 1, hasSSE4.1 == 1, hasSSE4.2 == 1, hasAESNI == 1, 
hasCLMUL == 1, hasRDRAND == 1, hasRDSEED == 0, hasSHA == 0, isP4 == 0

No operating system provided blocking random number generator, skipping test.

Testing operating system provided nonblocking random number generator...

passed:  100000 generated bytes compressed to 100020 bytes by DEFLATE
passed:  GenerateWord32 and Crop

Testing RandomPool generator...

passed:  100000 generated bytes compressed to 100020 bytes by DEFLATE
passed:  discarded 10000 bytes
passed:  IncorporateEntropy with 128 bytes
passed:  GenerateWord32 and Crop

Testing AutoSeeded RandomPool generator...

passed:  100000 generated bytes compressed to 100020 bytes by DEFLATE
passed:  discarded 10000 bytes
passed:  IncorporateEntropy with 128 bytes
passed:  GenerateWord32 and Crop

Testing OldRandomPool generator...

passed:  Expected sequence from PGP-style RandomPool (circa 2007)
passed:  100000 generated bytes compressed to 100020 bytes by DEFLATE
passed:  discarded 10000 bytes
passed:  IncorporateEntropy with 128 bytes
passed:  GenerateWord32 and Crop
. . . . .
ESIGN validation suite running...

passed    signature key validation
passed    signature and verification
passed    checking invalid signature
passed    verification check against test vector
Generating signature key from seed...
passed    signature key validation
passed    signature and verification
passed    checking invalid signature

All tests passed!

Seed used was 1511229706      
Test started at Mon Nov 20 21:01:46 2017
Test ended at Mon Nov 20 21:01:50 2017
$ 

> On Nov 20, 2017, at 7:38 , Vincent Lextrait <[email protected]> 
> wrote:
> 
> 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 
> <https://github.com/weidai11/cryptopp/blob/master/GNUmakefile#L310>):
> 
> # Tell MacPorts GCC to use Clang integrated assembler
> #   http://github.com/weidai11/cryptopp/issues/190 
> <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 <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] 
> <mailto:[email protected]>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
-- 
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.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to