From f7ae4b691dbdabe969436f8f63a8966a6fb0d441 Mon Sep 17 00:00:00 2001 From: Walter Oggioni Date: Tue, 24 Dec 2024 15:30:26 +0800 Subject: [PATCH] updated makepkg configuration for arch builder --- arch-builder/makepkg/makepkg-aarch64.conf | 10 +- arch-builder/makepkg/makepkg-armv7h.conf | 10 +- arch-builder/makepkg/makepkg-goldmont.conf | 13 +- arch-builder/makepkg/makepkg-native.conf | 16 +- arch-builder/makepkg/makepkg-sandybridge.conf | 13 +- arch-builder/makepkg/makepkg-silvermont.conf | 13 +- arch-builder/makepkg/makepkg-skylake.conf | 13 +- arch-builder/makepkg/makepkg-tigerlake.conf | 13 +- arch-builder/makepkg/makepkg-znver1.conf | 13 +- arch-builder/makepkg/makepkg-znver2.conf | 13 +- arch-builder/makepkg/makepkg-znver3.conf | 13 +- arch-builder/makepkg/makepkg-znver5.conf | 13 +- arch-builder/makepkg/makepkg.conf | 154 ++++++++++++++++++ 13 files changed, 248 insertions(+), 59 deletions(-) create mode 100644 arch-builder/makepkg/makepkg.conf diff --git a/arch-builder/makepkg/makepkg-aarch64.conf b/arch-builder/makepkg/makepkg-aarch64.conf index e5ea7ee..7a26d18 100644 --- a/arch-builder/makepkg/makepkg-aarch64.conf +++ b/arch-builder/makepkg/makepkg-aarch64.conf @@ -43,8 +43,10 @@ CFLAGS="-march=armv8-a -O3 -pipe -fstack-protector-strong -fno-plt -fexceptions -fstack-clash-protection \ -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer" CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS" -LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now" +LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now \ + -Wl,-z,pack-relative-relocs" LTOFLAGS="-flto=auto" + #RUSTFLAGS="-C opt-level=2" #-- Make Flags: change this for DistCC/SMP systems MAKEFLAGS="-j4" @@ -93,7 +95,7 @@ BUILDENV=(!distcc color ccache check !sign) #-- debug: Add debugging flags as specified in DEBUG_* variables #-- lto: Add compile flags for building with link time optimization # -OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug !lto) +OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug lto) #-- File integrity checks to use. Valid: md5, sha1, sha224, sha256, sha384, sha512, b2 INTEGRITY_CHECK=(sha256) @@ -137,8 +139,8 @@ DBGSRCDIR="/usr/src/debug" # COMPRESSGZ=(gzip -c -f -n) COMPRESSBZ2=(bzip2 -c -f) -COMPRESSXZ=(xz -c -z -) -COMPRESSZST=(zstd -c -z -q -) +COMPRESSXZ=(xz -9 -c -z -) +COMPRESSZST=(zstd -14 -c -T0 -) COMPRESSLRZ=(lrzip -q) COMPRESSLZO=(lzop -q) COMPRESSZ=(compress -c -f) diff --git a/arch-builder/makepkg/makepkg-armv7h.conf b/arch-builder/makepkg/makepkg-armv7h.conf index 382ea20..bfa2029 100644 --- a/arch-builder/makepkg/makepkg-armv7h.conf +++ b/arch-builder/makepkg/makepkg-armv7h.conf @@ -40,8 +40,10 @@ CHOST="x86_64-pc-linux-gnu" #CPPFLAGS="" CFLAGS="-march=armv7-a+simd -mfloat-abi=hard -mfpu=vfpv3-d16 -O3 -pipe -fstack-protector-strong -fno-plt" CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS" -LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now" +LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now \ + -Wl,-z,pack-relative-relocs" LTOFLAGS="-flto=auto" + #RUSTFLAGS="-C opt-level=2" #-- Make Flags: change this for DistCC/SMP systems MAKEFLAGS="-j4" @@ -90,7 +92,7 @@ BUILDENV=(!distcc color ccache check !sign) #-- debug: Add debugging flags as specified in DEBUG_* variables #-- lto: Add compile flags for building with link time optimization # -OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug !lto) +OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug lto) #-- File integrity checks to use. Valid: md5, sha1, sha224, sha256, sha384, sha512, b2 INTEGRITY_CHECK=(sha256) @@ -134,8 +136,8 @@ DBGSRCDIR="/usr/src/debug" # COMPRESSGZ=(gzip -c -f -n) COMPRESSBZ2=(bzip2 -c -f) -COMPRESSXZ=(xz -c -z -) -COMPRESSZST=(zstd -c -z -q -) +COMPRESSXZ=(xz -9 -c -z -) +COMPRESSZST=(zstd -14 -c -T0 -) COMPRESSLRZ=(lrzip -q) COMPRESSLZO=(lzop -q) COMPRESSZ=(compress -c -f) diff --git a/arch-builder/makepkg/makepkg-goldmont.conf b/arch-builder/makepkg/makepkg-goldmont.conf index cd4ade1..140e9d3 100644 --- a/arch-builder/makepkg/makepkg-goldmont.conf +++ b/arch-builder/makepkg/makepkg-goldmont.conf @@ -42,7 +42,10 @@ CFLAGS="-march=goldmont -mtune=goldmont -O3 -pipe -fno-plt -fexceptions \ -Wformat -Werror=format-security \ -fstack-clash-protection -fcf-protection" CXXFLAGS="$CFLAGS" -LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now" +LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now \ + -Wl,-z,pack-relative-relocs" +LTOFLAGS="-flto=auto" + #RUSTFLAGS="-C opt-level=2" #-- Make Flags: change this for DistCC/SMP systems MAKEFLAGS="-j4" @@ -90,7 +93,7 @@ BUILDENV=(!distcc color ccache check !sign) #-- purge: Remove files specified by PURGE_TARGETS #-- debug: Add debugging flags as specified in DEBUG_* variables # -OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug) +OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug lto) #-- File integrity checks to use. Valid: md5, sha1, sha224, sha256, sha384, sha512, b2 INTEGRITY_CHECK=(md5) @@ -134,8 +137,8 @@ DBGSRCDIR="/usr/src/debug" # COMPRESSGZ=(gzip -c -f -n) COMPRESSBZ2=(bzip2 -c -f) -COMPRESSXZ=(xz -c -z -) -COMPRESSZST=(zstd -c -z -q -) +COMPRESSXZ=(xz -9 -c -z -) +COMPRESSZST=(zstd -14 -c -T0 -) COMPRESSLRZ=(lrzip -q) COMPRESSLZO=(lzop -q) COMPRESSZ=(compress -c -f) @@ -146,5 +149,5 @@ COMPRESSLZ=(lzip -c -f) # EXTENSION DEFAULTS ######################################################################### # -PKGEXT='.pkg.tar.lzo' +PKGEXT='.pkg.tar.zst' SRCEXT='.src.tar.gz' diff --git a/arch-builder/makepkg/makepkg-native.conf b/arch-builder/makepkg/makepkg-native.conf index 010ba6d..5ea62df 100644 --- a/arch-builder/makepkg/makepkg-native.conf +++ b/arch-builder/makepkg/makepkg-native.conf @@ -39,7 +39,10 @@ CHOST="x86_64-pc-linux-gnu" CPPFLAGS="-D_FORTIFY_SOURCE=2" CFLAGS="-march=native -mtune=native -O3 -pipe -fstack-protector-strong" CXXFLAGS="-march=native -mtune=native -O3 -pipe -fstack-protector-strong" -LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro" +LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now \ + -Wl,-z,pack-relative-relocs" +LTOFLAGS="-flto=auto" + #-- Make Flags: change this for DistCC/SMP systems MAKEFLAGS="-j4" #-- Debugging flags @@ -83,11 +86,9 @@ BUILDENV=(!distcc color ccache check !sign) #-- emptydirs: Leave empty directories in packages #-- zipman: Compress manual (man and info) pages in MAN_DIRS with gzip #-- purge: Remove files specified by PURGE_TARGETS -#-- upx: Compress binary executable files using UPX -#-- optipng: Optimize PNG images with optipng #-- debug: Add debugging flags as specified in DEBUG_* variables # -OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !optipng !upx !debug) +OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug lto) #-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512 INTEGRITY_CHECK=(md5) @@ -129,10 +130,13 @@ PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod) # COMPRESSGZ=(gzip -c -f -n) COMPRESSBZ2=(bzip2 -c -f) -COMPRESSXZ=(xz -c -z -) +COMPRESSXZ=(xz -9 -c -z -) +COMPRESSZST=(zstd -14 -c -T0 -) COMPRESSLRZ=(lrzip -q) COMPRESSLZO=(lzop -q) COMPRESSZ=(compress -c -f) +COMPRESSLZ4=(lz4 -q) +COMPRESSLZ=(lzip -c -f) ######################################################################### # EXTENSION DEFAULTS @@ -141,7 +145,7 @@ COMPRESSZ=(compress -c -f) # WARNING: Do NOT modify these variables unless you know what you are # doing. # -PKGEXT='.pkg.tar.lzo' +PKGEXT='.pkg.tar.zst' SRCEXT='.src.tar.gz' # vim: set ft=sh ts=2 sw=2 et: diff --git a/arch-builder/makepkg/makepkg-sandybridge.conf b/arch-builder/makepkg/makepkg-sandybridge.conf index 44ce3c0..f44b701 100644 --- a/arch-builder/makepkg/makepkg-sandybridge.conf +++ b/arch-builder/makepkg/makepkg-sandybridge.conf @@ -42,7 +42,10 @@ CFLAGS="-march=sandybridge -mtune=sandybridge -O3 -pipe -fno-plt -fexceptions \ -Wformat -Werror=format-security \ -fstack-clash-protection -fcf-protection" CXXFLAGS="$CFLAGS" -LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now" +LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now \ + -Wl,-z,pack-relative-relocs" +LTOFLAGS="-flto=auto" + #RUSTFLAGS="-C opt-level=2" #-- Make Flags: change this for DistCC/SMP systems MAKEFLAGS="-j4" @@ -90,7 +93,7 @@ BUILDENV=(!distcc color ccache check !sign) #-- purge: Remove files specified by PURGE_TARGETS #-- debug: Add debugging flags as specified in DEBUG_* variables # -OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug) +OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug lto) #-- File integrity checks to use. Valid: md5, sha1, sha224, sha256, sha384, sha512, b2 INTEGRITY_CHECK=(md5) @@ -134,8 +137,8 @@ DBGSRCDIR="/usr/src/debug" # COMPRESSGZ=(gzip -c -f -n) COMPRESSBZ2=(bzip2 -c -f) -COMPRESSXZ=(xz -c -z -) -COMPRESSZST=(zstd -c -z -q -) +COMPRESSXZ=(xz -9 -c -z -) +COMPRESSZST=(zstd -14 -c -T0 -) COMPRESSLRZ=(lrzip -q) COMPRESSLZO=(lzop -q) COMPRESSZ=(compress -c -f) @@ -146,5 +149,5 @@ COMPRESSLZ=(lzip -c -f) # EXTENSION DEFAULTS ######################################################################### # -PKGEXT='.pkg.tar.lzo' +PKGEXT='.pkg.tar.zst' SRCEXT='.src.tar.gz' diff --git a/arch-builder/makepkg/makepkg-silvermont.conf b/arch-builder/makepkg/makepkg-silvermont.conf index 547d09b..d17832d 100644 --- a/arch-builder/makepkg/makepkg-silvermont.conf +++ b/arch-builder/makepkg/makepkg-silvermont.conf @@ -42,7 +42,10 @@ CFLAGS="-march=silvermont -mtune=silvermont -O3 -pipe -fno-plt -fexceptions \ -Wformat -Werror=format-security \ -fstack-clash-protection -fcf-protection" CXXFLAGS="$CFLAGS" -LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now" +LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now \ + -Wl,-z,pack-relative-relocs" +LTOFLAGS="-flto=auto" + #RUSTFLAGS="-C opt-level=2" #-- Make Flags: change this for DistCC/SMP systems MAKEFLAGS="-j4" @@ -90,7 +93,7 @@ BUILDENV=(!distcc color ccache check !sign) #-- purge: Remove files specified by PURGE_TARGETS #-- debug: Add debugging flags as specified in DEBUG_* variables # -OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug) +OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug lto) #-- File integrity checks to use. Valid: md5, sha1, sha224, sha256, sha384, sha512, b2 INTEGRITY_CHECK=(md5) @@ -134,8 +137,8 @@ DBGSRCDIR="/usr/src/debug" # COMPRESSGZ=(gzip -c -f -n) COMPRESSBZ2=(bzip2 -c -f) -COMPRESSXZ=(xz -c -z -) -COMPRESSZST=(zstd -c -z -q -) +COMPRESSXZ=(xz -9 -c -z -) +COMPRESSZST=(zstd -14 -c -T0 -) COMPRESSLRZ=(lrzip -q) COMPRESSLZO=(lzop -q) COMPRESSZ=(compress -c -f) @@ -146,5 +149,5 @@ COMPRESSLZ=(lzip -c -f) # EXTENSION DEFAULTS ######################################################################### # -PKGEXT='.pkg.tar.lzo' +PKGEXT='.pkg.tar.zst' SRCEXT='.src.tar.gz' diff --git a/arch-builder/makepkg/makepkg-skylake.conf b/arch-builder/makepkg/makepkg-skylake.conf index c709e0d..a3f21a3 100644 --- a/arch-builder/makepkg/makepkg-skylake.conf +++ b/arch-builder/makepkg/makepkg-skylake.conf @@ -42,7 +42,10 @@ CFLAGS="-march=skylake -mtune=skylake -O3 -pipe -fno-plt -fexceptions \ -Wformat -Werror=format-security \ -fstack-clash-protection -fcf-protection" CXXFLAGS="$CFLAGS" -LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now" +LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now \ + -Wl,-z,pack-relative-relocs" +LTOFLAGS="-flto=auto" + #RUSTFLAGS="-C opt-level=2" #-- Make Flags: change this for DistCC/SMP systems MAKEFLAGS="-j4" @@ -90,7 +93,7 @@ BUILDENV=(!distcc color ccache check !sign) #-- purge: Remove files specified by PURGE_TARGETS #-- debug: Add debugging flags as specified in DEBUG_* variables # -OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug) +OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug lto) #-- File integrity checks to use. Valid: md5, sha1, sha224, sha256, sha384, sha512, b2 INTEGRITY_CHECK=(md5) @@ -134,8 +137,8 @@ DBGSRCDIR="/usr/src/debug" # COMPRESSGZ=(gzip -c -f -n) COMPRESSBZ2=(bzip2 -c -f) -COMPRESSXZ=(xz -c -z -) -COMPRESSZST=(zstd -c -z -q -) +COMPRESSXZ=(xz -9 -c -z -) +COMPRESSZST=(zstd -14 -c -T0 -) COMPRESSLRZ=(lrzip -q) COMPRESSLZO=(lzop -q) COMPRESSZ=(compress -c -f) @@ -146,5 +149,5 @@ COMPRESSLZ=(lzip -c -f) # EXTENSION DEFAULTS ######################################################################### # -PKGEXT='.pkg.tar.lzo' +PKGEXT='.pkg.tar.zst' SRCEXT='.src.tar.gz' diff --git a/arch-builder/makepkg/makepkg-tigerlake.conf b/arch-builder/makepkg/makepkg-tigerlake.conf index 0dd41b8..80171ad 100644 --- a/arch-builder/makepkg/makepkg-tigerlake.conf +++ b/arch-builder/makepkg/makepkg-tigerlake.conf @@ -42,7 +42,10 @@ CFLAGS="-march=tigerlake -mtune=tigerlake -O3 -pipe -fno-plt -fexceptions \ -Wformat -Werror=format-security \ -fstack-clash-protection -fcf-protection" CXXFLAGS="$CFLAGS" -LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now" +LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now \ + -Wl,-z,pack-relative-relocs" +LTOFLAGS="-flto=auto" + #RUSTFLAGS="-C opt-level=2" #-- Make Flags: change this for DistCC/SMP systems MAKEFLAGS="-j4" @@ -90,7 +93,7 @@ BUILDENV=(!distcc color ccache check !sign) #-- purge: Remove files specified by PURGE_TARGETS #-- debug: Add debugging flags as specified in DEBUG_* variables # -OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug) +OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug lto) #-- File integrity checks to use. Valid: md5, sha1, sha224, sha256, sha384, sha512, b2 INTEGRITY_CHECK=(md5) @@ -134,8 +137,8 @@ DBGSRCDIR="/usr/src/debug" # COMPRESSGZ=(gzip -c -f -n) COMPRESSBZ2=(bzip2 -c -f) -COMPRESSXZ=(xz -c -z -) -COMPRESSZST=(zstd -c -z -q -) +COMPRESSXZ=(xz -9 -c -z -) +COMPRESSZST=(zstd -14 -c -T0 -) COMPRESSLRZ=(lrzip -q) COMPRESSLZO=(lzop -q) COMPRESSZ=(compress -c -f) @@ -146,5 +149,5 @@ COMPRESSLZ=(lzip -c -f) # EXTENSION DEFAULTS ######################################################################### # -PKGEXT='.pkg.tar.lzo' +PKGEXT='.pkg.tar.zst' SRCEXT='.src.tar.gz' diff --git a/arch-builder/makepkg/makepkg-znver1.conf b/arch-builder/makepkg/makepkg-znver1.conf index e138be4..df75bbe 100644 --- a/arch-builder/makepkg/makepkg-znver1.conf +++ b/arch-builder/makepkg/makepkg-znver1.conf @@ -42,7 +42,10 @@ CFLAGS="-march=znver1 -mtune=znver1 -O3 -pipe -fno-plt -fexceptions \ -Wformat -Werror=format-security \ -fstack-clash-protection -fcf-protection" CXXFLAGS="$CFLAGS" -LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now" +LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now \ + -Wl,-z,pack-relative-relocs" +LTOFLAGS="-flto=auto" + #RUSTFLAGS="-C opt-level=2" #-- Make Flags: change this for DistCC/SMP systems MAKEFLAGS="-j4" @@ -90,7 +93,7 @@ BUILDENV=(!distcc color ccache check !sign) #-- purge: Remove files specified by PURGE_TARGETS #-- debug: Add debugging flags as specified in DEBUG_* variables # -OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug) +OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug lto) #-- File integrity checks to use. Valid: md5, sha1, sha224, sha256, sha384, sha512, b2 INTEGRITY_CHECK=(md5) @@ -134,8 +137,8 @@ DBGSRCDIR="/usr/src/debug" # COMPRESSGZ=(gzip -c -f -n) COMPRESSBZ2=(bzip2 -c -f) -COMPRESSXZ=(xz -c -z -) -COMPRESSZST=(zstd -c -z -q -) +COMPRESSXZ=(xz -9 -c -z -) +COMPRESSZST=(zstd -14 -c -T0 -) COMPRESSLRZ=(lrzip -q) COMPRESSLZO=(lzop -q) COMPRESSZ=(compress -c -f) @@ -146,5 +149,5 @@ COMPRESSLZ=(lzip -c -f) # EXTENSION DEFAULTS ######################################################################### # -PKGEXT='.pkg.tar.lzo' +PKGEXT='.pkg.tar.zst' SRCEXT='.src.tar.gz' diff --git a/arch-builder/makepkg/makepkg-znver2.conf b/arch-builder/makepkg/makepkg-znver2.conf index 1bac950..6794d68 100644 --- a/arch-builder/makepkg/makepkg-znver2.conf +++ b/arch-builder/makepkg/makepkg-znver2.conf @@ -42,7 +42,10 @@ CFLAGS="-march=znver2 -mtune=znver2 -O3 -pipe -fno-plt -fexceptions \ -Wformat -Werror=format-security \ -fstack-clash-protection -fcf-protection" CXXFLAGS="$CFLAGS" -LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now" +LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now \ + -Wl,-z,pack-relative-relocs" +LTOFLAGS="-flto=auto" + #RUSTFLAGS="-C opt-level=2" #-- Make Flags: change this for DistCC/SMP systems MAKEFLAGS="-j4" @@ -90,7 +93,7 @@ BUILDENV=(!distcc color ccache check !sign) #-- purge: Remove files specified by PURGE_TARGETS #-- debug: Add debugging flags as specified in DEBUG_* variables # -OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug) +OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug lto) #-- File integrity checks to use. Valid: md5, sha1, sha224, sha256, sha384, sha512, b2 INTEGRITY_CHECK=(md5) @@ -134,8 +137,8 @@ DBGSRCDIR="/usr/src/debug" # COMPRESSGZ=(gzip -c -f -n) COMPRESSBZ2=(bzip2 -c -f) -COMPRESSXZ=(xz -c -z -) -COMPRESSZST=(zstd -c -z -q -) +COMPRESSXZ=(xz -9 -c -z -) +COMPRESSZST=(zstd -14 -c -T0 -) COMPRESSLRZ=(lrzip -q) COMPRESSLZO=(lzop -q) COMPRESSZ=(compress -c -f) @@ -146,5 +149,5 @@ COMPRESSLZ=(lzip -c -f) # EXTENSION DEFAULTS ######################################################################### # -PKGEXT='.pkg.tar.lzo' +PKGEXT='.pkg.tar.zst' SRCEXT='.src.tar.gz' diff --git a/arch-builder/makepkg/makepkg-znver3.conf b/arch-builder/makepkg/makepkg-znver3.conf index c11e638..129a476 100644 --- a/arch-builder/makepkg/makepkg-znver3.conf +++ b/arch-builder/makepkg/makepkg-znver3.conf @@ -42,7 +42,10 @@ CFLAGS="-march=znver3 -mtune=znver3 -O3 -pipe -fno-plt -fexceptions \ -Wformat -Werror=format-security \ -fstack-clash-protection -fcf-protection" CXXFLAGS="$CFLAGS" -LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now" +LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now \ + -Wl,-z,pack-relative-relocs" +LTOFLAGS="-flto=auto" + #RUSTFLAGS="-C opt-level=2" #-- Make Flags: change this for DistCC/SMP systems MAKEFLAGS="-j4" @@ -90,7 +93,7 @@ BUILDENV=(!distcc color ccache check !sign) #-- purge: Remove files specified by PURGE_TARGETS #-- debug: Add debugging flags as specified in DEBUG_* variables # -OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug) +OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug lto) #-- File integrity checks to use. Valid: md5, sha1, sha224, sha256, sha384, sha512, b2 INTEGRITY_CHECK=(md5) @@ -134,8 +137,8 @@ DBGSRCDIR="/usr/src/debug" # COMPRESSGZ=(gzip -c -f -n) COMPRESSBZ2=(bzip2 -c -f) -COMPRESSXZ=(xz -c -z -) -COMPRESSZST=(zstd -c -z -q -) +COMPRESSXZ=(xz -9 -c -z -) +COMPRESSZST=(zstd -14 -c -T0 -) COMPRESSLRZ=(lrzip -q) COMPRESSLZO=(lzop -q) COMPRESSZ=(compress -c -f) @@ -146,5 +149,5 @@ COMPRESSLZ=(lzip -c -f) # EXTENSION DEFAULTS ######################################################################### # -PKGEXT='.pkg.tar.lzo' +PKGEXT='.pkg.tar.zst' SRCEXT='.src.tar.gz' diff --git a/arch-builder/makepkg/makepkg-znver5.conf b/arch-builder/makepkg/makepkg-znver5.conf index fd5b485..2c493c5 100644 --- a/arch-builder/makepkg/makepkg-znver5.conf +++ b/arch-builder/makepkg/makepkg-znver5.conf @@ -42,7 +42,10 @@ CFLAGS="-march=znver5 -mtune=znver5 -O3 -pipe -fno-plt -fexceptions \ -Wformat -Werror=format-security \ -fstack-clash-protection -fcf-protection" CXXFLAGS="$CFLAGS" -LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now" +LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now \ + -Wl,-z,pack-relative-relocs" +LTOFLAGS="-flto=auto" + #RUSTFLAGS="-C opt-level=2" #-- Make Flags: change this for DistCC/SMP systems MAKEFLAGS="-j4" @@ -90,7 +93,7 @@ BUILDENV=(!distcc color ccache check !sign) #-- purge: Remove files specified by PURGE_TARGETS #-- debug: Add debugging flags as specified in DEBUG_* variables # -OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug) +OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug lto) #-- File integrity checks to use. Valid: md5, sha1, sha224, sha256, sha384, sha512, b2 INTEGRITY_CHECK=(md5) @@ -134,8 +137,8 @@ DBGSRCDIR="/usr/src/debug" # COMPRESSGZ=(gzip -c -f -n) COMPRESSBZ2=(bzip2 -c -f) -COMPRESSXZ=(xz -c -z -) -COMPRESSZST=(zstd -c -z -q -) +COMPRESSXZ=(xz -9 -c -z -) +COMPRESSZST=(zstd -14 -c -T0 -) COMPRESSLRZ=(lrzip -q) COMPRESSLZO=(lzop -q) COMPRESSZ=(compress -c -f) @@ -146,5 +149,5 @@ COMPRESSLZ=(lzip -c -f) # EXTENSION DEFAULTS ######################################################################### # -PKGEXT='.pkg.tar.lzo' +PKGEXT='.pkg.tar.zst' SRCEXT='.src.tar.gz' diff --git a/arch-builder/makepkg/makepkg.conf b/arch-builder/makepkg/makepkg.conf new file mode 100644 index 0000000..e83a713 --- /dev/null +++ b/arch-builder/makepkg/makepkg.conf @@ -0,0 +1,154 @@ +# +# /etc/makepkg.conf +# + +######################################################################### +# SOURCE ACQUISITION +######################################################################### +# +#-- The download utilities that makepkg should use to acquire sources +# Format: 'protocol::agent' +DLAGENTS=('file::/usr/bin/curl -qgC - -o %o %u' + 'ftp::/usr/bin/curl -qgfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u' + 'http::/usr/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -o %o %u' + 'https::/usr/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -o %o %u' + 'rsync::/usr/bin/rsync --no-motd -z %u %o' + 'scp::/usr/bin/scp -C %u %o') + +# Other common tools: +# /usr/bin/snarf +# /usr/bin/lftpget -c +# /usr/bin/wget + +#-- The package required by makepkg to download VCS sources +# Format: 'protocol::package' +VCSCLIENTS=('bzr::breezy' + 'fossil::fossil' + 'git::git' + 'hg::mercurial' + 'svn::subversion') + + +######################################################################### +# ARCHITECTURE, COMPILE FLAGS +######################################################################### +# +CARCH="x86_64" +CHOST="x86_64-pc-linux-gnu" + +#-- Compiler and Linker Flags +# -march (or -mcpu) builds exclusively for an architecture +# -mtune optimizes for an architecture, but builds for whole processor family +CPPFLAGS="-D_FORTIFY_SOURCE=2" +CFLAGS="-march=x86_64 -mtune=generic -O3 -pipe -fstack-protector-strong" +CXXFLAGS="-march=x86_64 -mtune=generic -O3 -pipe -fstack-protector-strong" +LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now \ + -Wl,-z,pack-relative-relocs" +LTOFLAGS="-flto=auto" +#-- Make Flags: change this for DistCC/SMP systems +MAKEFLAGS="-j4" +#-- Debugging flags +DEBUG_CFLAGS="-g -fvar-tracking-assignments" +DEBUG_CXXFLAGS="-g -fvar-tracking-assignments" + +######################################################################### +# BUILD ENVIRONMENT +######################################################################### +# +# Defaults: BUILDENV=(!distcc color !ccache check !sign) +# A negated environment option will do the opposite of the comments below. +# +#-- distcc: Use the Distributed C/C++/ObjC compiler +#-- color: Colorize output messages +#-- ccache: Use ccache to cache compilation +#-- check: Run the check() function if present in the PKGBUILD +#-- sign: Generate PGP signature file +# +BUILDENV=(!distcc color ccache check !sign) +# +#-- If using DistCC, your MAKEFLAGS will also need modification. In addition, +#-- specify a space-delimited list of hosts running in the DistCC cluster. +#DISTCC_HOSTS="" +# +#-- Specify a directory for package building. +#BUILDDIR=/tmp/makepkg + +######################################################################### +# GLOBAL PACKAGE OPTIONS +# These are default values for the options=() settings +######################################################################### +# +# Default: OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !optipng !upx !debug) +# A negated option will do the opposite of the comments below. +# +#-- strip: Strip symbols from binaries/libraries +#-- docs: Save doc directories specified by DOC_DIRS +#-- libtool: Leave libtool (.la) files in packages +#-- staticlibs: Leave static library (.a) files in packages +#-- emptydirs: Leave empty directories in packages +#-- zipman: Compress manual (man and info) pages in MAN_DIRS with gzip +#-- purge: Remove files specified by PURGE_TARGETS +#-- debug: Add debugging flags as specified in DEBUG_* variables +# +OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug lto) + +#-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512 +INTEGRITY_CHECK=(md5) +#-- Options to be used when stripping binaries. See `man strip' for details. +STRIP_BINARIES="--strip-all" +#-- Options to be used when stripping shared libraries. See `man strip' for details. +STRIP_SHARED="--strip-unneeded" +#-- Options to be used when stripping static libraries. See `man strip' for details. +STRIP_STATIC="--strip-debug" +#-- Manual (man and info) directories to compress (if zipman is specified) +MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info}) +#-- Doc directories to remove (if !docs is specified) +DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc}) +#-- Files to be removed from all packages (if purge is specified) +PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod) + +######################################################################### +# PACKAGE OUTPUT +######################################################################### +# +# Default: put built package and cached source in build directory +# +#-- Destination: specify a fixed directory where all packages will be placed +#PKGDEST=/home/packages +#-- Source cache: specify a fixed directory where source files will be cached +#SRCDEST=/home/sources +#-- Source packages: specify a fixed directory where all src packages will be placed +#SRCPKGDEST=/home/srcpackages +#-- Log files: specify a fixed directory where all log files will be placed +#LOGDEST=/home/makepkglogs +#-- Packager: name/email of the person or organization building packages +#PACKAGER="John Doe " +#-- Specify a key to use for package signing +#GPGKEY="" + +######################################################################### +# COMPRESSION DEFAULTS +######################################################################### +# +COMPRESSGZ=(gzip -c -f -n) +COMPRESSBZ2=(bzip2 -c -f) +COMPRESSXZ=(xz -9 -c -z -) +COMPRESSZST=(zstd -14 -c -T0 -) +COMPRESSLRZ=(lrzip -q) +COMPRESSLZO=(lzop -q) +COMPRESSZ=(compress -c -f) +COMPRESSLZ4=(lz4 -q) +COMPRESSLZ=(lzip -c -f) + + +######################################################################### +# EXTENSION DEFAULTS +######################################################################### +# +# WARNING: Do NOT modify these variables unless you know what you are +# doing. +# +PKGEXT='.pkg.tar.zst' +SRCEXT='.src.tar.gz' + +# vim: set ft=sh ts=2 sw=2 et: