$OpenBSD: patch-Makerules,v 1.18 2018/04/23 11:55:54 sthen Exp $
Index: Makerules
--- Makerules.orig
+++ Makerules
@@ -28,8 +28,8 @@ ifeq "$(build)" "debug"
 CFLAGS += -pipe -g
 LDFLAGS += -g
 else ifeq "$(build)" "release"
-CFLAGS += -pipe -O2 -DNDEBUG -fomit-frame-pointer
-LDFLAGS += $(LDREMOVEUNREACH) -Wl,-s
+CFLAGS += -DNDEBUG
+LDFLAGS += $(LDREMOVEUNREACH)
 else ifeq "$(build)" "small"
 CFLAGS += -pipe -Os -DNDEBUG -fomit-frame-pointer
 LDFLAGS += $(LDREMOVEUNREACH) -Wl,-s
@@ -87,7 +87,7 @@ LD = xcrun ld
 RANLIB_CMD = xcrun ranlib $@
 
 # Linux uses pkg-config for system libraries.
-else ifeq "$(OS)" "Linux"
+else
 
 HAVE_PTHREAD := yes
 SYS_PTHREAD_CFLAGS :=
@@ -113,7 +113,7 @@ SYS_CURL_CFLAGS += $(shell pkg-config --cflags openssl
 SYS_CURL_DEPS += $(shell pkg-config --libs openssl)
 endif
 endif
-SYS_CURL_DEPS += -lpthread -lrt
+SYS_CURL_DEPS += -lpthread
 
 ifeq "$(shell pkg-config --exists x11 xext && echo yes)" "yes"
 HAVE_X11 := yes
