lang/libobjc2: Fix linking against

Pull in a patch from upstream to fix generation of eh_trampoline().
Without this patch linking against libobjc sometimes failes with
undefined reference to `eh_trampoline()'.
Build tests by default.

MFH:		2020Q3
X-MFH-With:	546146
This commit is contained in:
Niclas Zeising 2020-08-26 21:41:45 +00:00
parent 51b30f36f9
commit 6869b1db1a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=546301
2 changed files with 14 additions and 2 deletions

View File

@ -4,7 +4,7 @@
PORTNAME= libobjc2
DISTVERSIONPREFIX=v
DISTVERSION= 2.1
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= lang devel gnustep
MAINTAINER= ports@FreeBSD.org
@ -22,7 +22,6 @@ GH_TUPLE= Tessil:robin-map:757de82:robin_map/third_party/robin-map
USE_LDCONFIG= yes
CMAKE_ARGS+= -DLIB_INSTALL_PATH=lib
CMAKE_ARGS+= -DTESTS=OFF
LDFLAGS_armv7= -Wl,-znotext
SSP_UNSAFE= yes

View File

@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e2746e9..80b7dfe 100644
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -317,7 +317,7 @@ if (ENABLE_OBJCXX)
endif()
endif ()
add_custom_command(OUTPUT eh_trampoline.s
- COMMAND ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_FLAGS} -fPIC -S "${CMAKE_SOURCE_DIR}/eh_trampoline.cc" -o - -fexceptions -fno-inline | sed "s/__gxx_personality_v0/test_eh_personality/g" > "${CMAKE_BINARY_DIR}/eh_trampoline.s"
+ COMMAND ${CMAKE_CXX_COMPILER} -fPIC -S "${CMAKE_SOURCE_DIR}/eh_trampoline.cc" -o - -fexceptions -fno-inline | sed "s/__gxx_personality_v0/test_eh_personality/g" > "${CMAKE_BINARY_DIR}/eh_trampoline.s"
MAIN_DEPENDENCY eh_trampoline.cc)
list(APPEND libobjc_ASM_SRCS eh_trampoline.s)
list(APPEND libobjc_CXX_SRCS objcxx_eh.cc)