visualboyadvance-m/tools/win/mac-cross-builder

41 lines
1.8 KiB
Bash
Executable File

#!/usr/local/bin/bash
set -e
TAR=tar
. "${0%/*}/../builder/mingw-cross.sh"
set_host_env_hook() {
export COMMAND_MODE=unix2003
export CC='ccache clang'
export CXX='ccache clang++'
export CC_ORIG=clang
export CXX_ORIG=clang++
export CPPFLAGS="-I$BUILD_ROOT/root/include -DICONV_CONST="
export CFLAGS="-fPIC -I$BUILD_ROOT/root/include -L$BUILD_ROOT/root/lib -framework Carbon -framework Foundation -framework CoreServices -Wno-unused-command-line-argument -DICONV_CONST= -Wl,-no_compact_unwind"
export CXXFLAGS="-fPIC -I$BUILD_ROOT/root/include -L$BUILD_ROOT/root/lib -std=gnu++11 -fpermissive -stdlib=libc++ -framework Carbon -framework Foundation -framework CoreServices -Wno-unused-command-line-argument -DICONV_CONST= -Wl,-no_compact_unwind"
export OBJCXXFLAGS="-fPIC -I$BUILD_ROOT/root/include -L$BUILD_ROOT/root/lib -std=gnu++11 -fpermissive -stdlib=libc++ -framework Carbon -framework Foundation -framework CoreServices -Wno-unused-command-line-argument -DICONV_CONST= -Wl,-no_compact_unwind"
export LDFLAGS="-fPIC -L$BUILD_ROOT/root/lib -framework Carbon -framework Foundation -framework CoreServices -Wno-unused-command-line-argument -Wl,-no_compact_unwind"
}
unset_host_env_hook() {
unset COMMAND_MODE
}
table_line_remove DISTS flex
table_line_remove DISTS libsecret
# issues with perl modules linked to our libs and brew perl
table_line_remove DISTS shared-mime-info
# -Wl,-no_compact_unwind must be passed in LDFLAGS to openssl
table_line_append DIST_MAKE_ARGS openssl "LDFLAGS=\"\$LDFLAGS\""
table_line_replace DIST_CONFIGURE_OVERRIDES openssl './Configure darwin64-x86_64-cc no-shared --prefix=/usr --openssldir=/etc/ssl'
# m4 crashes on 10.13
table_line_append DIST_PATCHES m4 '-p0 https://raw.githubusercontent.com/macports/macports-ports/edf0ee1e2cf/devel/m4/files/secure_snprintf.patch'
builder "$@"