summaryrefslogtreecommitdiff
path: root/security/crypto++/patches/patch-GNUmakefile
blob: c7e7d43bd791db8d9731de4fc31e68cce0346030 (plain)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
$NetBSD: patch-GNUmakefile,v 1.4 2022/10/02 16:20:26 nros Exp $

Avoid -march=native compiler flag.
On Darwin, use absolute path to avoid conflict with devel/libtool.
Fix dylib name.

--- GNUmakefile.orig	2022-08-07 19:52:03.000000000 +0000
+++ GNUmakefile
@@ -33,7 +33,7 @@ CHMOD ?= chmod
 MKDIR ?= mkdir -p
 
 LN ?= ln -sf
-LDCONF ?= /sbin/ldconfig -n
+LDCONF ?= true
 
 # Solaris provides a non-Posix sed and grep at /usr/bin
 # Solaris 10 is missing AR in /usr/bin
@@ -87,7 +87,7 @@ INTEL_COMPILER := $(shell $(CXX) --versi
 
 # Enable shared object versioning for Linux and Solaris
 HAS_SOLIB_VERSION ?= 0
-ifneq ($(IS_LINUX)$(IS_HURD)$(IS_SUN),000)
+ifeq ($(IS_DARWIN),0)
   HAS_SOLIB_VERSION := 1
 endif
 
@@ -969,42 +969,6 @@ ARFLAGS = -xar -o
 RANLIB = true
 endif
 
-# Native build testing. Issue 'make native'.
-ifeq ($(findstring native,$(MAKECMDGOALS)),native)
-  NATIVE_OPT =
-
-  # Try GCC and compatibles first
-  TPROG = TestPrograms/test_cxx.cpp
-  TOPT = -march=native
-  HAVE_OPT = $(shell $(TCOMMAND) 2>&1 | wc -w)
-  ifeq ($(strip $(HAVE_OPT)),0)
-    NATIVE_OPT = -march=native
-  endif # NATIVE_OPT
-
-  # And tune
-  ifeq ($(NATIVE_OPT),)
-    TOPT = -mtune=native
-    HAVE_OPT = $(shell $(TCOMMAND) 2>&1 | wc -w)
-    ifeq ($(strip $(HAVE_OPT)),0)
-      NATIVE_OPT = -mtune=native
-    endif # NATIVE_OPT
-  endif
-
-  # Try SunCC next
-  ifeq ($(NATIVE_OPT),)
-    TOPT = -native
-    HAVE_OPT = $(shell $(TCOMMAND) 2>&1 | wc -w)
-    ifeq ($(strip $(HAVE_OPT)),0)
-      NATIVE_OPT = -native
-    endif # NATIVE_OPT
-  endif
-
-  ifneq ($(NATIVE_OPT),)
-    CRYPTOPP_CXXFLAGS += $(NATIVE_OPT)
-  endif
-
-endif # Native
-
 # Undefined Behavior Sanitizer (UBsan) testing. Issue 'make ubsan'.
 ifeq ($(findstring ubsan,$(MAKECMDGOALS)),ubsan)
   CRYPTOPP_CXXFLAGS := $(CRYPTOPP_CXXFLAGS:-g%=-g3)
@@ -1139,9 +1103,9 @@ ifeq ($(HAS_SOLIB_VERSION),1)
 # Different patchlevels and minors are compatible since 6.1
 SOLIB_COMPAT_SUFFIX=.$(LIB_MAJOR)
 # Linux uses -Wl,-soname
-ifneq ($(IS_LINUX)$(IS_HURD),00)
+ifneq ($(IS_LINUX)$(IS_HURD)$(IS_NETBSD),00)
 # Linux uses full version suffix for shared library
-SOLIB_VERSION_SUFFIX=.$(LIB_MAJOR).$(LIB_MINOR).$(LIB_PATCH)
+SOLIB_VERSION_SUFFIX=.$(LIB_MAJOR).$(LIB_MINOR)
 SOLIB_FLAGS=-Wl,-soname,libcryptopp.so$(SOLIB_COMPAT_SUFFIX)
 endif
 # Solaris uses -Wl,-h
@@ -1443,7 +1407,7 @@ ifneq ($(wildcard libcryptopp.dylib),)
 	@-$(MKDIR) $(DESTDIR)$(LIBDIR)
 	$(CP) libcryptopp.dylib $(DESTDIR)$(LIBDIR)
 	$(CHMOD) u=rwx,go=rx $(DESTDIR)$(LIBDIR)/libcryptopp.dylib
-	-install_name_tool -id $(DESTDIR)$(LIBDIR)/libcryptopp.dylib $(DESTDIR)$(LIBDIR)/libcryptopp.dylib
+	-install_name_tool -id $(LIBDIR)/libcryptopp.dylib $(DESTDIR)$(LIBDIR)/libcryptopp.dylib
 endif
 ifneq ($(wildcard libcryptopp.so$(SOLIB_VERSION_SUFFIX)),)
 	@-$(MKDIR) $(DESTDIR)$(LIBDIR)