On Sun, Jun 24 2018, Klemens Nanni <[email protected]> wrote: > Patch out hardcoded OPTIMIZER_CFLAGS to allow `make CFLAGS=-g3' > building without `-O2'.
I wouldn't expect overriding CFLAGS like that to work in all cases. Some of our Makefiles contain lines like CFLAGS += ... where what we append is required for a correct build, so overriding CFLAGS on the cli isn't safe. You could use DEBUG='-O0 -g3' here. Anyway, I agree that hardcoding -O2 isn't desirable. > Our CFLAGS contains `-O2', so no binary change with this diff by default. > > While here, switch to HTTPS and move/whitespace nitpick CONFIGURE_ARGS. > > OK? ok jca@ > Index: Makefile > =================================================================== > RCS file: /cvs/ports/security/sshguard/Makefile,v > retrieving revision 1.11 > diff -u -p -r1.11 Makefile > --- Makefile 11 Jan 2018 19:27:09 -0000 1.11 > +++ Makefile 23 Jun 2018 23:37:52 -0000 > @@ -3,7 +3,7 @@ > COMMENT= protect against brute force attacks on sshd and others > > DISTNAME= sshguard-1.5 > -REVISION= 4 > +REVISION= 5 > CATEGORIES= security > > # BSD > @@ -11,13 +11,13 @@ PERMIT_PACKAGE_CDROM= Yes > > WANTLIB+= c pthread > > -HOMEPAGE= http://www.sshguard.net/ > +HOMEPAGE= https://www.sshguard.net/ > MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=sshguard/} > EXTRACT_SUFX= .tar.bz2 > > CONFIGURE_STYLE=gnu > -NO_TEST= Yes > +CONFIGURE_ARGS= --with-firewall=pf > > -CONFIGURE_ARGS = --with-firewall=pf > +NO_TEST= Yes > > .include <bsd.port.mk> > Index: patches/patch-configure > =================================================================== > RCS file: patches/patch-configure > diff -N patches/patch-configure > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-configure 23 Jun 2018 23:09:22 -0000 > @@ -0,0 +1,13 @@ > +$OpenBSD$ > + > +Index: configure > +--- configure.orig > ++++ configure > +@@ -5949,7 +5949,6 @@ then > + STD99_CFLAGS="-xc99" > + else > + # other compiler (assume gcc-compatibile :( ) > +- OPTIMIZER_CFLAGS="-O2" > + WARNING_CFLAGS="-Wall" > + STD99_CFLAGS="-std=c99" > + fi > -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE
