cryptozeny / sugarchain-v0.16.3

OUTDATED! This repo is moved to:
https://github.com/sugarchain-project/sugarchain
MIT License
0 stars 1 forks source link

YESPOWER: add "-msse2" CFLAGS for TRAVIS #49

Closed cryptozeny closed 5 years ago

cryptozeny commented 5 years ago
On Tue, Feb 26, 2019 at 04:11:32AM +0900, cryptozeny cryptozeny wrote:
> ach... "-msse2" option broke ARM build FYI...

Of course.  It's only valid on x86, and you only need it on 32-bit x86
(it's implied on x86-64).

> > solardiz 16 hours ago  ???
> >> I recommend -O2 -fomit-frame-pointer instead of -O3, although the
> >> difference is minor (and expected to be seen mostly on 32-bit x86 builds,
> >> where you'd also want to add -msse2).

This is still valid.

> > Currently my code is like this:
> >
> > # crypto primitives library
> >> crypto_libbitcoin_crypto_a_CFLAGS = $(AM_CFLAGS) $(PIE_FLAGS) -Wall
> >> -msse2 -O2 -fomit-frame-pointer

Looks OK to me.  For x86, obviously.

For other archs, just drop -msse2.

Alexander

but i got error on ARM

image

arm-linux-gnueabihf-gcc: error: unrecognized command line option ‘-msse2’

/usr/bin/arm-linux-gnueabihf-ranlib libbitcoin_consensus.a /home/travis/build/randomBox123/travisTest/depends/arm-linux-gnueabihf/share/../native/bin/ccache arm-linux-gnueabihf-gcc -DHAVE_CONFIG_H -I. -I../src/config -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I/home/travis/build/randomBox123/travisTest/depends/arm-linux-gnueabihf/share/../include/ -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -D_FILE_OFFSET_BITS=64 -fPIE -Wall -msse2 -O2 -fomit-frame-pointer -pipe -O2 -I/home/travis/build/randomBox123/travisTest/src/crypto/yespower-1.0.0 -c -o crypto/yespower-1.0.0/crypto_libbitcoin_crypto_a-sha256.o test -f 'crypto/yespower-1.0.0/sha256.c' || echo './'crypto/yespower-1.0.0/sha256.c arm-linux-gnueabihf-gcc: error: unrecognized command line option ‘-msse2’ make[2]: *** [crypto/yespower-1.0.0/crypto_libbitcoin_crypto_a-sha256.o] Error 1

cryptozeny commented 5 years ago
On Thu, Feb 28, 2019 at 01:23:25AM +0900, cryptozeny cryptozeny wrote:
> "-msse2" option is already implied on x86-64? So 64-bit build doesn't need
> that CFLAGS?

Correct.

> Please check below list
> 
> ===
> ARM (no such function)
> -Wall -O2 -fomit-frame-pointer
> 
> Win32 (need -msse2)
> -Wall *-msse2* -O2 -fomit-frame-pointer
> 
> Linux32 (need -msse2)
> -Wall *-msse2* -O2 -fomit-frame-pointer
> 
> Win64 (already implied so not needed)
> -Wall -O2 -fomit-frame-pointer
> 
> Linux64 (already implied so not needed)
> -Wall -O2 -fomit-frame-pointer
> 
> macOS (already implied so not needed)
> -Wall -O2 -fomit-frame-pointer
> ===
> 
> Am I right?

This looks OK to me.

Alexander
cryptozeny commented 5 years ago

$ ../configure CFLAGS="-I$YESPOWER_PATH" --cache-file=config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false) configure: error: unrecognized option: `-I/home/travis/build/randomBox123/travisTest/src/crypto/yespower-1.0.0''

cryptozeny commented 5 years ago

fixed https://github.com/cryptozeny/sugarchain-v0.16.3/pull/50

but TODO remains...

cryptozeny commented 5 years ago

https://github.com/cryptozeny/sugarchain-v0.16.3/issues/61

cryptozeny commented 5 years ago

thank you @solardiz (alexander)

cryptozeny commented 5 years ago

image

cryptozeny commented 5 years ago

https://github.com/cryptozeny/sugarchain-v0.16.3/issues/51

cryptozeny commented 5 years ago

fixed https://github.com/cryptozeny/sugarchain-v0.16.3/pull/65