<rdar://problem/8279559> [libstdcxx] use new linker options to make symbols non-weak
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@113616 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
2
Makefile
2
Makefile
@@ -12,7 +12,7 @@ export TRIPLE=-apple-
|
|||||||
installsrc:: $(SRCROOT)
|
installsrc:: $(SRCROOT)
|
||||||
|
|
||||||
ditto $(SRCDIRS)/include $(SRCROOT)/include
|
ditto $(SRCDIRS)/include $(SRCROOT)/include
|
||||||
ditto $(SRCDIRS)/lib/buildit $(SRCROOT)/lib/buildit
|
ditto $(SRCDIRS)/lib $(SRCROOT)/lib
|
||||||
ditto $(SRCDIRS)/src $(SRCROOT)/src
|
ditto $(SRCDIRS)/src $(SRCROOT)/src
|
||||||
ditto $(SRCDIRS)/Makefile $(SRCROOT)/Makefile
|
ditto $(SRCDIRS)/Makefile $(SRCROOT)/Makefile
|
||||||
|
|
||||||
|
41
lib/buildit
41
lib/buildit
@@ -17,6 +17,16 @@ then
|
|||||||
CXX=g++
|
CXX=g++
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z $MACOSX_DEPLOYMENT_TARGET ]
|
||||||
|
then
|
||||||
|
MACOSX_DEPLOYMENT_TARGET=10.6
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z $RC_ProjectSourceVersion ]
|
||||||
|
then
|
||||||
|
RC_ProjectSourceVersion=1
|
||||||
|
fi
|
||||||
|
|
||||||
case $TRIPLE in
|
case $TRIPLE in
|
||||||
*-apple-*)
|
*-apple-*)
|
||||||
if [ -z $RC_BUILDIT ]
|
if [ -z $RC_BUILDIT ]
|
||||||
@@ -24,12 +34,28 @@ case $TRIPLE in
|
|||||||
RC_CFLAGS="-arch i386 -arch x86_64"
|
RC_CFLAGS="-arch i386 -arch x86_64"
|
||||||
fi
|
fi
|
||||||
SOEXT=dylib
|
SOEXT=dylib
|
||||||
LDSHARED_FLAGS="-o libc++.1.dylib \
|
if [ "$MACOSX_DEPLOYMENT_TARGET" == "10.6" ]
|
||||||
-dynamiclib -nodefaultlibs -current_version 1 \
|
then
|
||||||
-compatibility_version 1 \
|
LDSHARED_FLAGS="-o libc++.1.dylib \
|
||||||
-install_name /usr/lib/libc++.dylib \
|
-dynamiclib -nodefaultlibs -current_version 1 \
|
||||||
-Wl,-reexport_library,/usr/lib/libc++abi.dylib \
|
-compatibility_version 1 \
|
||||||
/usr/lib/libSystem.B.dylib"
|
-install_name /usr/lib/libc++.dylib \
|
||||||
|
-Wl,-reexport_library,/usr/lib/libc++abi.dylib \
|
||||||
|
/usr/lib/libSystem.B.dylib"
|
||||||
|
else
|
||||||
|
LDSHARED_FLAGS="-o libc++.1.dylib \
|
||||||
|
-dynamiclib -nodefaultlibs \
|
||||||
|
-current_version ${RC_ProjectSourceVersion} -compatibility_version 1 \
|
||||||
|
-install_name /usr/lib/libc++.dylib \
|
||||||
|
${SDKROOT}/usr/lib/libc++abi.dylib \
|
||||||
|
-lSystem \
|
||||||
|
-Xarch_x86_64 -exported_symbols_list \
|
||||||
|
-Xarch_x86_64 x86_64.exp \
|
||||||
|
-Xarch_i386 -exported_symbols_list \
|
||||||
|
-Xarch_i386 i386.exp \
|
||||||
|
-exported_symbols_list libc++abi.exp \
|
||||||
|
-Wl,-force_symbols_not_weak_list,notweak.exp"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
RC_CFLAGS="-fPIC"
|
RC_CFLAGS="-fPIC"
|
||||||
@@ -51,7 +77,8 @@ for FILE in ../src/*.cpp; do
|
|||||||
$CXX -c -g -Os $RC_CFLAGS -nostdinc++ -I../include $FILE
|
$CXX -c -g -Os $RC_CFLAGS -nostdinc++ -I../include $FILE
|
||||||
done
|
done
|
||||||
|
|
||||||
$CXX *.o $RC_CFLAGS $LDSHARED_FLAGS
|
|
||||||
|
$CXX *.o $RC_CFLAGS $LDSHARED_FLAGS
|
||||||
|
|
||||||
#libtool -static -o libc++.a *.o
|
#libtool -static -o libc++.a *.o
|
||||||
|
|
||||||
|
2262
lib/i386.exp
Normal file
2262
lib/i386.exp
Normal file
File diff suppressed because it is too large
Load Diff
150
lib/libc++abi.exp
Normal file
150
lib/libc++abi.exp
Normal file
@@ -0,0 +1,150 @@
|
|||||||
|
___cxa_allocate_exception
|
||||||
|
___cxa_end_catch
|
||||||
|
___cxa_demangle
|
||||||
|
___cxa_current_exception_type
|
||||||
|
___cxa_call_unexpected
|
||||||
|
___cxa_free_exception
|
||||||
|
___cxa_get_exception_ptr
|
||||||
|
___cxa_get_globals
|
||||||
|
___cxa_get_globals_fast
|
||||||
|
___cxa_guard_abort
|
||||||
|
___cxa_guard_acquire
|
||||||
|
___cxa_guard_release
|
||||||
|
___cxa_rethrow
|
||||||
|
___cxa_pure_virtual
|
||||||
|
___cxa_begin_catch
|
||||||
|
___cxa_throw
|
||||||
|
___cxa_vec_cctor
|
||||||
|
___cxa_vec_cleanup
|
||||||
|
___cxa_vec_ctor
|
||||||
|
___cxa_vec_delete
|
||||||
|
___cxa_vec_delete2
|
||||||
|
___cxa_vec_delete3
|
||||||
|
___cxa_vec_dtor
|
||||||
|
___cxa_vec_new
|
||||||
|
___cxa_vec_new2
|
||||||
|
___cxa_vec_new3
|
||||||
|
___dynamic_cast
|
||||||
|
___gxx_personality_v0
|
||||||
|
__ZTSPm
|
||||||
|
__ZTSPl
|
||||||
|
__ZTSPj
|
||||||
|
__ZTSPi
|
||||||
|
__ZTSPh
|
||||||
|
__ZTSPf
|
||||||
|
__ZTSPe
|
||||||
|
__ZTSPd
|
||||||
|
__ZTSPc
|
||||||
|
__ZTSPb
|
||||||
|
__ZTSPa
|
||||||
|
__ZTSPKc
|
||||||
|
__ZTSPKy
|
||||||
|
__ZTSPKx
|
||||||
|
__ZTSPKw
|
||||||
|
__ZTSPKv
|
||||||
|
__ZTSPKt
|
||||||
|
__ZTSPKs
|
||||||
|
__ZTSPKm
|
||||||
|
__ZTSPKl
|
||||||
|
__ZTSPKi
|
||||||
|
__ZTSPKh
|
||||||
|
__ZTSPs
|
||||||
|
__ZTSPt
|
||||||
|
__ZTSPv
|
||||||
|
__ZTSPw
|
||||||
|
__ZTSPKa
|
||||||
|
__ZTSPx
|
||||||
|
__ZTSPy
|
||||||
|
__ZTSPKd
|
||||||
|
__ZTSPKe
|
||||||
|
__ZTSPKj
|
||||||
|
__ZTSPKb
|
||||||
|
__ZTSPKf
|
||||||
|
__ZTSv
|
||||||
|
__ZTSt
|
||||||
|
__ZTSs
|
||||||
|
__ZTSm
|
||||||
|
__ZTSl
|
||||||
|
__ZTSj
|
||||||
|
__ZTSi
|
||||||
|
__ZTSh
|
||||||
|
__ZTSf
|
||||||
|
__ZTSe
|
||||||
|
__ZTSd
|
||||||
|
__ZTSc
|
||||||
|
__ZTSw
|
||||||
|
__ZTSx
|
||||||
|
__ZTSy
|
||||||
|
__ZTSb
|
||||||
|
__ZTSa
|
||||||
|
__ZTIPKh
|
||||||
|
__ZTIPKf
|
||||||
|
__ZTIPKe
|
||||||
|
__ZTIPKd
|
||||||
|
__ZTIPKc
|
||||||
|
__ZTIPKb
|
||||||
|
__ZTIPKa
|
||||||
|
__ZTIPy
|
||||||
|
__ZTIPx
|
||||||
|
__ZTIPw
|
||||||
|
__ZTIPv
|
||||||
|
__ZTIPt
|
||||||
|
__ZTIPs
|
||||||
|
__ZTIPm
|
||||||
|
__ZTIPl
|
||||||
|
__ZTIPj
|
||||||
|
__ZTIPi
|
||||||
|
__ZTIPKi
|
||||||
|
__ZTIPKj
|
||||||
|
__ZTIPKl
|
||||||
|
__ZTIPKm
|
||||||
|
__ZTIPKs
|
||||||
|
__ZTIPKt
|
||||||
|
__ZTIPKv
|
||||||
|
__ZTIPKw
|
||||||
|
__ZTIPKx
|
||||||
|
__ZTIPKy
|
||||||
|
__ZTIPa
|
||||||
|
__ZTIPb
|
||||||
|
__ZTIPc
|
||||||
|
__ZTIPd
|
||||||
|
__ZTIPe
|
||||||
|
__ZTIPf
|
||||||
|
__ZTIPh
|
||||||
|
__ZTVN10__cxxabiv129__pointer_to_member_type_infoE
|
||||||
|
__ZTVN10__cxxabiv116__enum_type_infoE
|
||||||
|
__ZTVN10__cxxabiv117__array_type_infoE
|
||||||
|
__ZTVN10__cxxabiv117__class_type_infoE
|
||||||
|
__ZTVN10__cxxabiv117__pbase_type_infoE
|
||||||
|
__ZTVN10__cxxabiv119__pointer_type_infoE
|
||||||
|
__ZTVN10__cxxabiv120__function_type_infoE
|
||||||
|
__ZTVN10__cxxabiv120__si_class_type_infoE
|
||||||
|
__ZTVN10__cxxabiv121__vmi_class_type_infoE
|
||||||
|
__ZTVN10__cxxabiv123__fundamental_type_infoE
|
||||||
|
__ZTIa
|
||||||
|
__ZTIb
|
||||||
|
__ZTIc
|
||||||
|
__ZTId
|
||||||
|
__ZTIe
|
||||||
|
__ZTIf
|
||||||
|
__ZTIh
|
||||||
|
__ZTIi
|
||||||
|
__ZTIj
|
||||||
|
__ZTIl
|
||||||
|
__ZTIm
|
||||||
|
__ZTIs
|
||||||
|
__ZTIt
|
||||||
|
__ZTSN10__cxxabiv129__pointer_to_member_type_infoE
|
||||||
|
__ZTSN10__cxxabiv123__fundamental_type_infoE
|
||||||
|
__ZTSN10__cxxabiv121__vmi_class_type_infoE
|
||||||
|
__ZTSN10__cxxabiv120__si_class_type_infoE
|
||||||
|
__ZTSN10__cxxabiv120__function_type_infoE
|
||||||
|
__ZTSN10__cxxabiv119__pointer_type_infoE
|
||||||
|
__ZTSN10__cxxabiv117__pbase_type_infoE
|
||||||
|
__ZTSN10__cxxabiv117__class_type_infoE
|
||||||
|
__ZTSN10__cxxabiv117__array_type_infoE
|
||||||
|
__ZTSN10__cxxabiv116__enum_type_infoE
|
||||||
|
__ZTIy
|
||||||
|
__ZTIx
|
||||||
|
__ZTIw
|
||||||
|
__ZTIv
|
5
lib/notweak.exp
Normal file
5
lib/notweak.exp
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# Remove the weak-def bit from these external symbols
|
||||||
|
__ZT*
|
||||||
|
__ZN*
|
||||||
|
__ZS*
|
||||||
|
|
2264
lib/x86_64.exp
Normal file
2264
lib/x86_64.exp
Normal file
File diff suppressed because it is too large
Load Diff
@@ -7,6 +7,7 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <cxxabi.h>
|
||||||
|
|
||||||
#include "typeinfo"
|
#include "typeinfo"
|
||||||
|
|
||||||
@@ -37,3 +38,11 @@ std::bad_typeid::what() const throw()
|
|||||||
{
|
{
|
||||||
return "std::bad_typeid";
|
return "std::bad_typeid";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if __APPLE__
|
||||||
|
// On Darwin, the cxa_bad_* functions cannot be in the lower level library
|
||||||
|
// because bad_cast and bad_typeid are defined in his higher level library
|
||||||
|
void __cxxabiv1::__cxa_bad_typeid() { throw std::bad_typeid(); }
|
||||||
|
void __cxxabiv1::__cxa_bad_cast() { throw std::bad_cast(); }
|
||||||
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user