From 28b1db6f6e80517af5ef490af9831fbabcba3fa3 Mon Sep 17 00:00:00 2001 From: theraven Date: Mon, 4 Apr 2011 13:24:53 +0000 Subject: [PATCH] Make sure that -fPIC is specified for C++ files too. --- Makefile | 1 + objcxx_eh.cc | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 5ca0c31..ebdbd56 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,7 @@ SUBMINOR_VERSION = 0 VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(SUBMINOR_VERSION) CFLAGS += -std=gnu99 -fPIC +CXXFLAGS += -fPIC CPPFLAGS += -DTYPE_DEPENDENT_DISPATCH -DGNUSTEP CPPFLAGS += -D__OBJC_RUNTIME_INTERNAL__=1 -D_XOPEN_SOURCE=500 diff --git a/objcxx_eh.cc b/objcxx_eh.cc index b5fd589..92a96e5 100644 --- a/objcxx_eh.cc +++ b/objcxx_eh.cc @@ -132,12 +132,20 @@ bool gnustep::libobjc::__objc_id_type_info::__do_catch(const type_info *thrownTy return false; }; -//static gnustep::libobjc::__objc_id_type_info objc_id_type_info; +/** + * Public interface to the Objective-C++ exception mechanism + */ extern "C" { -//gnustep::libobjc::__objc_id_type_info *__objc_id_type_info = &objc_id_type_info; +/** + * The public symbol that the compiler uses to indicate the Objective-C id type. + */ gnustep::libobjc::__objc_id_type_info __objc_id_type_info; +/** + * Exception cleanup function for C++ exceptions that wrap Objective-C + * exceptions. + */ static void exception_cleanup(_Unwind_Reason_Code reason, struct _Unwind_Exception *ex) {