tech-pkg archive

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

sunpro CCPATH detection fix



The newer versions of solaris studio compilers install by default into
/opt/solstudioNN.N rather than /opt/SUNWspro
(additional reference
http://www.pubbs.net/201006/netbsd/22642-sunpro-bootstrapping-issue.html)

When the CCPATH is not detected and ABI=64, this results in the wrong
flags being chosen, and the message:
  cc: Warning: -xarch=amd64 is deprecated, use -m64 to create 64-bit programs

This also prevents bootstrapping, as pdksh does not build cleanly.

I think the following patch fixes the problem.  Is there a better way
to do this, or does this look ok?

Index: sunpro.mk
===================================================================
RCS file: /usr/cvs/pkgsrc/mk/compiler/sunpro.mk,v
retrieving revision 1.47
diff -u -r1.47 sunpro.mk
--- sunpro.mk   30 Jul 2010 07:58:59 -0000      1.47
+++ sunpro.mk   5 Apr 2011 23:39:53 -0000
@@ -16,6 +16,9 @@
 .include "../../mk/bsd.prefs.mk"

 SUNWSPROBASE?=         /opt/SUNWspro
+.if !exists($SUNWSPROBASE)
+SUNWSPROBASE!=         /bin/ls -d /opt/solstudio*
+.endif

 # common definitions
 # XXX: should be moved to compiler.mk.

Thanks,

 - Tim


Home | Main Index | Thread Index | Old Index