[devtools] sync makepkg.conf with the pacman package

Message ID 20210413211830.1335462-1-eschwartz@archlinux.org
State Accepted, archived
Headers show
Series [devtools] sync makepkg.conf with the pacman package | expand

Commit Message

Eli Schwartz April 13, 2021, 9:18 p.m. UTC
Aside for comments, this implements the buildflags RFC from:

https://lists.archlinux.org/pipermail/arch-dev-public/2021-March/030374.html
https://gitlab.archlinux.org/archlinux/rfcs/-/merge_requests/3
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
---
 makepkg-x86_64.conf | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

Patch

diff --git a/makepkg-x86_64.conf b/makepkg-x86_64.conf
index 3a1384f..16a6247 100644
--- a/makepkg-x86_64.conf
+++ b/makepkg-x86_64.conf
@@ -38,15 +38,20 @@  CARCH="x86_64"
 CHOST="x86_64-pc-linux-gnu"
 
 #-- Compiler and Linker Flags
-CPPFLAGS="-D_FORTIFY_SOURCE=2"
-CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt"
-CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt"
+#CPPFLAGS=""
+CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions \
+        -Wp,-D_FORTIFY_SOURCE=2,-D_GLIBCXX_ASSERTIONS \
+        -Wformat -Werror=format-security \
+        -fstack-clash-protection -fcf-protection"
+CXXFLAGS="$CFLAGS"
 LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
+#RUSTFLAGS="-C opt-level=2"
 #-- Make Flags: change this for DistCC/SMP systems
 #MAKEFLAGS="-j2"
 #-- Debugging flags
 DEBUG_CFLAGS="-g -fvar-tracking-assignments"
 DEBUG_CXXFLAGS="-g -fvar-tracking-assignments"
+#DEBUG_RUSTFLAGS="-C debuginfo=2"
 
 #########################################################################
 # BUILD ENVIRONMENT
@@ -89,7 +94,7 @@  BUILDENV=(!distcc color !ccache check !sign)
 #
 OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug)
 
-#-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512
+#-- File integrity checks to use. Valid: md5, sha1, sha224, sha256, sha384, sha512, b2
 INTEGRITY_CHECK=(md5)
 #-- Options to be used when stripping binaries. See `man strip' for details.
 STRIP_BINARIES="--strip-all"