ports/66527: mail/popa3d port fails to enforce system CFLAGS

Yar Tikhiy yar at comp.chem.msu.su
Tue May 11 14:50:25 UTC 2004


>Number:         66527
>Category:       ports
>Synopsis:       mail/popa3d port fails to enforce system CFLAGS
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 11 07:50:19 PDT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Yar Tikhiy
>Release:        FreeBSD 4.9-RELEASE-p4 i386
>Organization:
Moscow State University
>Environment:

	A fresh FreeBSD ports collection.

>Description:
	
	It's known that hairy optimization flags are not supported
	for the GNU C compiler shipped with FreeBSD.  Using such
	flags can result in code broken in subtle ways.  That's a
	reason why a well-tempered port should enforce the system
	CFLAGS upon the third-party application.  The port mail/popa3d
	fails to do so: The application will be built with compiler
	flags of its author's choice along with the system CFLAGS.

>How-To-Repeat:

	Try to build the mail/popa3d port.  Observe
	"-Wall -O2 -fomit-frame-pointer" in the output:

===>  Building for popa3d-0.6.4
cc -O -pipe  -DPREFIX=/usr/local  -Wall -O2 -fomit-frame-pointer -c version.c
cc -O -pipe  -DPREFIX=/usr/local  -Wall -O2 -fomit-frame-pointer -c startup.c
cc -O -pipe  -DPREFIX=/usr/local  -Wall -O2 -fomit-frame-pointer -c standalone.c
cc -O -pipe  -DPREFIX=/usr/local  -Wall -O2 -fomit-frame-pointer -c virtual.c
cc -O -pipe  -DPREFIX=/usr/local  -Wall -O2 -fomit-frame-pointer -c auth_passwd.c
cc -O -pipe  -DPREFIX=/usr/local  -Wall -O2 -fomit-frame-pointer -c auth_shadow.c
cc -O -pipe  -DPREFIX=/usr/local  -Wall -O2 -fomit-frame-pointer -c auth_pam.c
cc -O -pipe  -DPREFIX=/usr/local  -Wall -O2 -fomit-frame-pointer -c pop_root.c
cc -O -pipe  -DPREFIX=/usr/local  -Wall -O2 -fomit-frame-pointer -c pop_auth.c
cc -O -pipe  -DPREFIX=/usr/local  -Wall -O2 -fomit-frame-pointer -c pop_trans.c
cc -O -pipe  -DPREFIX=/usr/local  -Wall -O2 -fomit-frame-pointer -c protocol.c
cc -O -pipe  -DPREFIX=/usr/local  -Wall -O2 -fomit-frame-pointer -c database.c
cc -O -pipe  -DPREFIX=/usr/local  -Wall -O2 -fomit-frame-pointer -c mailbox.c
cc -O -pipe  -DPREFIX=/usr/local  -Wall -O2 -fomit-frame-pointer -c misc.c
cc -O -pipe  -DPREFIX=/usr/local  -Wall -O2 -fomit-frame-pointer -c md5/md5.c -o md5/md5.o

>Fix:

	The port in question already includes a patch for Makefile,
	patch-ab.  However, the patch changes "CFLAGS=..." to
	"CFLAGS+=...", which is not correct in this case.  To my mind,
	it should change the line to "CFLAGS?=..." so that the system
	CFLAGS override the application CFLAGS.  The application CFLAGS
	contains nothing important now.

--- patch-ab.orig       Mon Nov 17 06:56:00 2003
+++ patch-ab    Tue May 11 18:34:50 2004
@@ -9,7 +9,7 @@
  MKDIR = mkdir -p
  INSTALL = install -c
 -CFLAGS = -Wall -O2 -fomit-frame-pointer
-+CFLAGS += -Wall -O2 -fomit-frame-pointer
++CFLAGS?= -Wall -O2 -fomit-frame-pointer
  # You may use OpenSSL's MD5 routines instead of the ones supplied here
  #CFLAGS += -DHAVE_OPENSSL
  LDFLAGS = -s

	The other choice is to remove "-O2 -fomit-frame-pointer"
	from the application CFLAGS, e.g.:

--- patch-ab.orig       Mon Nov 17 06:56:00 2003
+++ patch-ab    Tue May 11 18:34:50 2004
@@ -9,7 +9,7 @@
  MKDIR = mkdir -p
  INSTALL = install -c
 -CFLAGS = -Wall -O2 -fomit-frame-pointer
-+CFLAGS += -Wall -O2 -fomit-frame-pointer
++CFLAGS += -Wall
  # You may use OpenSSL's MD5 routines instead of the ones supplied here
  #CFLAGS += -DHAVE_OPENSSL
  LDFLAGS = -s
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list