commit 1e83d2a9ce94c0612438ec8beefec8c42077d86d
parent 1123468ccfeb6fef063cd73ceaa12ffcc9be3d71
Author: falkTX <falktx@gmail.com>
Date: Mon, 7 Mar 2016 23:48:40 +0100
OSX related fixes; Add 'MACOS_OLD=true' if using apple-gcc4.2
Diffstat:
3 files changed, 14 insertions(+), 16 deletions(-)
diff --git a/dgl/Makefile.mk b/dgl/Makefile.mk
@@ -23,10 +23,10 @@ endif
# Set build and link flags
BASE_FLAGS = -Wall -Wextra -pipe -MD -MP
-BASE_OPTS = -O2 -ffast-math -mtune=generic -msse -msse2 -fdata-sections -ffunction-sections
+BASE_OPTS = -O2 -mtune=generic -msse -msse2 -fdata-sections -ffunction-sections
-ifneq ($(MACOS),true)
-# MacOS doesn't support this
+ifneq ($(MACOS_OLD),true)
+# Old MacOS doesn't support this
BASE_OPTS += -mfpmath=sse
endif
@@ -40,19 +40,13 @@ endif
ifeq ($(RASPPI),true)
# Raspberry-Pi optimization flags
-BASE_OPTS = -O2 -ffast-math -march=armv6 -mfpu=vfp -mfloat-abi=hard
-LINK_OPTS = -Wl,-O1 -Wl,--as-needed -Wl,--strip-all
-endif
-
-ifeq ($(PANDORA),true)
-# OpenPandora optimization flags
-BASE_OPTS = -O2 -ffast-math -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
+BASE_OPTS = -O2 -march=armv6 -mfpu=vfp -mfloat-abi=hard
LINK_OPTS = -Wl,-O1 -Wl,--as-needed -Wl,--strip-all
endif
ifneq ($(NOOPT),true)
# No optimization flags
-BASE_OPTS = -O2 -ffast-math -fdata-sections -ffunction-sections
+BASE_OPTS = -O2 -fdata-sections -ffunction-sections
endif
ifneq ($(WIN32),true)
@@ -68,14 +62,18 @@ BASE_FLAGS += -DNDEBUG $(BASE_OPTS) -fvisibility=hidden
CXXFLAGS += -fvisibility-inlines-hidden
endif
-BUILD_C_FLAGS = $(BASE_FLAGS) -std=c99 -std=gnu99 $(CFLAGS)
-BUILD_CXX_FLAGS = $(BASE_FLAGS) -std=c++0x -std=gnu++0x $(CXXFLAGS) $(CPPFLAGS)
+BUILD_C_FLAGS = $(BASE_FLAGS) -std=c99 $(CFLAGS)
+BUILD_CXX_FLAGS = $(BASE_FLAGS) -std=c++11 $(CXXFLAGS) $(CPPFLAGS)
LINK_FLAGS = $(LINK_OPTS) -Wl,--no-undefined $(LDFLAGS)
ifeq ($(MACOS),true)
+# 'no-undefined' is always enabled
+LINK_FLAGS = $(LINK_OPTS) $(LDFLAGS)
+endif
+
+ifeq ($(MACOS_OLD),true)
# No C++11 support
BUILD_CXX_FLAGS = $(BASE_FLAGS) $(CXXFLAGS) $(CPPFLAGS)
-LINK_FLAGS = $(LINK_OPTS) $(LDFLAGS)
endif
# --------------------------------------------------------------
diff --git a/dgl/src/Window.cpp b/dgl/src/Window.cpp
@@ -17,7 +17,7 @@
// we need this for now
//#define PUGL_GRAB_FOCUS 1
-#include "../../distrho/src/DistrhoDefines.h"
+#include "../Base.hpp"
#undef PUGL_HAVE_CAIRO
#undef PUGL_HAVE_GL
diff --git a/distrho/DistrhoUtils.hpp b/distrho/DistrhoUtils.hpp
@@ -33,7 +33,7 @@
# include <stdint.h>
#endif
-#if defined(DISTRHO_OS_MAC) && ! defined(CARLA_OS_MAC) && ! defined(DISTRHO_PROPER_CPP11_SUPPORT)
+#if defined(DISTRHO_OS_MAC) && ! defined(CARLA_OS_MAC) && ! defined(__clang__)
namespace std {
inline float fmin(float __x, float __y)
{ return __builtin_fminf(__x, __y); }