Fix mingw-on-linux builds
This commit is contained in:
parent
84d6ca6938
commit
286d0d60b9
7
.github/build.sh
vendored
7
.github/build.sh
vendored
@ -69,11 +69,11 @@ if [ $PLATFORM_SHORT == "lin" ]; then
|
|||||||
# pthread_create, thanks to weak symbols in libstdc++.so (or something). See
|
# pthread_create, thanks to weak symbols in libstdc++.so (or something). See
|
||||||
# https://gcc.gnu.org/legacy-ml/gcc-help/2017-03/msg00081.html
|
# https://gcc.gnu.org/legacy-ml/gcc-help/2017-03/msg00081.html
|
||||||
other_flags+=$'\t-Db_asneeded=false\t-Dcpp_link_args=-Wl,--no-as-needed'
|
other_flags+=$'\t-Db_asneeded=false\t-Dcpp_link_args=-Wl,--no-as-needed'
|
||||||
if [ $STATIC_DYNAMIC == "static" ]; then
|
if [ $STATIC_DYNAMIC == "static" ] && [ $TOOLSET_SHORT == "gcc" ]; then
|
||||||
other_flags+=$'\t-Dbuild_render=true\t-Dbuild_font=true'
|
other_flags+=$'\t-Dbuild_render=true\t-Dbuild_font=true'
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ $PLATFORM_SHORT == "win" ]; then
|
if [ $TOOLSET_SHORT == "mingw" ]; then
|
||||||
bin_suffix=$bin_suffix.exe
|
bin_suffix=$bin_suffix.exe
|
||||||
fi
|
fi
|
||||||
stable_or_beta="n"
|
stable_or_beta="n"
|
||||||
@ -107,6 +107,9 @@ lto_flag=-Db_lto=true
|
|||||||
if [ $TOOLSET_SHORT == "mingw" ]; then
|
if [ $TOOLSET_SHORT == "mingw" ]; then
|
||||||
# This simply doesn't work with MinGW. I have no idea why and I also don't care.
|
# This simply doesn't work with MinGW. I have no idea why and I also don't care.
|
||||||
lto_flag=
|
lto_flag=
|
||||||
|
if [ $PLATFORM_SHORT == "lin" ]; then
|
||||||
|
other_flags+=$'\t--cross-file=.github/mingw-ghactions.ini'
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
meson -Dbuildtype=release -Db_pie=false -Db_staticpic=false $lto_flag $static_flag -Dinstall_check=true $other_flags build
|
meson -Dbuildtype=release -Db_pie=false -Db_staticpic=false $lto_flag $static_flag -Dinstall_check=true $other_flags build
|
||||||
cd build
|
cd build
|
||||||
|
14
.github/mingw-ghactions.ini
vendored
Normal file
14
.github/mingw-ghactions.ini
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
[constants]
|
||||||
|
prefix = 'x86_64-w64-mingw32'
|
||||||
|
|
||||||
|
[binaries]
|
||||||
|
c = prefix + '-gcc-posix'
|
||||||
|
cpp = prefix + '-g++-posix'
|
||||||
|
strip = prefix + '-strip'
|
||||||
|
windres = prefix + '-windres'
|
||||||
|
|
||||||
|
[host_machine]
|
||||||
|
system = 'windows'
|
||||||
|
cpu_family = 'x86_64'
|
||||||
|
cpu = 'x86_64'
|
||||||
|
endian = 'little'
|
12
.github/workflows/build.yaml
vendored
12
.github/workflows/build.yaml
vendored
@ -48,10 +48,10 @@ jobs:
|
|||||||
# --------------+------------+------------+------------+------------+------------+------------+
|
# --------------+------------+------------+------------+------------+------------+------------+
|
||||||
# gcc-static | | | NO | NO | NO | NO |
|
# gcc-static | | | NO | NO | NO | NO |
|
||||||
# msvc-static | NO | NO | | NO | NO | |
|
# msvc-static | NO | NO | | NO | NO | |
|
||||||
# mingw-static | NO | NO | | NO | NO | NO |
|
# mingw-static | | NO | | NO | NO | NO |
|
||||||
# gcc-dynamic | | | NO | NO | NO | NO |
|
# gcc-dynamic | | | NO | NO | NO | NO |
|
||||||
# msvc-dynamic | NO | NO | | NO | NO | |
|
# msvc-dynamic | NO | NO | | NO | NO | |
|
||||||
# mingw-dynamic | NO | NO | | NO | NO | NO |
|
# mingw-dynamic | | NO | | NO | NO | NO |
|
||||||
#
|
#
|
||||||
# Please keep this matrix in sync with the other one in this file, see the ### blocks.
|
# Please keep this matrix in sync with the other one in this file, see the ### blocks.
|
||||||
# The only difference should be that the second matrix has all mingw cells disabled; we don't publish mingw builds on starcatcher.
|
# The only difference should be that the second matrix has all mingw cells disabled; we don't publish mingw builds on starcatcher.
|
||||||
@ -65,8 +65,6 @@ jobs:
|
|||||||
exclude:
|
exclude:
|
||||||
- toolset_short: mingw
|
- toolset_short: mingw
|
||||||
machine_short: i686 # remove this line after copying the matrix below
|
machine_short: i686 # remove this line after copying the matrix below
|
||||||
- toolset_short: mingw # remove this line after copying the matrix below
|
|
||||||
platform_short: lin # remove this line after copying the matrix below
|
|
||||||
- toolset_short: mingw # remove this line after copying the matrix below
|
- toolset_short: mingw # remove this line after copying the matrix below
|
||||||
platform_short: mac # remove this line after copying the matrix below
|
platform_short: mac # remove this line after copying the matrix below
|
||||||
- machine_short: i686
|
- machine_short: i686
|
||||||
@ -92,6 +90,10 @@ jobs:
|
|||||||
- platform_short: win
|
- platform_short: win
|
||||||
os: windows-2019
|
os: windows-2019
|
||||||
suffix: '.exe'
|
suffix: '.exe'
|
||||||
|
- platform_short: lin
|
||||||
|
toolset_short: mingw
|
||||||
|
os: ubuntu-20.04
|
||||||
|
suffix: '.exe'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v2
|
||||||
@ -99,6 +101,8 @@ jobs:
|
|||||||
python-version: '3.10'
|
python-version: '3.10'
|
||||||
- id: get_type
|
- id: get_type
|
||||||
run: python3 ./.github/get-type.py ${{ github.ref }}
|
run: python3 ./.github/get-type.py ${{ github.ref }}
|
||||||
|
- if: matrix.platform_short == 'lin' && matrix.toolset_short == 'mingw'
|
||||||
|
run: sudo apt update && sudo apt install g++-mingw-w64-x86-64
|
||||||
- if: matrix.platform_short == 'mac'
|
- if: matrix.platform_short == 'mac'
|
||||||
uses: Homebrew/actions/setup-homebrew@master
|
uses: Homebrew/actions/setup-homebrew@master
|
||||||
- if: matrix.platform_short == 'mac'
|
- if: matrix.platform_short == 'mac'
|
||||||
|
14
cross-examples/mingw.ini
Normal file
14
cross-examples/mingw.ini
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
[constants]
|
||||||
|
prefix = 'x86_64-w64-mingw32'
|
||||||
|
|
||||||
|
[binaries]
|
||||||
|
c = prefix + '-gcc'
|
||||||
|
cpp = prefix + '-g++'
|
||||||
|
strip = prefix + '-strip'
|
||||||
|
windres = prefix + '-windres'
|
||||||
|
|
||||||
|
[host_machine]
|
||||||
|
system = 'windows'
|
||||||
|
cpu_family = 'x86_64'
|
||||||
|
cpu = 'x86_64'
|
||||||
|
endian = 'little'
|
@ -3,7 +3,7 @@ project('the-powder-toy', [ 'c', 'cpp' ], version: 'the.cake.is.a.lie', default_
|
|||||||
])
|
])
|
||||||
|
|
||||||
to_array = generator(
|
to_array = generator(
|
||||||
executable('toarray', sources: 'data/ToArray.cpp'),
|
executable('toarray', sources: 'data/ToArray.cpp', native: true),
|
||||||
output: [ '@PLAINNAME@.cpp', '@PLAINNAME@.h' ],
|
output: [ '@PLAINNAME@.cpp', '@PLAINNAME@.h' ],
|
||||||
arguments: [ '@OUTPUT0@', '@OUTPUT1@', '@INPUT@', '@EXTRA_ARGS@' ]
|
arguments: [ '@OUTPUT0@', '@OUTPUT1@', '@INPUT@', '@EXTRA_ARGS@' ]
|
||||||
)
|
)
|
||||||
@ -53,7 +53,7 @@ endif
|
|||||||
|
|
||||||
uopt_static = get_option('static')
|
uopt_static = get_option('static')
|
||||||
use_tpt_libs = 'no'
|
use_tpt_libs = 'no'
|
||||||
tpt_libs_vtag = 'v20211022224519'
|
tpt_libs_vtag = 'v20211224205921'
|
||||||
if uopt_static == 'system'
|
if uopt_static == 'system'
|
||||||
if copt_platform == 'win'
|
if copt_platform == 'win'
|
||||||
error('no way to find static system libraries on windows')
|
error('no way to find static system libraries on windows')
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#ifdef WIN
|
#ifdef WIN
|
||||||
# include <Windows.h>
|
# include <windows.h>
|
||||||
# include <float.h>
|
# include <float.h>
|
||||||
#else
|
#else
|
||||||
# include <sys/time.h>
|
# include <sys/time.h>
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
[wrap-file]
|
|
||||||
directory = tpt-libs-prebuilt-i686-win-msvc-dynamic-v20211022224519
|
|
||||||
|
|
||||||
source_url = https://github.com/The-Powder-Toy/tpt-libs/releases/download/v20211022224519/tpt-libs-prebuilt-i686-win-msvc-dynamic-v20211022224519.zip
|
|
||||||
source_filename = tpt-libs-prebuilt-i686-win-msvc-dynamic-v20211022224519.zip
|
|
||||||
source_hash = 0e05374cec73600254982af6c8faeae93a7b7d5ea36553d0c2d15bb6684005d1
|
|
@ -0,0 +1,6 @@
|
|||||||
|
[wrap-file]
|
||||||
|
directory = tpt-libs-prebuilt-i686-win-msvc-dynamic-v20211224205921
|
||||||
|
|
||||||
|
source_url = https://github.com/The-Powder-Toy/tpt-libs/releases/download/v20211224205921/tpt-libs-prebuilt-i686-win-msvc-dynamic-v20211224205921.zip
|
||||||
|
source_filename = tpt-libs-prebuilt-i686-win-msvc-dynamic-v20211224205921.zip
|
||||||
|
source_hash = 76102a3e3d325d51325ed3213a1fa86f949656306b16b29c7674eba0dd8ac684
|
@ -1,6 +0,0 @@
|
|||||||
[wrap-file]
|
|
||||||
directory = tpt-libs-prebuilt-i686-win-msvc-static-v20211022224519
|
|
||||||
|
|
||||||
source_url = https://github.com/The-Powder-Toy/tpt-libs/releases/download/v20211022224519/tpt-libs-prebuilt-i686-win-msvc-static-v20211022224519.zip
|
|
||||||
source_filename = tpt-libs-prebuilt-i686-win-msvc-static-v20211022224519.zip
|
|
||||||
source_hash = 681d23de72148efc25f78c758fe51e543c54459741f597221cf76f38dfd0b606
|
|
@ -0,0 +1,6 @@
|
|||||||
|
[wrap-file]
|
||||||
|
directory = tpt-libs-prebuilt-i686-win-msvc-static-v20211224205921
|
||||||
|
|
||||||
|
source_url = https://github.com/The-Powder-Toy/tpt-libs/releases/download/v20211224205921/tpt-libs-prebuilt-i686-win-msvc-static-v20211224205921.zip
|
||||||
|
source_filename = tpt-libs-prebuilt-i686-win-msvc-static-v20211224205921.zip
|
||||||
|
source_hash = 66c481a81ec37f55f1c3aa82eecee4ab12f35142d2501b2f8c2a87c8855345f2
|
@ -1,6 +0,0 @@
|
|||||||
[wrap-file]
|
|
||||||
directory = tpt-libs-prebuilt-x86_64-lin-gcc-static-v20211022224519
|
|
||||||
|
|
||||||
source_url = https://github.com/The-Powder-Toy/tpt-libs/releases/download/v20211022224519/tpt-libs-prebuilt-x86_64-lin-gcc-static-v20211022224519.zip
|
|
||||||
source_filename = tpt-libs-prebuilt-x86_64-lin-gcc-static-v20211022224519.zip
|
|
||||||
source_hash = 9b04f5f3d8a0912970cfe1bf3445005a930f9a3e5403a2815d9f6280125350f0
|
|
@ -0,0 +1,6 @@
|
|||||||
|
[wrap-file]
|
||||||
|
directory = tpt-libs-prebuilt-x86_64-lin-gcc-static-v20211224205921
|
||||||
|
|
||||||
|
source_url = https://github.com/The-Powder-Toy/tpt-libs/releases/download/v20211224205921/tpt-libs-prebuilt-x86_64-lin-gcc-static-v20211224205921.zip
|
||||||
|
source_filename = tpt-libs-prebuilt-x86_64-lin-gcc-static-v20211224205921.zip
|
||||||
|
source_hash = 5e8ff34c738b85ef22735feba5da4991d385e94b7e518c7f12a127745fa64c7f
|
@ -1,6 +0,0 @@
|
|||||||
[wrap-file]
|
|
||||||
directory = tpt-libs-prebuilt-x86_64-mac-gcc-static-v20211022224519
|
|
||||||
|
|
||||||
source_url = https://github.com/The-Powder-Toy/tpt-libs/releases/download/v20211022224519/tpt-libs-prebuilt-x86_64-mac-gcc-static-v20211022224519.zip
|
|
||||||
source_filename = tpt-libs-prebuilt-x86_64-mac-gcc-static-v20211022224519.zip
|
|
||||||
source_hash = 946f3ae27a5f8b28f6abe2486f6ecc36ba96408fd61ee81a3e2985eb30b02dd7
|
|
@ -0,0 +1,6 @@
|
|||||||
|
[wrap-file]
|
||||||
|
directory = tpt-libs-prebuilt-x86_64-mac-gcc-static-v20211224205921
|
||||||
|
|
||||||
|
source_url = https://github.com/The-Powder-Toy/tpt-libs/releases/download/v20211224205921/tpt-libs-prebuilt-x86_64-mac-gcc-static-v20211224205921.zip
|
||||||
|
source_filename = tpt-libs-prebuilt-x86_64-mac-gcc-static-v20211224205921.zip
|
||||||
|
source_hash = b83ad4162d9443bcb22413d2f6107f2a3f479893a9901d2a4dc42993f4c2c7e5
|
@ -1,6 +0,0 @@
|
|||||||
[wrap-file]
|
|
||||||
directory = tpt-libs-prebuilt-x86_64-win-mingw-dynamic-v20211022224519
|
|
||||||
|
|
||||||
source_url = https://github.com/The-Powder-Toy/tpt-libs/releases/download/v20211022224519/tpt-libs-prebuilt-x86_64-win-mingw-dynamic-v20211022224519.zip
|
|
||||||
source_filename = tpt-libs-prebuilt-x86_64-win-mingw-dynamic-v20211022224519.zip
|
|
||||||
source_hash = 72b4c8bcdfe37861326999d394f7fa10093961e2e5de9d59a41a8e323ba009f7
|
|
@ -0,0 +1,6 @@
|
|||||||
|
[wrap-file]
|
||||||
|
directory = tpt-libs-prebuilt-x86_64-win-mingw-dynamic-v20211224205921
|
||||||
|
|
||||||
|
source_url = https://github.com/The-Powder-Toy/tpt-libs/releases/download/v20211224205921/tpt-libs-prebuilt-x86_64-win-mingw-dynamic-v20211224205921.zip
|
||||||
|
source_filename = tpt-libs-prebuilt-x86_64-win-mingw-dynamic-v20211224205921.zip
|
||||||
|
source_hash = 8fa1313574d8cb5a69ca5e05da299885295cc9f205164725d517e2ee762d7cca
|
@ -1,6 +0,0 @@
|
|||||||
[wrap-file]
|
|
||||||
directory = tpt-libs-prebuilt-x86_64-win-mingw-static-v20211022224519
|
|
||||||
|
|
||||||
source_url = https://github.com/The-Powder-Toy/tpt-libs/releases/download/v20211022224519/tpt-libs-prebuilt-x86_64-win-mingw-static-v20211022224519.zip
|
|
||||||
source_filename = tpt-libs-prebuilt-x86_64-win-mingw-static-v20211022224519.zip
|
|
||||||
source_hash = fc0abc52e15f6f3b919fd793a03503e7c1a69465318be9659576f1dfca9ffbd2
|
|
@ -0,0 +1,6 @@
|
|||||||
|
[wrap-file]
|
||||||
|
directory = tpt-libs-prebuilt-x86_64-win-mingw-static-v20211224205921
|
||||||
|
|
||||||
|
source_url = https://github.com/The-Powder-Toy/tpt-libs/releases/download/v20211224205921/tpt-libs-prebuilt-x86_64-win-mingw-static-v20211224205921.zip
|
||||||
|
source_filename = tpt-libs-prebuilt-x86_64-win-mingw-static-v20211224205921.zip
|
||||||
|
source_hash = 4ce448c60122606f942cf8fb25c66e442879390e6cd8ad23eaa3c3780b9c54fc
|
@ -1,6 +0,0 @@
|
|||||||
[wrap-file]
|
|
||||||
directory = tpt-libs-prebuilt-x86_64-win-msvc-dynamic-v20211022224519
|
|
||||||
|
|
||||||
source_url = https://github.com/The-Powder-Toy/tpt-libs/releases/download/v20211022224519/tpt-libs-prebuilt-x86_64-win-msvc-dynamic-v20211022224519.zip
|
|
||||||
source_filename = tpt-libs-prebuilt-x86_64-win-msvc-dynamic-v20211022224519.zip
|
|
||||||
source_hash = 3c28326015e98efe60d178661657dcf56d65c883d95e3cd043943fe55c51ff85
|
|
@ -0,0 +1,6 @@
|
|||||||
|
[wrap-file]
|
||||||
|
directory = tpt-libs-prebuilt-x86_64-win-msvc-dynamic-v20211224205921
|
||||||
|
|
||||||
|
source_url = https://github.com/The-Powder-Toy/tpt-libs/releases/download/v20211224205921/tpt-libs-prebuilt-x86_64-win-msvc-dynamic-v20211224205921.zip
|
||||||
|
source_filename = tpt-libs-prebuilt-x86_64-win-msvc-dynamic-v20211224205921.zip
|
||||||
|
source_hash = 190af54e3b9433c4d7adfd4069ee1768e91aeea917e726087bb15989a93dedd8
|
@ -1,6 +0,0 @@
|
|||||||
[wrap-file]
|
|
||||||
directory = tpt-libs-prebuilt-x86_64-win-msvc-static-v20211022224519
|
|
||||||
|
|
||||||
source_url = https://github.com/The-Powder-Toy/tpt-libs/releases/download/v20211022224519/tpt-libs-prebuilt-x86_64-win-msvc-static-v20211022224519.zip
|
|
||||||
source_filename = tpt-libs-prebuilt-x86_64-win-msvc-static-v20211022224519.zip
|
|
||||||
source_hash = 5982c4408d06649517761a21ec86bae49fd351b1a553b01e99d1afa10f127713
|
|
@ -0,0 +1,6 @@
|
|||||||
|
[wrap-file]
|
||||||
|
directory = tpt-libs-prebuilt-x86_64-win-msvc-static-v20211224205921
|
||||||
|
|
||||||
|
source_url = https://github.com/The-Powder-Toy/tpt-libs/releases/download/v20211224205921/tpt-libs-prebuilt-x86_64-win-msvc-static-v20211224205921.zip
|
||||||
|
source_filename = tpt-libs-prebuilt-x86_64-win-msvc-static-v20211224205921.zip
|
||||||
|
source_hash = 1faaf30a96b29cd6255f6f2919b1e14b81ad5e5a95ec37854b6273b5020cd572
|
Loading…
Reference in New Issue
Block a user