aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Hesse <mail@eworm.de>2016-04-25 13:52:22 +0200
committerMarc André Tanner <mat@brain-dump.org>2016-04-26 08:41:17 +0200
commitf91bc4c7fcf3ea66f7c4e4d9ff65adf4db3de2a9 (patch)
treec29dcb7b87649b88b546142b1d65b4b805ccb484
parent554e6f6b479aca196f52e1fbc6371d7a27d029c8 (diff)
downloadvis-f91bc4c7fcf3ea66f7c4e4d9ff65adf4db3de2a9.tar.gz
vis-f91bc4c7fcf3ea66f7c4e4d9ff65adf4db3de2a9.tar.xz
build: skip -pie for static build
Signed-off-by: Christian Hesse <mail@eworm.de>
-rw-r--r--GNUmakefile4
-rwxr-xr-xconfigure6
2 files changed, 7 insertions, 3 deletions
diff --git a/GNUmakefile b/GNUmakefile
index df1d0b5..015ca92 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -177,11 +177,11 @@ local: clean
standalone: clean
[ ! -e dependency/build/local ] || $(MAKE) dependencies-clean
- ./configure --environment-only
+ ./configure --environment-only --static
CFLAGS="$(CFLAGS)" $(MAKE) dependency/build/libmusl-install
PATH=$(DEPS_BIN):$$PATH PKG_CONFIG_PATH= PKG_CONFIG_LIBDIR= CFLAGS="$(CFLAGS)" $(MAKE) \
CC=musl-gcc dependency/build/standalone
- PATH=$(DEPS_BIN):$$PATH PKG_CONFIG_PATH= PKG_CONFIG_LIBDIR= ./configure \
+ PATH=$(DEPS_BIN):$$PATH PKG_CONFIG_PATH= PKG_CONFIG_LIBDIR= ./configure --static \
CFLAGS="-I$(DEPS_INC) --static -Wl,--as-needed" LDFLAGS="-L$(DEPS_LIB)" CC=musl-gcc
PATH=$(DEPS_BIN):$$PATH $(MAKE)
diff --git a/configure b/configure
index dfad773..112a027 100755
--- a/configure
+++ b/configure
@@ -13,6 +13,7 @@ Defaults for the options are specified in brackets.
Configuration:
--srcdir=DIR source directory [detected]
--environment-only check environment only, no system libraries
+ --static prepare for static build
Installation directories:
--prefix=PREFIX main installation prefix [/usr/local]
@@ -127,6 +128,7 @@ case "$arg" in
--sharedir=*) SHAREDIR=${arg#*=} ;;
--mandir=*) MANDIR=${arg#*=} ;;
--environment-only) environmentonly=yes ;;
+--static) static=yes ;;
--enable-lua|--enable-lua=yes) lua=yes ;;
--disable-lua|--enable-lua=no) lua=no ;;
--enable-selinux|--enable-selinux=yes) selinux=yes ;;
@@ -227,7 +229,9 @@ tryldflag LDFLAGS -Wl,-z,now
tryldflag LDFLAGS -Wl,-z,relro
# You can not link libraries with -pie (unless you add a main() function).
# So keep this a vis-only flag.
-tryldflag LDFLAGS_AUTO -pie
+if test "$static" != "yes" ; then
+ tryldflag LDFLAGS_AUTO -pie
+fi
printf "creating config.mk... "