summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichel Zou2019-01-05 09:51:58 +0100
committerMichel Zou2019-01-05 09:51:58 +0100
commit6c06a0657c9d28e0febbaac8fa315eb4fefbe1a3 (patch)
tree0905a6efa045541e51777012f87f73d25f1325a0
parent016a2198015ee4c588e45c459b8c11a64cad6e8a (diff)
downloadaur-6c06a0657c9d28e0febbaac8fa315eb4fefbe1a3.tar.gz
flags: remove -g, add -fno-plt, set ldflags
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD2
-rw-r--r--mingw-configure.sh20
3 files changed, 14 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c6bdc26c743c..76d3db872db5 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,7 @@
-# Generated by mksrcinfo v8
-# Thu May 3 19:34:27 UTC 2018
pkgbase = mingw-w64-configure
pkgdesc = configure wrapper for MinGW (mingw-w64)
pkgver = 0.1.1
- pkgrel = 2
+ pkgrel = 2.2
url = http://fedoraproject.org/wiki/MinGW
arch = any
license = GPL
diff --git a/PKGBUILD b/PKGBUILD
index 89fa47d0cc1d..c10cf724eca1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
pkgname=mingw-w64-configure
pkgver=0.1.1
-pkgrel=2
+pkgrel=2.2
arch=(any)
pkgdesc="configure wrapper for MinGW (mingw-w64)"
depends=('mingw-w64-gcc' 'mingw-w64-pkg-config')
diff --git a/mingw-configure.sh b/mingw-configure.sh
index e3b6e6b9dff9..dbfee4ba652d 100644
--- a/mingw-configure.sh
+++ b/mingw-configure.sh
@@ -2,18 +2,22 @@
# check if last arg is a path to configure, else use parent
for last; do true; done
-if test -x "${last}/configure"
-then
+if test -x "${last}/configure"; then
config_path="$last"
else
config_path=".."
fi
-mingw_c_flags="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4"
-LDFLAGS=""
-export CFLAGS="$mingw_c_flags $CFLAGS"
-export CXXFLAGS="$mingw_c_flags $CXXFLAGS"
-${config_path}/configure --host=@TRIPLE@ --target=@TRIPLE@ --build="$CHOST" \
+default_mingw_pp_flags="-D_FORTIFY_SOURCE=2"
+default_mingw_compiler_flags="-O2 -pipe -fno-plt -fexceptions --param=ssp-buffer-size=4"
+default_mingw_linker_flags="-Wl,-O1,--sort-common,--as-needed"
+
+export CPPFLAGS="${MINGW_CPPFLAGS:-$default_mingw_pp_flags $CPPFLAGS}"
+export CFLAGS="${MINGW_CFLAGS:-$default_mingw_compiler_flags $CFLAGS}"
+export CXXFLAGS="${MINGW_CXXFLAGS:-$default_mingw_compiler_flags $CXXFLAGS}"
+export LDFLAGS="${MINGW_LDFLAGS:-$default_mingw_linker_flags $LDFLAGS}"
+
+${config_path}/configure \
+ --host=@TRIPLE@ --target=@TRIPLE@ --build="$CHOST" \
--prefix=/usr/@TRIPLE@ --libdir=/usr/@TRIPLE@/lib --includedir=/usr/@TRIPLE@/include \
--enable-shared --enable-static "$@"
-