commit 6f8a42e27464c6933b9fe83f324cc1c1d6d9eca0
parent 6c21a3fed16a5dbebd994dcb61f624a2935cf657
Author: sin <sin@2f30.org>
Date: Fri, 28 Feb 2014 13:41:26 +0000
Start using $optldflags and $optcflags
Diffstat:
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/config.mk b/config.mk
@@ -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}
diff --git a/pkgs/tmux b/pkgs/tmux
@@ -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