pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/33190: Sun's cc does not know "-Wno-format -fno-builtin"



>Number:         33190
>Category:       pkg
>Synopsis:       Sun's cc does not know "-Wno-format -fno-builtin"
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 04 11:10:00 +0000 2006
>Originator:     NAKAJI Hiroyuki
>Release:        Solaris 10 x86_64
>Organization:
>Environment:
SunOS deepsea.c3922.takamatsu-nct.ac.jp 5.10 Generic_Patch_118844-30 i86pc i386 
i86pc

>Description:
On Solaris 10 (x86), when building 64-bit binaries using pkgsrc with Sun's cc 
(i.e. Sun Studio 11), the additional CFLAGS="-Wno-format -fno-builtin" is not 
recognized. And it may put annoying warnings on display.

I'm not sure if '${OPSYS} != "SunOS"' is enough, but at least on Solaris 10 it 
is enough.

For example, when I build security/openssl with 64-bit, I have to set 
MACHINE_ARCH=x86_64. And it gets "CFLAGS+=-Wno-format -fno-builtin" in 
bsd.own.mk.

I found this problem while checking my pkg/32174 report.

>How-To-Repeat:
% su -
# cd /usr/pkgsrc/security/openssl
# setenv MACHINE_ARCH x86_64
# bmake show-var VARNAME=CONFIGURE_ARGS
--prefix=/usr/pkg --openssldir=/usr/pkg/etc/openssl shared solaris64-x86_64-cc 
no-idea no-mdc2 no-rc5 -O -Wno-format -fno-builtin

>Fix:
Index: bsd.own.mk.in
===================================================================
RCS file: /cvsroot/pkgsrc/bootstrap/mods/mk/bsd.own.mk.in,v
retrieving revision 1.4
diff -u -r1.4 bsd.own.mk.in
--- bsd.own.mk.in       20 Dec 2005 16:15:37 -0000      1.4
+++ bsd.own.mk.in       4 Apr 2006 10:56:33 -0000
@@ -129,7 +129,7 @@
 OBJECT_FMT?=a.out
 .endif
 
-.if ${MACHINE_ARCH} == "x86_64"
+.if ${MACHINE_ARCH} == "x86_64" && ${OPSYS} != "SunOS"
 CFLAGS+=-Wno-format -fno-builtin
 .endif
 




Home | Main Index | Thread Index | Old Index