summaryrefslogtreecommitdiff
path: root/lang/ruby32/files/patch-configure.ac
blob: 3b7da5eaf6ebae41553c1ae5269744c9703d5dee (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
--- configure.ac.orig	2024-07-26 11:54:27 UTC
+++ configure.ac
@@ -1351,7 +1351,7 @@ AC_CHECK_HEADERS(stdatomic.h)
 AC_CHECK_HEADERS(utime.h)
 AC_CHECK_HEADERS(stdatomic.h)
 
-AS_CASE("$target_cpu", [x64|x86_64|i[3-6]86*], [
+AS_CASE("$target_cpu", [amd64|x64|x86_64|i[3-6]86*], [
   AC_CHECK_HEADERS(x86intrin.h)
 ])
 RUBY_UNIVERSAL_CHECK_HEADER([x86_64, i386], x86intrin.h)
@@ -3050,7 +3050,7 @@ AC_SUBST(EXTOBJS)
 			: ${LDSHARED='$(CC) -shared'}
 			AS_IF([test "$rb_cv_binary_elf" = yes], [
 			    LDFLAGS="$LDFLAGS -rdynamic"
-			    DLDFLAGS="$DLDFLAGS "'-Wl,-soname,$@'
+			    DLDFLAGS="$DLDFLAGS "'-Wl,-E'
 			], [
 			  test "$GCC" = yes && test "$rb_cv_prog_gnu_ld" = yes || LDSHARED='$(LD) -Bshareable'
 			])
@@ -3512,6 +3512,7 @@ AS_CASE("$enable_shared", [yes], [
     [freebsd*|dragonfly*], [
 	LIBRUBY_SO='lib$(RUBY_SO_NAME).$(SOEXT).$(MAJOR)$(MINOR)'
 	LIBRUBY_SONAME='$(LIBRUBY_SO)'
+	RUBY_APPEND_OPTIONS(LIBRUBY_DLDFLAGS, ['-Wl,-soname,${LIBRUBY_SO}'])
 	AS_IF([test "$rb_cv_binary_elf" != "yes" ], [
 	    LIBRUBY_SO="$LIBRUBY_SO.\$(TEENY)"
 	    LIBRUBY_ALIASES=''
@@ -4284,6 +4285,7 @@ AS_IF([test "${universal_binary-no}" = yes ], [
         arch="${target_cpu}-mingw-ucrt"
     ], [
         arch="${target_cpu}-${target_os}"
+        AS_CASE(["$target_cpu-$target_os"], [x86_64-freebsd*],[arch=amd64-${target_os}])
     ])
     AC_DEFINE_UNQUOTED(RUBY_PLATFORM, "$arch")
 ])