Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add -msse2 if we build the optimized version #13

Merged
merged 2 commits into from Sep 8, 2016
Merged

Add -msse2 if we build the optimized version #13

merged 2 commits into from Sep 8, 2016

Conversation

hynek
Copy link
Owner

@hynek hynek commented Sep 7, 2016

Some compilers (e.g. debian jessie’s gcc) can't handle optimized code without it.

@codecov-io
Copy link

codecov-io commented Sep 7, 2016

Current coverage is 100% (diff: 100%)

Merging #13 into master will not change coverage

@@           master   #13   diff @@
===================================
  Files           7     7          
  Lines         140   140          
  Methods         0     0          
  Messages        0     0          
  Branches       15    15          
===================================
  Hits          140   140          
  Misses          0     0          
  Partials        0     0          

Powered by Codecov. Last update e05dee7...3e97f53

@hynek
Copy link
Owner Author

hynek commented Sep 7, 2016

@josechaso could you double check whether this PR branch works without manually passing a CFLAGS to python setup.py build please?

@hynek hynek mentioned this pull request Sep 7, 2016
@josechaso
Copy link

josechaso commented Sep 7, 2016

I tried building the opt-sse2 branch (no extra CFLAGS added) and compiled
fine.

(build log)

python setup.py build
running build
running build_py
running build_clib
building 'libargon2' library
i586-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g
-fstack-protector-strong -Wformat -Werror=format-security -fPIC -msse2
-Iextras/libargon2/src/../include -Iextras/libargon2/src/blake2 -c
extras/libargon2/src/argon2.c -o
build/temp.linux-i686-2.7/extras/libargon2/src/argon2.o
i586-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g
-fstack-protector-strong -Wformat -Werror=format-security -fPIC -msse2
-Iextras/libargon2/src/../include -Iextras/libargon2/src/blake2 -c
extras/libargon2/src/blake2/blake2b.c -o
build/temp.linux-i686-2.7/extras/libargon2/src/blake2/blake2b.o
i586-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g
-fstack-protector-strong -Wformat -Werror=format-security -fPIC -msse2
-Iextras/libargon2/src/../include -Iextras/libargon2/src/blake2 -c
extras/libargon2/src/core.c -o
build/temp.linux-i686-2.7/extras/libargon2/src/core.o
i586-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g
-fstack-protector-strong -Wformat -Werror=format-security -fPIC -msse2
-Iextras/libargon2/src/../include -Iextras/libargon2/src/blake2 -c
extras/libargon2/src/encoding.c -o
build/temp.linux-i686-2.7/extras/libargon2/src/encoding.o
i586-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g
-fstack-protector-strong -Wformat -Werror=format-security -fPIC -msse2
-Iextras/libargon2/src/../include -Iextras/libargon2/src/blake2 -c
extras/libargon2/src/opt.c -o
build/temp.linux-i686-2.7/extras/libargon2/src/opt.o
i586-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g
-fstack-protector-strong -Wformat -Werror=format-security -fPIC -msse2
-Iextras/libargon2/src/../include -Iextras/libargon2/src/blake2 -c
extras/libargon2/src/thread.c -o
build/temp.linux-i686-2.7/extras/libargon2/src/thread.o
i586-linux-gnu-gcc-ar rc build/temp.linux-i686-2.7/liblibargon2.a
build/temp.linux-i686-2.7/extras/libargon2/src/argon2.o
build/temp.linux-i686-2.7/extras/libargon2/src/blake2/blake2b.o
build/temp.linux-i686-2.7/extras/libargon2/src/core.o
build/temp.linux-i686-2.7/extras/libargon2/src/encoding.o
build/temp.linux-i686-2.7/extras/libargon2/src/opt.o
build/temp.linux-i686-2.7/extras/libargon2/src/thread.o
running build_ext
generating cffi module 'build/temp.linux-i686-2.7/_ffi.c'
building '_ffi' extension
creating build/temp.linux-i686-2.7/build
creating build/temp.linux-i686-2.7/build/temp.linux-i686-2.7
i586-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g
-fstack-protector-strong -Wformat -Werror=format-security -fPIC
-Iextras/libargon2/include -I/usr/include/python2.7 -c
build/temp.linux-i686-2.7/_ffi.c -o
build/temp.linux-i686-2.7/build/temp.linux-i686-2.7/_ffi.o
i586-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions
-Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong
-Wformat -Werror=format-security -Wl,-z,relro -D_FORTIFY_SOURCE=2 -g
-fstack-protector-strong -Wformat -Werror=format-security
build/temp.linux-i686-2.7/build/temp.linux-i686-2.7/_ffi.o
-Lbuild/temp.linux-i686-2.7 -llibargon2 -llibargon2 -o
build/lib.linux-i686-2.7/argon2/_ffi.so

@hynek
Copy link
Owner Author

hynek commented Sep 8, 2016

Awesome, thank you for your assistance!

@hynek hynek merged commit 4f7405f into master Sep 8, 2016
@ofek ofek mentioned this pull request Sep 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants