diff options
author | Isabell Cowan | 2017-10-06 13:07:20 -0500 |
---|---|---|
committer | Isabell Cowan | 2017-10-06 13:07:20 -0500 |
commit | 0b5cc20fc3f46de1e558014bcc53e3d4feb108c1 (patch) | |
tree | 671f8cb52dad3783c3d48b645a9e87783f03e98b | |
parent | 82ee89ac47d29104c242df39ad4900aa4710880e (diff) | |
download | aur-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-- | PKGBUILD | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -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) |