summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorQue Quotion2019-07-10 20:10:14 +0900
committerQue Quotion2019-07-10 20:11:01 +0900
commit5c019019d151316199a0b514124ed826ec32d355 (patch)
tree299cacf56d963ddc1ce707f4d13aec55cad05160
parent0d3062da404b6a2e6bc94328e79fc54a8f5329cf (diff)
downloadaur-5c019019d151316199a0b514124ed826ec32d355.tar.gz
Rename lto.sh.in -> ZZ-lto.sh.in to ensure it is run LAST. New option: rice (extreme and unsafe optimization)
-rw-r--r--.SRCINFO12
-rw-r--r--PKGBUILD11
-rw-r--r--ZZ-lto.sh.in (renamed from lto.sh.in)2
-rw-r--r--buildenv_ext.conf3
-rw-r--r--rice.sh.in24
5 files changed, 40 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 267e87aeaf4..59a94d4d9f5 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = makepkg-optimize
pkgdesc = Supplemental build and packaging optimizations for makepkg
- pkgver = 11
- pkgrel = 2
+ pkgver = 12
+ pkgrel = 1
url = https://wiki.archlinux.org/index.php/Makepkg-optimize
arch = any
license = GPL
@@ -16,8 +16,9 @@ pkgbase = makepkg-optimize
replaces = pacman-buildenv_ext-git
backup = etc/makepkg-optimize.conf
source = pgo.sh.in
- source = lto.sh.in
+ source = ZZ-lto.sh.in
source = graphite.sh.in
+ source = rice.sh.in
source = upx-exec.sh.in
source = optipng-exec.sh.in
source = svgo-exec.sh.in
@@ -36,8 +37,9 @@ pkgbase = makepkg-optimize
source = pkgopts-param_ext.conf
source = compress-param_max.conf
sha1sums = dae91a563dd767f3e3059240009b40106aadbc35
- sha1sums = c172280e2b245635880db1b745e8e3950425519d
+ sha1sums = 7a0118bc4fef1e136211a8b28af731344df30f67
sha1sums = 17b601c832b4af263d6ebdc894ee3ef59f9ee8b4
+ sha1sums = 891c616c4f2414c503ea88ed60242e67677d88da
sha1sums = a893c32f2a3fff8b279025ec60f0c3d88143dc1e
sha1sums = 9270b5e33d4508a959688a10c20dec3732763937
sha1sums = 34a33b47a8b667f9dc810737c0f598660b962d4c
@@ -50,7 +52,7 @@ pkgbase = makepkg-optimize
sha1sums = 202d11e49a611bb400029512cf159a0f8645a6db
sha1sums = 2e2cd8c680a86518652543fda9092bf2ab594660
sha1sums = 981eab856abb43c5e093620cdf4d8bfa2d690805
- sha1sums = 8ef78f721c0a86c04ed3726cba73d679ee720d07
+ sha1sums = 8775a34738b8c19238bcedd41180bf113049ed41
sha1sums = 357102cec0aa56d74955bbf66ae694db74627dab
sha1sums = 1fc8035e64b739e20c70fbb4eaa5cb7aa1c63c90
sha1sums = 5d0cde13b50641371e4ec4d813d6b2dfae493889
diff --git a/PKGBUILD b/PKGBUILD
index b8d39523dd0..f515a9e18ab 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,8 +2,8 @@
# Contributor: bartus ( aur\at\bartus.33mail.com )
pkgname=makepkg-optimize
-pkgver=11
-pkgrel=2
+pkgver=12
+pkgrel=1
pkgdesc='Supplemental build and packaging optimizations for makepkg'
arch=('any')
license=('GPL')
@@ -13,7 +13,7 @@ replaces=('makepkg-optimize2' pacman-buildenv_ext-git)
depends=('pacman-git')
optdepends=('upx' 'optipng' 'nodejs-svgo')
backup=(etc/makepkg-optimize.conf)
-_buildenv=({pgo,lto,graphite}.sh.in)
+_buildenv=({pgo,ZZ-lto,graphite,rice}.sh.in)
_executable=({upx,optipng,svgo}-exec.sh.in)
_tidy=({upx,optipng,svgo}.sh.in)
_conf=({{c,cxx,make,ld,debug-make,cmake-}flags,{buildenv,destdirs,pkgopts{,-param}}_ext,compress-param_max}.conf)
@@ -22,8 +22,9 @@ source=(${_buildenv[@]}
${_tidy[@]}
${_conf[@]})
sha1sums=('dae91a563dd767f3e3059240009b40106aadbc35'
- 'c172280e2b245635880db1b745e8e3950425519d'
+ '7a0118bc4fef1e136211a8b28af731344df30f67'
'17b601c832b4af263d6ebdc894ee3ef59f9ee8b4'
+ '891c616c4f2414c503ea88ed60242e67677d88da'
'a893c32f2a3fff8b279025ec60f0c3d88143dc1e'
'9270b5e33d4508a959688a10c20dec3732763937'
'34a33b47a8b667f9dc810737c0f598660b962d4c'
@@ -36,7 +37,7 @@ sha1sums=('dae91a563dd767f3e3059240009b40106aadbc35'
'202d11e49a611bb400029512cf159a0f8645a6db'
'2e2cd8c680a86518652543fda9092bf2ab594660'
'981eab856abb43c5e093620cdf4d8bfa2d690805'
- '8ef78f721c0a86c04ed3726cba73d679ee720d07'
+ '8775a34738b8c19238bcedd41180bf113049ed41'
'357102cec0aa56d74955bbf66ae694db74627dab'
'1fc8035e64b739e20c70fbb4eaa5cb7aa1c63c90'
'5d0cde13b50641371e4ec4d813d6b2dfae493889'
diff --git a/lto.sh.in b/ZZ-lto.sh.in
index c8dc62397d9..01cc1d0d8cb 100644
--- a/lto.sh.in
+++ b/ZZ-lto.sh.in
@@ -1,6 +1,6 @@
#!/usr/bin/bash
#
-# lto.sh - Compile with link-time optimization
+# ZZ-lto.sh - Compile with link-time optimization
#
[[ -n "$LIBMAKEPKG_BUILDENV_LTO_SH" ]] && return
diff --git a/buildenv_ext.conf b/buildenv_ext.conf
index 90102b5db63..cb3fb3dcfe2 100644
--- a/buildenv_ext.conf
+++ b/buildenv_ext.conf
@@ -1,4 +1,5 @@
#-- lto: Use link-time optimization (monolithic algorithm)
#-- lto-thin: Use link-time optimization (partitioned algorithm)
#-- pgo: Generate or utilize profile guided optimization
-#-- graphite: Use Graphite loop optimizations
+#-- graphite: Use graphite loop optimization
+#-- rice: Use extreme and unsafe optimization
diff --git a/rice.sh.in b/rice.sh.in
new file mode 100644
index 00000000000..ebe800c6bd0
--- /dev/null
+++ b/rice.sh.in
@@ -0,0 +1,24 @@
+#!/usr/bin/bash
+#
+# rice.sh - Compile with extreme and unsafe optimization
+#
+
+[[ -n "$LIBMAKEPKG_BUILDENV_RICE_SH" ]] && return
+LIBMAKEPKG_BUILDENV_RICE_SH=1
+
+LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
+
+source "$LIBRARY/util/option.sh"
+
+build_options+=('rice')
+buildenv_functions+=('buildenv_rice')
+
+buildenv_rice() {
+ if check_buildoption "rice" "y"; then
+ riceflags=" -Ofast -fbranch-target-load-optimize2 -fcx-fortran-rules -fdata-sections -ffloat-store -fgcse-las -fgcse-sm -fipa-pta -floop-nest-optimize -fmodulo-sched -fmodulo-sched-allow-regmoves -fno-enforce-eh-specs -funsafe-math-optimizations -fno-threadsafe-statics -fnothrow-opt -fno-var-tracking-assignments -fomit-frame-pointer -fopenmp -fPIC -freg-struct-return -freschedule-modulo-scheduled-loops -fsched-pressure -fsched-spec-load -fsched-spec-load-dangerous -fsched-stalled-insns=0 -fsched2-use-superblocks -fselective-scheduling -fselective-scheduling2 -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops -fshort-wchar -ftree-parallelize-loops=$(getconf _NPROCESSORS_ONLN) -ftree-lrs -ftree-vectorize -fvariable-expansion-in-unroller -maccumulate-outgoing-args -Wno-sizeof-pointer-memaccess" # -fmerge-all-constants
+ riceldflags=" -lpthread -lgomp" # -shared
+ CFLAGS+="$riceflags"
+ CXXFLAGS+="$riceflags"
+ LDFLAGS+="$riceldflags"
+ fi
+}