From 3e5f43a7bdc22fa7a205af0ff490fd98c4549c75 Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Sat, 31 Jan 2015 12:31:51 -0800 Subject: [PATCH 1/4] Start of proper UB support on OS X --- libretro-config.sh | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/libretro-config.sh b/libretro-config.sh index 598d794d..be7b9c1b 100755 --- a/libretro-config.sh +++ b/libretro-config.sh @@ -139,7 +139,32 @@ export RA_ANDROID_API=android-18 # Retroarch minimum API level (defines low end android version compatability) export RA_ANDROID_MIN_API=android-9 -# Core build summary +#OSX DEFINES +#=========== + +# Define this to skip the universal build +# export NOUNIVERSAL=1 + +if [[ "${FORMAT_COMPILER_TARGET}" = "osx" && -z "${NOUNIVERSAL}" ]]; then + case "${ARCH}" in + i385|x86_64) + export ARCHFLAGS="-arch i386 -arch x86_64" + + # FIXME: These are a temp shortcut for approx 40 cores 2015-02-01 + export CFLAGS="-arch i386 -arch x86_64 ${CFLAGS}" + export CXXFLAGS="-arch i386 -arch x86_64 ${CXXFLAGS}" + export LDFLAGS="-arch i386 -arch x86_64 ${LDFLAGS}" + ;; + ppc|ppc64) + export ARCHFLAGS="-arch ppc -arch ppc64" + ;; + *) + echo "Universal build requested with unknown ARCH=\"${ARCH}\"" + esac +fi + +#CORE BUILD SUMMARY +#================== # Set this to disable the core build summary # export NOBUILD_SUMMARY=1 From c175c6ae9f99e980ed295de0b0145ae7e90866d8 Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Sat, 31 Jan 2015 12:56:25 -0800 Subject: [PATCH 2/4] Use .gitignore to make "git status" more useful --- .gitignore | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..ef54053a --- /dev/null +++ b/.gitignore @@ -0,0 +1,66 @@ +/libretro-2048 +/libretro-3dengine +/libretro-4do/ +/libretro-bluemsx/ +/libretro-bnes/ +/libretro-bsnes/ +/libretro-bsnes_cplusplus98/ +/libretro-bsnes_mercury/ +/libretro-catsfc/ +/libretro-config-user.sh +/libretro-desmume/ +/libretro-dinothawr/ +/libretro-dosbox/ +/libretro-emux/ +/libretro-fb_alpha/ +/libretro-fceumm/ +/libretro-ffmpeg/ +/libretro-fmsx/ +/libretro-gambatte/ +/libretro-genesis_plus_gx/ +/libretro-gpsp/ +/libretro-handy/ +/libretro-hatari/ +/libretro-mame/ +/libretro-mame078/ +/libretro-mame139/ +/libretro-manifest/ +/libretro-mednafen_gba/ +/libretro-mednafen_lynx/ +/libretro-mednafen_ngp/ +/libretro-mednafen_pce_fast/ +/libretro-mednafen_pcfx/ +/libretro-mednafen_psx/ +/libretro-mednafen_snes/ +/libretro-mednafen_supergrafx/ +/libretro-mednafen_vb/ +/libretro-mednafen_wswan/ +/libretro-meteor/ +/libretro-mupen64plus/ +/libretro-nestopia/ +/libretro-nxengine/ +/libretro-o2em/ +/libretro-pcsx_rearmed/ +/libretro-picodrive/ +/libretro-ppsspp/ +/libretro-prboom/ +/libretro-prosystem/ +/libretro-quicknes/ +/libretro-remotejoy/ +/libretro-scummvm/ +/libretro-snes9x/ +/libretro-snes9x_next/ +/libretro-stella/ +/libretro-stonesoup/ +/libretro-tempgba/ +/libretro-tgbdual/ +/libretro-tyrquake/ +/libretro-uae/ +/libretro-vba_next/ +/libretro-vbam/ +/libretro-vecx/ +/libretro-virtualjaguar/ +/libretro-yabause/ +/libretrodb/ +/retroarch/ +/build-summary.log From 948e743d64198a6e72b14f0b6e8cba01e70d5e18 Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Sat, 31 Jan 2015 20:43:57 -0800 Subject: [PATCH 3/4] Comment temporary UB stuff for OSX --- libretro-config.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libretro-config.sh b/libretro-config.sh index be7b9c1b..12778804 100755 --- a/libretro-config.sh +++ b/libretro-config.sh @@ -151,9 +151,9 @@ if [[ "${FORMAT_COMPILER_TARGET}" = "osx" && -z "${NOUNIVERSAL}" ]]; then export ARCHFLAGS="-arch i386 -arch x86_64" # FIXME: These are a temp shortcut for approx 40 cores 2015-02-01 - export CFLAGS="-arch i386 -arch x86_64 ${CFLAGS}" - export CXXFLAGS="-arch i386 -arch x86_64 ${CXXFLAGS}" - export LDFLAGS="-arch i386 -arch x86_64 ${LDFLAGS}" + #export CFLAGS="-arch i386 -arch x86_64 ${CFLAGS}" + #export CXXFLAGS="-arch i386 -arch x86_64 ${CXXFLAGS}" + #export LDFLAGS="-arch i386 -arch x86_64 ${LDFLAGS}" ;; ppc|ppc64) export ARCHFLAGS="-arch ppc -arch ppc64" From f176a81d18b89658daf24f9f4b4c55587ebc7fbc Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Sun, 1 Feb 2015 00:42:43 -0800 Subject: [PATCH 4/4] Clean up and document OS X univeral build stuff --- libretro-config.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/libretro-config.sh b/libretro-config.sh index 12778804..c5baefe9 100755 --- a/libretro-config.sh +++ b/libretro-config.sh @@ -145,15 +145,20 @@ export RA_ANDROID_MIN_API=android-9 # Define this to skip the universal build # export NOUNIVERSAL=1 +# ARCHFLAGS is a very convenient way of doing this for simple/obvious cores +# that don't need anything defined on the command line for 32 vs 64 bit +# systems, however it won't work for anything that does. For that, you need +# to do two separate builds, one for each arch, and then do something like: +# lipo -create core_i386.dylib core_x86_64.dylib -output core_ub.dylib +# +# If building on 10.5/10.6, it's possible that you could actually build a UB +# for Intel/PowerPC, but please don't. ;) Consider this a proof of concept +# for now just to test a few cores. + if [[ "${FORMAT_COMPILER_TARGET}" = "osx" && -z "${NOUNIVERSAL}" ]]; then case "${ARCH}" in i385|x86_64) export ARCHFLAGS="-arch i386 -arch x86_64" - - # FIXME: These are a temp shortcut for approx 40 cores 2015-02-01 - #export CFLAGS="-arch i386 -arch x86_64 ${CFLAGS}" - #export CXXFLAGS="-arch i386 -arch x86_64 ${CXXFLAGS}" - #export LDFLAGS="-arch i386 -arch x86_64 ${LDFLAGS}" ;; ppc|ppc64) export ARCHFLAGS="-arch ppc -arch ppc64"