summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorIsabell Cowan2017-10-06 13:07:20 -0500
committerIsabell Cowan2017-10-06 13:07:20 -0500
commit0b5cc20fc3f46de1e558014bcc53e3d4feb108c1 (patch)
tree671f8cb52dad3783c3d48b645a9e87783f03e98b
parent82ee89ac47d29104c242df39ad4900aa4710880e (diff)
downloadaur-0b5cc20fc3f46de1e558014bcc53e3d4feb108c1.tar.gz
Minor build improvements.
* Changed format of if statement for low memory linking to match others. * Fixed CPPFLAGS with optimize if "-D_FORTIFY_SOURCE" is not at the start beginning of CPPFLAGS. * Added ccache as a dependency if the build parameter is set to true.
-rw-r--r--PKGBUILD16
1 files changed, 10 insertions, 6 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 6b27fdf03bb3..7e6d1ecb0676 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -151,6 +151,9 @@ fi
if [[ ! -z "$_pgo" ]] && $_pgo; then
makedepends+=('xorg-server-xvfb')
fi
+if [[ ! -z "$_ccache" ]] && $_ccache; then
+ makedepends+=('ccache')
+fi
if [[ ! -z "$_debug" ]] && $_debug; then
options+=('debug' '!strip')
else
@@ -256,18 +259,19 @@ build() {
export PATH="$srcdir/path:$PATH"
export PYTHON="/usr/bin/python2"
+ # Build fails with -D_FORTIFY_SOURCE if optimazations are not in CPPFLAGS
+ if [[ -z "${CPPFLAGS/*-D_FORTIFY_SOURCE*/}" && ! -z "$_optimize" ]]; then
+ CPPFLAGS+=" $_optimize"
+ fi
+
# Hardening
LDFLAGS+=" -Wl,-z,now"
- if [[ -n $_lowmem || $CARCH == i686 ]]; then
+ # Prevent ENOMEM during linking.
+ if [[ ! -z "$_lowmem" ]] && $_lowmem || [[ "$CARCH" == i*86 ]]; then
LDFLAGS+=" -Xlinker --no-keep-memory"
fi
- # Build fails with -D_FORTIFY_SOURCE if optimazations are not in CPPFLAGS
- if [[ -z "${CPPFLAGS/-D_FORTIFY_SOURCE*/}" && ! -z "$_optimize" ]]; then
- CPPFLAGS+=" $_optimize"
- fi
-
if [[ ! -z "$_pgo" ]] && $_pgo; then
export MOZ_PGO=1
BUILDCMD=(xvfb-run -a -s "-extension GLX -screen 0 1280x1024x24" ./mach build)