Skip to content
Snippets Groups Projects
Commit a855acbc authored by Fons Rademakers's avatar Fons Rademakers
Browse files

Port to MacOS X 10.7 preview.

git-svn-id: http://root.cern.ch/svn/root/trunk@38235 27541ba8-7e3a-0410-8455-c3a389f83636
parent 3b78a1b2
No related branches found
No related tags found
No related merge requests found
......@@ -30,6 +30,19 @@
#if defined(__linux) || defined(__APPLE__)
# include <cxxabi.h>
#endif
#if defined(__APPLE__)
# include <AvailabilityMacros.h>
#endif
#if defined(__APPLE__) && defined(MAC_OS_X_VERSION_10_7)
namespace __cxxabiv1 {
extern "C" void*
__dynamic_cast(const void* __src_ptr, // Starting object.
const __class_type_info* __src_type, // Static type of object.
const __class_type_info* __dst_type, // Desired target type.
ptrdiff_t __src2dst); // How src and dst are related.
}
#endif
//-------------------------------------------------------------------------------
......@@ -95,6 +108,7 @@ Reflex::Class::CastObject(const Type& to,
// use the internal dynamic casting of the compiler (e.g. libstdc++.so)
void* obj3 = 0;
#if defined(__linux) || defined(__APPLE__)
obj3 = abi::__dynamic_cast(obj.Address(),
(const abi::__class_type_info*) &this->TypeInfo(),
(const abi::__class_type_info*) &to.TypeInfo(),
......
......@@ -434,28 +434,13 @@ LDFLAGS = -O2 -bind_at_load
# The SOFLAGS will be used to create the .dylib,
# the .so will be created separately
DllSuf = dylib
ifeq ($(MACOSX_MINOR),6)
ifeq ($(subst $(MACOSX_MINOR),,12),12)
UNDEFOPT = dynamic_lookup
LD = MACOSX_DEPLOYMENT_TARGET=10.6 c++
else
ifeq ($(MACOSX_MINOR),5)
UNDEFOPT = dynamic_lookup
LD = MACOSX_DEPLOYMENT_TARGET=10.5 c++
else
ifeq ($(MACOSX_MINOR),4)
UNDEFOPT = dynamic_lookup
LD = MACOSX_DEPLOYMENT_TARGET=10.4 c++
else
ifeq ($(MACOSX_MINOR),3)
UNDEFOPT = dynamic_lookup
LD = MACOSX_DEPLOYMENT_TARGET=10.3 c++
LD = MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR) c++
else
UNDEFOPT = suppress
LD = c++
endif
endif
endif
endif
SOFLAGS = -dynamiclib -single_module -undefined $(UNDEFOPT)
endif
......@@ -468,23 +453,13 @@ LDFLAGS = -O2 -bind_at_load
# The SOFLAGS will be used to create the .dylib,
# the .so will be created separately
DllSuf = dylib
ifeq ($(MACOSX_MINOR),5)
ifeq ($(subst $(MACOSX_MINOR),,12),12)
UNDEFOPT = dynamic_lookup
LD = MACOSX_DEPLOYMENT_TARGET=10.5 c++
else
ifeq ($(MACOSX_MINOR),4)
UNDEFOPT = dynamic_lookup
LD = MACOSX_DEPLOYMENT_TARGET=10.4 c++
else
ifeq ($(MACOSX_MINOR),3)
UNDEFOPT = dynamic_lookup
LD = MACOSX_DEPLOYMENT_TARGET=10.3 c++
LD = MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR) c++
else
UNDEFOPT = suppress
LD = c++
endif
endif
endif
SOFLAGS = -dynamiclib -single_module -undefined $(UNDEFOPT)
endif
......@@ -497,7 +472,8 @@ LDFLAGS = -m64 -O2 -bind_at_load
# The SOFLAGS will be used to create the .dylib,
# the .so will be created separately
DllSuf = dylib
LD = MACOSX_DEPLOYMENT_TARGET=10.4 c++
ifeq ($(subst $(MACOSX_MINOR),,12),12)
LD = MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR) c++
SOFLAGS = -m64 -dynamiclib -single_module -undefined dynamic_lookup
endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment