Start using $optldflags and $optcflags

This commit is contained in:
sin 2014-02-28 13:41:26 +00:00
parent 6c21a3fed1
commit 6f8a42e274
2 changed files with 5 additions and 3 deletions

View File

@ -8,5 +8,7 @@ version = 0.0
mirror = http://dl.2f30.org/morpheus-pkgs/${arch}/${version}
CC = ${arch}-linux-musl-gcc
PATH = ${root}/opt/cross/${arch}-linux-musl/bin:${PATH}
optldflags = "-s -Wl,--gc-sections -Wl,-z,relro,-z,now"
optcflags = "-fdata-sections -ffunction-sections -Os -g0 -fno-unwind-tables -fno-asynchronous-unwind-tables -Wa,--noexecstack"
PATH = ${root}/opt/cross/${arch}-linux-musl/bin:${PATH}

View File

@ -5,7 +5,7 @@ build: ncurses libevent
wget -c $url
[ -d tmux-$v ] || tar xzf tmux-$v.tar.gz
cd tmux-$v
CC=$CC ./configure --prefix="$root" LDFLAGS=-static \
CFLAGS="-I$libcroot/include/ncursesw" || return 1
CC=$CC ./configure --prefix="$root" LDFLAGS="$optldflags -static" \
CFLAGS="$optcflags -I$libcroot/include/ncursesw" || return 1
make -j$nprocs || return 1
make install || return 1