cookutils rev 1087
cook, cook.conf: move macro definition from CFLAGS and CXXFLAGS to CPPFLAGS
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat Jul 28 15:31:35 2018 +0300 (2018-07-28) |
parents | f9a6a676a923 |
children | 461c3da71257 |
files | cook cook.conf |
line diff
1.1 --- a/cook Sat Jul 21 04:55:26 2018 +0300 1.2 +++ b/cook Sat Jul 28 15:31:35 2018 +0300 1.3 @@ -871,6 +871,8 @@ 1.4 if grep -q ^compile_rules $receipt; then 1.5 _ 'Executing: %s' 'compile_rules' 1.6 echo "CFLAGS : $CFLAGS" 1.7 + echo "CXXLAGS : $CXXFLAGS" 1.8 + echo "CPPFLAGS : $CPPFLAGS" 1.9 echo "LDFLAGS : $LDFLAGS" 1.10 [ -d "$src" ] && cd $src 1.11 patchit
2.1 --- a/cook.conf Sat Jul 21 04:55:26 2018 +0300 2.2 +++ b/cook.conf Sat Jul 28 15:31:35 2018 +0300 2.3 @@ -81,12 +81,26 @@ 2.4 # We use this flag against some flavors of the Spectre vulnerability. 2.5 # FIXME: it looks like the flag '-mindirect-branch=thunk-extern' is recommended, 2.6 # but no one app is compiled using it even using GCC-7.3. Is something wrong? 2.7 +# 2.8 +# Curl configure says: 2.9 +# configure: CFLAGS note: CFLAGS should only be used to specify C compiler flags, 2.10 +# not macro definitions. Use CPPFLAGS for: -D_GLIBCXX_USE_C99_MATH=1 2.11 +# 2.12 case "$ARCH" in 2.13 - i?86) CFLAGS="-march=$ARCH -Os -pipe -mindirect-branch=thunk -D_GLIBCXX_USE_C99_MATH=1";; 2.14 - x86_64) CFLAGS="-march=nocona -Os -pipe -mindirect-branch=thunk -D_GLIBCXX_USE_C99_MATH=1";; 2.15 - arm*) CFLAGS="-march=armv6 -O2";; # FIXME 2.16 + i?86) 2.17 + CFLAGS="-march=$ARCH -Os -pipe -mindirect-branch=thunk" 2.18 + CPPFLAGS="-D_GLIBCXX_USE_C99_MATH=1" 2.19 + ;; 2.20 + x86_64) 2.21 + CFLAGS="-march=nocona -Os -pipe -mindirect-branch=thunk" 2.22 + CPPFLAGS="-D_GLIBCXX_USE_C99_MATH=1" 2.23 + ;; 2.24 + arm*) 2.25 + CFLAGS="-march=armv6 -O2" # FIXME 2.26 + ;; 2.27 esac 2.28 CXXFLAGS="$CFLAGS" 2.29 +export CFLAGS CXXFLAGS CPPFLAGS 2.30 2.31 # Binutils 2.22 breaks many packages built without LDFLAGS set correctly. 2.32 #LDFLAGS="-Wl,--copy-dt-needed-entries -lXt"