[iortcw] 56/152: All: Prefer mingw-w64 for cross-compiling
Simon McVittie
smcv at debian.org
Fri Sep 8 10:39:59 UTC 2017
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to annotated tag 1.5a
in repository iortcw.
commit 0d2262b5480e7fce1e350098639c82c9d51f9432
Author: MAN-AT-ARMS <M4N4T4RMS at gmail.com>
Date: Thu May 12 15:50:06 2016 -0400
All: Prefer mingw-w64 for cross-compiling
---
MP/Makefile | 4 ++--
MP/cross-make-mingw.sh | 18 ++++++++++++++----
MP/cross-make-mingw64.sh | 16 +++++++++++++---
SP/Makefile | 4 ++--
SP/cross-make-mingw.sh | 4 ++--
SP/cross-make-mingw64.sh | 2 +-
6 files changed, 34 insertions(+), 14 deletions(-)
diff --git a/MP/Makefile b/MP/Makefile
index af3a057..7488730 100644
--- a/MP/Makefile
+++ b/MP/Makefile
@@ -597,10 +597,10 @@ ifdef MINGW
# We need to figure out the correct gcc and windres
ifeq ($(ARCH),x86_64)
- MINGW_PREFIXES=amd64-mingw32msvc x86_64-w64-mingw32
+ MINGW_PREFIXES=x86_64-w64-mingw32 amd64-mingw32msvc
endif
ifeq ($(ARCH),x86)
- MINGW_PREFIXES=i586-mingw32msvc i686-w64-mingw32 i686-pc-mingw32
+ MINGW_PREFIXES=i686-w64-mingw32 i586-mingw32msvc i686-pc-mingw32
endif
ifndef CC
diff --git a/MP/cross-make-mingw.sh b/MP/cross-make-mingw.sh
index f78aa26..def3b78 100755
--- a/MP/cross-make-mingw.sh
+++ b/MP/cross-make-mingw.sh
@@ -4,9 +4,9 @@
if [ "$ARCH" = "x86_64" ];
then
- CMD_PREFIX="amd64-mingw32msvc x86_64-w64-mingw32"
+ CMD_PREFIX="x86_64-w64-mingw32 amd64-mingw32msvc"
else
- CMD_PREFIX="i586-mingw32msvc i686-w64-mingw32"
+ CMD_PREFIX="i686-w64-mingw32 i586-mingw32msvc i686-pc-mingw32"
export ARCH=x86
fi
@@ -25,6 +25,16 @@ if [ "X$CC" = "X" ]; then
done
fi
+if [ "X$CXX" = "X" ]; then
+ for check in $CMD_PREFIX; do
+ full_check="${check}-g++"
+ which "$full_check" > /dev/null 2>&1
+ if [ "$?" = "0" ]; then
+ export CXX="$full_check"
+ fi
+ done
+fi
+
if [ "X$WINDRES" = "X" ]; then
for check in $CMD_PREFIX; do
full_check="${check}-windres"
@@ -35,8 +45,8 @@ if [ "X$WINDRES" = "X" ]; then
done
fi
-if [ "X$WINDRES" = "X" -o "X$CC" = "X" ]; then
- echo "Error: Must define or find WINDRES and CC"
+if [ "X$WINDRES" = "X" -o "X$CC" = "X" -o "X$CXX" = "X" ]; then
+ echo "Error: Must define or find WINDRES, CC, and CXX"
exit 1
fi
diff --git a/MP/cross-make-mingw64.sh b/MP/cross-make-mingw64.sh
index 778e20d..47f54d9 100755
--- a/MP/cross-make-mingw64.sh
+++ b/MP/cross-make-mingw64.sh
@@ -2,7 +2,7 @@
# Note: This works in Linux and cygwin
-CMD_PREFIX="amd64-mingw32msvc x86_64-w64-mingw32";
+CMD_PREFIX="x86_64-w64-mingw32 amd64-mingw32msvc";
if [ "X$CC" = "X" ]; then
for check in $CMD_PREFIX; do
@@ -14,6 +14,16 @@ if [ "X$CC" = "X" ]; then
done
fi
+if [ "X$CXX" = "X" ]; then
+ for check in $CMD_PREFIX; do
+ full_check="${check}-g++"
+ which "$full_check" > /dev/null 2>&1
+ if [ "$?" = "0" ]; then
+ export CXX="$full_check"
+ fi
+ done
+fi
+
if [ "X$WINDRES" = "X" ]; then
for check in $CMD_PREFIX; do
full_check="${check}-windres"
@@ -24,8 +34,8 @@ if [ "X$WINDRES" = "X" ]; then
done
fi
-if [ "X$WINDRES" = "X" -o "X$CC" = "X" ]; then
- echo "Error: Must define or find WINDRES and CC"
+if [ "X$WINDRES" = "X" -o "X$CC" = "X" -o "X$CXX" = "X" ]; then
+ echo "Error: Must define or find WINDRES, CC, and CXX"
exit 1
fi
diff --git a/SP/Makefile b/SP/Makefile
index f074551..9442b62 100644
--- a/SP/Makefile
+++ b/SP/Makefile
@@ -586,10 +586,10 @@ ifdef MINGW
# We need to figure out the correct gcc and windres
ifeq ($(ARCH),x86_64)
- MINGW_PREFIXES=amd64-mingw32msvc x86_64-w64-mingw32
+ MINGW_PREFIXES=x86_64-w64-mingw32 amd64-mingw32msvc
endif
ifeq ($(ARCH),x86)
- MINGW_PREFIXES=i586-mingw32msvc i686-w64-mingw32 i686-pc-mingw32
+ MINGW_PREFIXES=i686-w64-mingw32 i586-mingw32msvc i686-pc-mingw32
endif
ifndef CC
diff --git a/SP/cross-make-mingw.sh b/SP/cross-make-mingw.sh
index 66ba11b..def3b78 100755
--- a/SP/cross-make-mingw.sh
+++ b/SP/cross-make-mingw.sh
@@ -4,9 +4,9 @@
if [ "$ARCH" = "x86_64" ];
then
- CMD_PREFIX="amd64-mingw32msvc x86_64-w64-mingw32"
+ CMD_PREFIX="x86_64-w64-mingw32 amd64-mingw32msvc"
else
- CMD_PREFIX="i586-mingw32msvc i686-w64-mingw32"
+ CMD_PREFIX="i686-w64-mingw32 i586-mingw32msvc i686-pc-mingw32"
export ARCH=x86
fi
diff --git a/SP/cross-make-mingw64.sh b/SP/cross-make-mingw64.sh
index 6589efd..47f54d9 100755
--- a/SP/cross-make-mingw64.sh
+++ b/SP/cross-make-mingw64.sh
@@ -2,7 +2,7 @@
# Note: This works in Linux and cygwin
-CMD_PREFIX="amd64-mingw32msvc x86_64-w64-mingw32";
+CMD_PREFIX="x86_64-w64-mingw32 amd64-mingw32msvc";
if [ "X$CC" = "X" ]; then
for check in $CMD_PREFIX; do
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/iortcw.git
More information about the Pkg-games-commits
mailing list