pkgsrc-Changes archive

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

CVS commit: pkgsrc/mk



Module Name:    pkgsrc
Committed By:   pho
Date:           Thu Aug 28 12:11:57 UTC 2025

Modified Files:
        pkgsrc/mk/platform: SunOS.mk
        pkgsrc/mk/tools: tools.SunOS.mk

Log Message:
mk: Use "${CC} -E" as CPP on OmniOS

OmniOS does not have cpp(1) in its standard PATH. It has /usr/lib/cpp,
which works mostly like the standard cpp(1) but lacks support of many
standard options. It appears /usr/lib/cpp is some kind of implementation
detail and users aren't expected to execute it directly.

Several months ago I committed a change to mk/tools/tools.SunOS.mk so that
packages could use ${CPP} by declaring "USE_TOOLS+=cpp". This turned out to
be a bad idea for many reasons:

1. Packages expect ${CPP} to be usable without declaring anything.

2. Some packages want to use ${CPP} not only at build time but also at run
   time. Having a symlink in ${WRAPPER_BINDIR} isn't useful in this case.

3. Some packages (rightfully) expect that ${CPP} supports -o FILE, which
   /usr/lib/cpp doesn't support.

By setting "${CC} -E" to CPP we can now build and use
devel/gobject-introspection, as well as lang/ghc910 on OmniOS.


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 pkgsrc/mk/platform/SunOS.mk
cvs rdiff -u -r1.58 -r1.59 pkgsrc/mk/tools/tools.SunOS.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mk/platform/SunOS.mk
diff -u pkgsrc/mk/platform/SunOS.mk:1.97 pkgsrc/mk/platform/SunOS.mk:1.98
--- pkgsrc/mk/platform/SunOS.mk:1.97    Sat Apr 12 08:41:11 2025
+++ pkgsrc/mk/platform/SunOS.mk Thu Aug 28 12:11:57 2025
@@ -1,4 +1,4 @@
-# $NetBSD: SunOS.mk,v 1.97 2025/04/12 08:41:11 nia Exp $
+# $NetBSD: SunOS.mk,v 1.98 2025/08/28 12:11:57 pho Exp $
 #
 # Variable definitions for the SunOS/Solaris operating system.
 
@@ -38,6 +38,10 @@ ULIMIT_CMD_stacksize?=       ulimit -s 131072
 EXTRACT_USING?=                bsdtar
 # But bsdtar chokes on UTF-8 file names on the C locale.
 EXTRACT_ENV+=          LC_CTYPE=en_US.UTF-8
+
+# The native cpp is at /usr/lib/cpp but it doesn't support the -o flag,
+# which is required by some packages including devel/gobject-introspection.
+CPP=                   ${CC} -E
 .endif
 
 .if exists(/usr/openwin/include/X11/X.h)

Index: pkgsrc/mk/tools/tools.SunOS.mk
diff -u pkgsrc/mk/tools/tools.SunOS.mk:1.58 pkgsrc/mk/tools/tools.SunOS.mk:1.59
--- pkgsrc/mk/tools/tools.SunOS.mk:1.58 Sat Jan 25 03:46:47 2025
+++ pkgsrc/mk/tools/tools.SunOS.mk      Thu Aug 28 12:11:57 2025
@@ -1,4 +1,4 @@
-# $NetBSD: tools.SunOS.mk,v 1.58 2025/01/25 03:46:47 pho Exp $
+# $NetBSD: tools.SunOS.mk,v 1.59 2025/08/28 12:11:57 pho Exp $
 #
 # System-supplied tools for the Solaris and illumos operating systems.
 #
@@ -36,9 +36,6 @@ TOOLS_PLATFORM.cmp?=          /bin/cmp
 TOOLS_PLATFORM.cmp?=           /usr/bin/cmp
 .endif
 TOOLS_PLATFORM.cp?=            /bin/cp
-.if exists(/usr/lib/cpp)       # OmniOS
-TOOLS_PLATFORM.cpp?=           /usr/lib/cpp
-.endif
 TOOLS_PLATFORM.csh?=           /bin/csh
 .if exists(/usr/bin/curl)
 TOOLS_PLATFORM.curl?=          /usr/bin/curl



Home | Main Index | Thread Index | Old Index