Build “fat binaries” for macOS (#1461)

The same binary, both for Intel and ARM Macs!

Builds libpng manually since the lib Brew distributes only contains code for the host arch.
This commit is contained in:
Eldred Habert
2024-08-09 19:18:58 +02:00
committed by GitHub
parent 2d530dbcd6
commit 718066c2cf
5 changed files with 48 additions and 22 deletions

View File

@@ -1,5 +1,5 @@
#!/bin/sh
set -e
#!/bin/bash
set -euo pipefail
pngver=1.6.43
arch="$1"
@@ -27,7 +27,7 @@ cd build
--prefix="/usr/$arch" \
--enable-shared --disable-static \
CPPFLAGS="-D_FORTIFY_SOURCE=2" \
CFLAGS="-O2 -pipe -fno-plt -fexceptions --param=ssp-buffer-size=4" \
CFLAGS="-O2 -pipe -fno-plt -fno-exceptions --param=ssp-buffer-size=4" \
LDFLAGS="-Wl,-O1,--sort-common,--as-needed -fstack-protector"
make -kj
make install
sudo make install