cookutils rev 1028
cook.conf: tune CFLAGS depending on ARCH
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Feb 02 01:15:45 2018 +0200 (2018-02-02) |
parents | 7d37b282b4fb |
children | dc1a0fbc8d28 |
files | cook.conf |
line diff
1.1 --- a/cook.conf Fri Feb 02 00:51:10 2018 +0200 1.2 +++ b/cook.conf Fri Feb 02 01:15:45 2018 +0200 1.3 @@ -69,13 +69,17 @@ 1.4 # With -O2: binutils: Produce 14.0M Packed 5.5M Compressed 1.2M 1.5 # With -Os: binutils: Produce 13.4M Packed 4.9M Compressed 1.1M 1.6 # 1.7 -# ARM: don't use -0s but -02 1.8 +# ARM: don't use -Os but -O2 1.9 # ARM: -mcpu=name [arm9|xscale|...] or -march=name [armv4|armv6|...] 1.10 # x86_64: CFLAGS="-march=nocona -Os -pipe" 1.11 # 1.12 #MAKEFLAGS="-j$(($(grep processor /proc/cpuinfo | wc -l)+1))" 1.13 MAKEFLAGS="-j$(grep processor /proc/cpuinfo | wc -l)" 1.14 -CFLAGS="-march=$ARCH -Os -pipe -fomit-frame-pointer" 1.15 +case "$ARCH" in 1.16 + i?86) CFLAGS="-march=$ARCH -Os -pipe -mindirect-branch=thunk-extern";; 1.17 + x86_64) CFLAGS="-march=nocona -Os -pipe -mindirect-branch=thunk-extern";; 1.18 + arm*) CFLAGS="-march=armv6 -O2";; # FIXME 1.19 +esac 1.20 CXXFLAGS="$CFLAGS" 1.21 1.22 # Binutils 2.22 breaks many packages built without LDFLAGS set correctly.