Commit 430b5d63 authored by Rafael Kitover's avatar Rafael Kitover
Browse files

fix Mac OS 10.13 build issues

Compile out the min/max functions in GBALink.cpp when compiling with
clang, clang does not like them because of some sort of changes in the
preprocessor.

Run the mac builder script with homebrew bash, system bash does not work
and dash no longer works.

TODO: fix dash compat
parent 9222894c
...@@ -49,6 +49,12 @@ enum siocnt_lo_32bit { ...@@ -49,6 +49,12 @@ enum siocnt_lo_32bit {
SIO_IRQ_ENABLE = 0x4000 SIO_IRQ_ENABLE = 0x4000
}; };
#ifdef __clang__
// don't define these min/max functions, they don't compile
#else
// The usual min/max functions for built-in types. // The usual min/max functions for built-in types.
// //
// template<typename T> T min( T x, T y ) { return x < y ? x : y; } // template<typename T> T min( T x, T y ) { return x < y ? x : y; }
...@@ -80,6 +86,8 @@ BLARGG_DEF_MIN_MAX(double) ...@@ -80,6 +86,8 @@ BLARGG_DEF_MIN_MAX(double)
#undef max #undef max
#define max blargg_max #define max blargg_max
#endif // not clang
// Joybus // Joybus
bool gba_joybus_enabled = false; bool gba_joybus_enabled = false;
bool gba_joybus_active = false; bool gba_joybus_active = false;
......
...@@ -20,6 +20,7 @@ export CXX="\${CXX:-g++}" ...@@ -20,6 +20,7 @@ export CXX="\${CXX:-g++}"
case "\$CC" in case "\$CC" in
ccache*) ccache*)
:
;; ;;
*) *)
if command -v ccache >/dev/null; then if command -v ccache >/dev/null; then
......
#!/bin/sh #!/usr/local/bin/bash
set -e set -e
# bash 3 does not work for this code ## bash 3 does not work for this code
if [ -z "$IN_DASH" ]; then #if [ -z "$IN_DASH" ]; then
if command -v dash >/dev/null; then # if command -v dash >/dev/null; then
export IN_DASH=1 # export IN_DASH=1
exec dash "$0" "$@" # exec dash "$0" "$@"
else # else
echo >&2 "please install dash from homebrew or macports to run this script" # echo >&2 "please install dash from homebrew or macports to run this script"
exit 1 # exit 1
fi # fi
fi #fi
BUILD_ROOT=$HOME/vbam-build-mac BUILD_ROOT=$HOME/vbam-build-mac
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment