33 lines
1.2 KiB
Plaintext
33 lines
1.2 KiB
Plaintext
$OpenBSD: patch-librhash_Makefile,v 1.2 2017/08/14 12:20:57 dcoppa Exp $
|
|
|
|
Index: librhash/Makefile
|
|
--- librhash/Makefile.orig
|
|
+++ librhash/Makefile
|
|
@@ -2,10 +2,10 @@
|
|
CC ?= gcc
|
|
AR ?= ar
|
|
#NOTE: NDEBUG turns off asserts
|
|
-OPTFLAGS = -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections
|
|
+OPTFLAGS = -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections
|
|
OPTLDFLAGS =
|
|
-CFLAGS = $(OPTFLAGS)
|
|
-LDFLAGS = $(OPTLDFLAGS)
|
|
+CFLAGS += $(OPTFLAGS)
|
|
+LDFLAGS += $(OPTLDFLAGS)
|
|
ADDCFLAGS =
|
|
LIBCFLAGS =
|
|
ADDLDFLAGS =
|
|
@@ -187,10 +187,9 @@ test-dll: $(DLLNAME) test_hashes.o
|
|
|
|
# shared and static libraries
|
|
$(SONAME): $(SOURCES)
|
|
- sed -n '1s/.*/{ global:/p; s/^RHASH_API.* \([a-z0-9_]\+\)(.*/ \1;/p; $$s/.*/local: *; };/p' $(SO_HEADERS) > exports.sym
|
|
- $(CC) -fpic $(ALLCFLAGS) -shared $(SOURCES) -Wl,--version-script,exports.sym,-soname,$(SONAME) $(LIBLDFLAGS) -o $@
|
|
+ sed -n '1s/.*/{ global:/p; s/^RHASH_API.* \([a-z0-9_]*\)(.*/ \1;/p; $$s/.*/local: *; };/p' $(SO_HEADERS) > exports.sym
|
|
+ $(CC) -fpic $(ALLCFLAGS) -shared $(SOURCES) -Wl,--version-script,exports.sym $(LIBLDFLAGS) -o $@
|
|
rm -f $(SOLINK)
|
|
- ln -s $(SONAME) $(SOLINK)
|
|
# use 'nm -Cg --defined-only $@' to view exported symbols
|
|
|
|
$(DYNAME): $(SOURCES)
|