From 6f8a42e27464c6933b9fe83f324cc1c1d6d9eca0 Mon Sep 17 00:00:00 2001 From: sin Date: Fri, 28 Feb 2014 13:41:26 +0000 Subject: [PATCH] Start using $optldflags and $optcflags --- config.mk | 4 +++- pkgs/tmux | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/config.mk b/config.mk index b232cf2..73f592f 100644 --- 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 index d2ad833..12105bf 100644 --- 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