use MAKE_FLAGS rather than patching configure to override optimizer

flags; this fixes opt flags for some files which avoided the previous
fix

avoid "-fomit-frame-pointer -fforce-addr -fno-omit-frame-pointer -fno-force-addr"
This commit is contained in:
sthen 2017-04-24 13:26:16 +00:00
parent efa1fc4486
commit 7cbe2e8a9a
3 changed files with 12 additions and 23 deletions

View File

@ -1,15 +1,15 @@
# $OpenBSD: Makefile,v 1.27 2016/04/09 20:14:48 naddy Exp $
# $OpenBSD: Makefile,v 1.28 2017/04/24 13:26:16 sthen Exp $
COMMENT= high performance embedded database library
DISTNAME= qdbm-1.8.78
CATEGORIES= databases
SHARED_LIBS= qdbm 14.14
REVISION= 0
REVISION= 1
HOMEPAGE= http://fallabs.com/qdbm/
# LGPL
# LGPLv2.1+
PERMIT_PACKAGE_CDROM= Yes
MASTER_SITES= ${HOMEPAGE}/
@ -21,7 +21,10 @@ CONFIGURE_STYLE= gnu
CONFIGURE_ARGS= --enable-zlib \
--enable-iconv
MAKE_FLAGS= LIBVER=${LIBqdbm_VERSION:R} LIBREV=${LIBqdbm_VERSION:E}
MAKE_FLAGS= LIBVER=${LIBqdbm_VERSION:R} \
LIBREV=${LIBqdbm_VERSION:E} \
CC="${CC}" \
CFLAGS="-Wall -pedantic -fPIC -fsigned-char ${CFLAGS}"
pre-configure:
${SUBST_CMD} ${WRKSRC}/Makefile.in

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-Makefile_in,v 1.11 2012/05/08 13:04:48 okan Exp $
--- Makefile.in.orig Wed Mar 7 03:41:10 2007
+++ Makefile.in Wed Dec 19 21:39:40 2007
$OpenBSD: patch-Makefile_in,v 1.12 2017/04/24 13:26:16 sthen Exp $
--- Makefile.in.orig Wed Aug 4 18:14:34 2010
+++ Makefile.in Mon Apr 24 14:23:15 2017
@@ -24,7 +24,7 @@ LIBREV = @LIBREV@
# Targets
MYHEADS = depot.h curia.h relic.h hovel.h cabin.h villa.h vista.h odeum.h
@ -20,17 +20,15 @@ $OpenBSD: patch-Makefile_in,v 1.11 2012/05/08 13:04:48 okan Exp $
DESTDIR =
# Building binaries
-CC = @CC@
CC = @CC@
-CPPFLAGS = @CPPFLAGS@ -I$(srcdir) -I$(MYHEADDIR) \
- -I$(HOME)/include -I/usr/local/include @MYDEFS@ \
+#CC = @CC@
+CPPFLAGS += @CPPFLAGS@ -I$(srcdir) \
+ -I${LOCALBASE}/include @MYDEFS@ \
-D_XOPEN_SOURCE_EXTENDED=1 -D_GNU_SOURCE=1 -D__EXTENSIONS__=1 -D_HPUX_SOURCE=1 \
-D_POSIX_MAPPED_FILES=1 -D_POSIX_SYNCHRONIZED_IO=1 \
-DPIC=1 -D_THREAD_SAFE=1 -D_REENTRANT=1 -DNDEBUG
-CFLAGS = -Wall -pedantic -fPIC -fsigned-char -O3 -fomit-frame-pointer -fforce-addr @MYOPTS@
+CFLAGS += -Wall -pedantic -fPIC -fsigned-char -fomit-frame-pointer -fforce-addr @MYOPTS@
CFLAGS = -Wall -pedantic -fPIC -fsigned-char -O3 -fomit-frame-pointer -fforce-addr @MYOPTS@
LD = @LD@
LIBS = -lqdbm @LIBS@
-LIBLDFLAGS = @LDFLAGS@ -L. -L$(MYLIBDIR) -L$(HOME)/lib -L/usr/local/lib @LIBS@

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-configure,v 1.3 2012/05/08 13:04:48 okan Exp $
--- configure.orig Wed Aug 4 11:15:20 2010
+++ configure Wed Apr 25 13:16:33 2012
@@ -2774,7 +2774,7 @@ then
fi
if uname | egrep -i 'BSD' > /dev/null 2>&1
then
- MYOPTS="-O1 -fno-omit-frame-pointer -fno-force-addr"
+ MYOPTS="-fno-omit-frame-pointer -fno-force-addr"
fi
if gcc --version | egrep -i '^2\.(8|9)' > /dev/null 2>&1
then