LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File 0630-ts-Use-same-dynlinking-logic-for-all-bsd.patch of Package erlang (Project home:Ledest:erlang:20)

From b5718f4e13b95904700fe2d82f1907b81ba7196a Mon Sep 17 00:00:00 2001
From: Lukas Larsson <lukas@erlang.org>
Date: Tue, 19 Mar 2019 11:13:50 +0100
Subject: [PATCH 12/26] ts: Use same dynlinking logic for all bsd

FreeBSD recently switched from using ld.lld instead of ld.bfd
for linking, which means that ld does not work as it did. So
we use cc to link all dynamic libraries. We also assume that
dragonfly and netbsd will follow.
---
 lib/common_test/test_server/configure.in | 25 +------------------------
 1 file changed, 1 insertion(+), 24 deletions(-)

diff --git a/lib/common_test/test_server/configure.in b/lib/common_test/test_server/configure.in
index e07bd4c2aa..a32d050081 100644
--- a/lib/common_test/test_server/configure.in
+++ b/lib/common_test/test_server/configure.in
@@ -171,7 +171,7 @@ case $system in
 	fi
 	SHLIB_EXTRACT_ALL=""
 	;;
-    *-openbsd*)
+    *-openbsd*|*-netbsd*|*-freebsd*|*-dragonfly*)
 	# Not available on all versions:  check for include file.
 	AC_CHECK_HEADER(dlfcn.h, [
 	    SHLIB_CFLAGS="-fpic"
@@ -194,29 +194,6 @@ case $system in
 	])
 	SHLIB_EXTRACT_ALL=""
 	;;
-    *-netbsd*|*-freebsd*|*-dragonfly*)
-	# Not available on all versions:  check for include file.
-	AC_CHECK_HEADER(dlfcn.h, [
-	    SHLIB_CFLAGS="-fpic"
-	    SHLIB_LD="ld"
-	    SHLIB_LDFLAGS="$LDFLAGS -Bshareable -x"
-	    SHLIB_SUFFIX=".so"
-	    if test X${enable_m64_build} = Xyes; then
-	        AC_MSG_ERROR(don't know how to link 64-bit dynamic drivers)
-	    fi
-	    if test X${enable_m32_build} = Xyes; then
-	        AC_MSG_ERROR(don't know how to link 32-bit dynamic drivers)
-	    fi
-	], [
-	    # No dynamic loading.
-	    SHLIB_CFLAGS=""
-	    SHLIB_LD="ld"
-	    SHLIB_LDFLAGS=""
-	    SHLIB_SUFFIX=""
-	    AC_MSG_ERROR(don't know how to compile and link dynamic drivers)
-	])
-	SHLIB_EXTRACT_ALL=""
-	;;
     *-solaris2*|*-sysv4*)
 	SHLIB_CFLAGS="-KPIC"
 	SHLIB_LD="/usr/ccs/bin/ld"
-- 
2.16.4