Bug 66527

Summary: mail/popa3d port fails to enforce system CFLAGS
Product: Ports & Packages Reporter: Yar Tikhiy <yar>
Component: Individual Port(s)Assignee: Dirk Meyer <dinoex>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff
none
file.diff none

Description Yar Tikhiy 2004-05-11 15:50:19 UTC
	
	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.

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.

The other choice is to remove "-O2 -fomit-frame-pointer"
	from the application CFLAGS, e.g.:
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
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2004-05-12 03:19:23 UTC
Responsible Changed
From-To: freebsd-ports-bugs->dinoex

Over to maintainer.
Comment 2 Dirk Meyer freebsd_committer freebsd_triage 2004-05-12 06:07:29 UTC
State Changed
From-To: open->closed

committed, thanks.