From 6c24564f59da6f2a06734d4eeccc81e2f5c08fcb Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 25 Nov 2013 04:02:44 +0100 Subject: [PATCH] (libretro-build-common) bSNES now uses CXX11 environment variable - set it up properly for Clang --- libretro-build-common.sh | 8 ++++---- libretro-build-ios.sh | 1 + libretro-build.sh | 4 ++++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/libretro-build-common.sh b/libretro-build-common.sh index 2502f750..3abc9f6c 100755 --- a/libretro-build-common.sh +++ b/libretro-build-common.sh @@ -6,7 +6,7 @@ die() { } if [ "${CC}" ] && [ "${CXX}" ]; then - COMPILER="CC=\"${CC}\" CXX=\"${CXX}\"" + COMPILER="CC=\"${CC}\" CXX=\"${CXX}\" CXX11=\"${CXX11}\"" else COMPILER="" fi @@ -509,7 +509,7 @@ build_libretro_bsnes() { cd libretro-bsnes/perf rm -f obj/*.{o,"${FORMAT_EXT}"} - "${MAKE}" -f Makefile platform="${FORMAT_COMPILER_TARGET}" compiler="${CXX}" ui='target-libretro' profile='performance' "-j${JOBS}" || die 'Failed to build bSNES performance core' + "${MAKE}" -f Makefile platform="${FORMAT_COMPILER_TARGET}" compiler="${CXX11}" ui='target-libretro' profile='performance' "-j${JOBS}" || die 'Failed to build bSNES performance core' cp -f "out/bsnes_libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}/bsnes_performance_libretro.${FORMAT_EXT}" else echo 'bSNES performance not fetched, skipping ...' @@ -521,7 +521,7 @@ build_libretro_bsnes() { cd libretro-bsnes/balanced rm -f obj/*.{o,"${FORMAT_EXT}"} - "${MAKE}" -f Makefile platform="${FORMAT_COMPILER_TARGET}" compiler="${CXX}" ui='target-libretro' profile='balanced' "-j${JOBS}" || die 'Failed to build bSNES balanced core' + "${MAKE}" -f Makefile platform="${FORMAT_COMPILER_TARGET}" compiler="${CXX11}" ui='target-libretro' profile='balanced' "-j${JOBS}" || die 'Failed to build bSNES balanced core' cp -f "out/bsnes_libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}/bsnes_balanced_libretro.${FORMAT_EXT}" else echo 'bSNES compat not fetched, skipping ...' @@ -533,7 +533,7 @@ build_libretro_bsnes() { cd libretro-bsnes rm -f obj/*.{o,"${FORMAT_EXT}"} - "${MAKE}" -f Makefile platform="${FORMAT_COMPILER_TARGET}" compiler="${CXX}" ui='target-libretro' profile='accuracy' "-j${JOBS}" || die 'Failed to build bSNES accuracy core' + "${MAKE}" -f Makefile platform="${FORMAT_COMPILER_TARGET}" compiler="${CXX11}" ui='target-libretro' profile='accuracy' "-j${JOBS}" || die 'Failed to build bSNES accuracy core' cp -f "out/bsnes_libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}/bsnes_accuracy_libretro.${FORMAT_EXT}" fi } diff --git a/libretro-build-ios.sh b/libretro-build-ios.sh index e29d11de..7859fc48 100755 --- a/libretro-build-ios.sh +++ b/libretro-build-ios.sh @@ -11,6 +11,7 @@ FORMAT_COMPILER_TARGET_ALT=ios FORMAT_EXT=dylib JOBS=7 MAKE=make +CXX11="clang++ -std=c++11 -stdlib=libc++" export IOSSDK=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/ diff --git a/libretro-build.sh b/libretro-build.sh index 54e24be0..8372e569 100755 --- a/libretro-build.sh +++ b/libretro-build.sh @@ -42,6 +42,7 @@ die() if [ "$HOST_CC" ]; then CC="${HOST_CC}-gcc" CXX="${HOST_CC}-g++" + CXX11="${HOST_CC}-g++" STRIP="${HOST_CC}-strip" fi @@ -66,10 +67,13 @@ fi if [ -z "$CXX" ]; then if [ $FORMAT_COMPILER_TARGET = "osx" ]; then CXX=clang++ + CXX11="clang++ -std=c++11 -stdlib=libc++" elif [ "$(expr substr $(uname -s) 1 7)" = "MINGW32" ]; then CXX=mingw32-g++ + CXX11=mingw32-g++ else CXX=g++ + CXX11=g++ fi fi