summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichel Zou2019-12-02 19:23:45 +0100
committerMichel Zou2019-12-02 19:23:45 +0100
commitfe3c09055b4d210e65a6dac4e2f37f81e5b39859 (patch)
tree1cc4eccc071a4af1faa115879fa36711ef5fc5a2
parente91e9234bda0a0a325ba785639d01927bfbc0d66 (diff)
downloadaur-fe3c09055b4d210e65a6dac4e2f37f81e5b39859.tar.gz
clear default flags
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD7
-rw-r--r--mingw-cmake.sh5
-rw-r--r--override-mingw.cmake2
4 files changed, 11 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index da58e0af857..f8ef919b05f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -12,6 +12,8 @@ pkgbase = mingw-w64-cmake
source = mingw-cmake.sh
source = mingw-cmake-py.sh
source = toolchain-mingw.cmake
+ source = override-mingw.cmake
+ sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
diff --git a/PKGBUILD b/PKGBUILD
index ecf3c695bc3..fb4027f774b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,14 +10,16 @@ license=("GPL")
url="http://fedoraproject.org/wiki/MinGW"
source=("mingw-cmake.sh"
"mingw-cmake-py.sh"
- "toolchain-mingw.cmake")
-sha256sums=('SKIP' 'SKIP' "SKIP")
+ "toolchain-mingw.cmake"
+ "override-mingw.cmake")
+sha256sums=('SKIP' 'SKIP' 'SKIP' 'SKIP')
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
_python_versions="27 36 37 38"
build() {
for _arch in ${_architectures}; do
sed "s|@TRIPLE@|${_arch}|g;s|@PROCESSOR@|${_arch::-12}|g" toolchain-mingw.cmake > toolchain-${_arch}.cmake
+ sed "s|@TRIPLE@|${_arch}|g;s|@PROCESSOR@|${_arch::-12}|g" override-mingw.cmake > override-${_arch}.cmake
sed "s|@TRIPLE@|${_arch}|g" mingw-cmake.sh > ${_arch}-cmake
for _pyver in ${_python_versions}; do
sed "s|@TRIPLE@|${_arch}|g;s|@PYMAJMIN@|${_pyver}|g" mingw-cmake-py.sh > ${_arch}-cmake-py${_pyver}
@@ -30,6 +32,7 @@ package() {
install -d "${pkgdir}"/usr/share/mingw
for _arch in ${_architectures}; do
install -m 644 toolchain-${_arch}.cmake "${pkgdir}"/usr/share/mingw/
+ install -m 644 override-${_arch}.cmake "${pkgdir}"/usr/share/mingw/
install -m 755 ${_arch}-cmake "${pkgdir}"/usr/bin/
for _pyver in ${_python_versions}; do
install -m 755 ${_arch}-cmake-py${_pyver} "${pkgdir}"/usr/bin/
diff --git a/mingw-cmake.sh b/mingw-cmake.sh
index 46d3fe234ef..d801a1a1d47 100644
--- a/mingw-cmake.sh
+++ b/mingw-cmake.sh
@@ -3,11 +3,9 @@ mingw_prefix=/usr/@TRIPLE@
export PKG_CONFIG_LIBDIR="${mingw_prefix}/lib/pkgconfig"
-default_mingw_pp_flags="-D_FORTIFY_SOURCE=2"
-default_mingw_compiler_flags="$default_mingw_pp_flags -O2 -pipe -fno-plt -fexceptions --param=ssp-buffer-size=4"
+default_mingw_compiler_flags="-D_FORTIFY_SOURCE=2 -O2 -pipe -fno-plt -fexceptions --param=ssp-buffer-size=4"
default_mingw_linker_flags="-Wl,-O1,--sort-common,--as-needed -fstack-protector"
-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}"
@@ -23,6 +21,7 @@ PATH=${mingw_prefix}/bin:$PATH cmake \
-DCMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES:PATH=${mingw_prefix}/include \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DCMAKE_TOOLCHAIN_FILE=/usr/share/mingw/toolchain-@TRIPLE@.cmake \
+ -DCMAKE_USER_MAKE_RULES_OVERRIDE=/usr/share/mingw/override-@TRIPLE@.cmake \
-DCMAKE_CROSSCOMPILING_EMULATOR=/usr/bin/@TRIPLE@-wine \
-DCMAKE_BUILD_TYPE=Release \
"$@"
diff --git a/override-mingw.cmake b/override-mingw.cmake
new file mode 100644
index 00000000000..5cdffbc8587
--- /dev/null
+++ b/override-mingw.cmake
@@ -0,0 +1,2 @@
+set (CMAKE_C_FLAGS_RELEASE_INIT "")
+set (CMAKE_CXX_FLAGS_RELEASE_INIT "")