dino-lang / dino

The programming language DINO
GNU General Public License v2.0
71 stars 5 forks source link

user-provided CFLAGS are overridden #14

Closed rofl0r closed 5 years ago

rofl0r commented 5 years ago

CFLAGS="-g3 -O0" ./configure -C --prefix=

but later...

/bin/bash ./libtool  --tag=CC   --mode=link gcc -I./../ONIGURUMA/src -I./../ONIGURUMA -I./../AMMUNITION -static -DCC='"gcc"' -DDINO_VERSION=0.97 -DDINO_LANG_VERSION=0.5 -DSTANDARD_DINO_INCLUDE_DIRECTORY='"/include"' -DSTANDARD_DINO_EXTERN_LIBS=\"d_mpi-0.1.so:d_ieee-0.1.so:d_ipcerr-0.1.so:d_socket-0.1.so\" -DSTANDARD_DINO_LIB_DIRECTORY='"/lib"' -DSTANDARD_DINO_BIN_DIRECTORY='"/bin"' -DDINO_VERSION_SUFFIX='"-0.97"' -g3 -O0 -DNDEBUG -Ofast -flto -ffat-lto-objects -export-dynamic -static libdino.la ../ONIGURUMA/src/libonig.la ../AMMUNITION/libcocom.la -lgmp -lm  -o dino dino-d_main.o  -ldl -lgmp 

usually user-provided CFLAGS override optimization CFLAGS such as -Ofast -flto -ffat-lto-objects, but at the very least user-provided CFLAGS should come after automatically set ones (so stuff like -O3 can be overridden).

(trying to debug a crash but values are optimized out)

vnmakarov commented 5 years ago

Thank you for finding this. If you can provide a pull request I'll review and aplly it promptly.