Subject: pkg/33190: Sun's cc does not know "-Wno-format -fno-builtin"
To: None <,,>
From: None <>
List: pkgsrc-bugs
Date: 04/04/2006 11:10:01
>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
SunOS 5.10 Generic_Patch_118844-30 i86pc i386 i86pc

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

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

% su -
# cd /usr/pkgsrc/security/openssl
# setenv MACHINE_ARCH x86_64
--prefix=/usr/pkg --openssldir=/usr/pkg/etc/openssl shared solaris64-x86_64-cc no-idea no-mdc2 no-rc5 -O -Wno-format -fno-builtin

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