| @@ -1,151 +1,137 @@ | | | @@ -1,151 +1,137 @@ |
1 | # $NetBSD: SunOS.mk,v 1.85 2022/10/01 14:23:26 jperkin Exp $ | | 1 | # $NetBSD: SunOS.mk,v 1.86 2022/11/21 18:25:54 jperkin Exp $ |
2 | # | | 2 | # |
3 | # Variable definitions for the SunOS/Solaris operating system. | | 3 | # Variable definitions for the SunOS/Solaris operating system. |
4 | | | 4 | |
5 | ECHO_N?= ${ECHO} -n | | 5 | ECHO_N?= ${ECHO} -n |
6 | IMAKE_MAKE?= ${MAKE} # program which gets invoked by imake | | 6 | IMAKE_MAKE?= ${MAKE} # program which gets invoked by imake |
7 | PKGLOCALEDIR?= lib | | 7 | PKGLOCALEDIR?= lib |
8 | PS?= /bin/ps | | 8 | PS?= /bin/ps |
9 | # XXX: default from defaults/mk.conf. Verify/correct for this platform | | 9 | # XXX: default from defaults/mk.conf. Verify/correct for this platform |
10 | # and remove this comment. | | 10 | # and remove this comment. |
11 | SU?= /usr/bin/su | | 11 | SU?= /usr/bin/su |
12 | TYPE?= /usr/bin/type | | 12 | TYPE?= /usr/bin/type |
13 | | | 13 | |
14 | CATMAN_SECTION_SUFFIX?= yes | | 14 | CATMAN_SECTION_SUFFIX?= yes |
15 | CPP_PRECOMP_FLAGS?= # unset | | 15 | CPP_PRECOMP_FLAGS?= # unset |
16 | DEF_UMASK?= 022 | | 16 | DEF_UMASK?= 022 |
17 | DEFAULT_SERIAL_DEVICE?= /dev/null | | 17 | DEFAULT_SERIAL_DEVICE?= /dev/null |
18 | EXPORT_SYMBOLS_LDFLAGS?= # Don't add symbols to the dynamic symbol table | | 18 | EXPORT_SYMBOLS_LDFLAGS?= # Don't add symbols to the dynamic symbol table |
19 | GROUPADD?= /usr/sbin/groupadd | | 19 | GROUPADD?= /usr/sbin/groupadd |
20 | NOLOGIN?= /usr/bin/false | | 20 | NOLOGIN?= /usr/bin/false |
21 | ROOT_CMD?= ${SU} - root -c | | 21 | ROOT_CMD?= ${SU} - root -c |
22 | ROOT_GROUP?= root | | 22 | ROOT_GROUP?= root |
23 | ROOT_USER?= root | | 23 | ROOT_USER?= root |
24 | SERIAL_DEVICES?= /dev/null | | 24 | SERIAL_DEVICES?= /dev/null |
25 | ULIMIT_CMD_datasize?= ulimit -d `${SETENV} LC_MESSAGES=C ulimit -H -d` | | 25 | ULIMIT_CMD_datasize?= ulimit -d `${SETENV} LC_MESSAGES=C ulimit -H -d` |
26 | ULIMIT_CMD_stacksize?= ulimit -s `${SETENV} LC_MESSAGES=C ulimit -H -s` | | 26 | ULIMIT_CMD_stacksize?= ulimit -s `${SETENV} LC_MESSAGES=C ulimit -H -s` |
27 | ULIMIT_CMD_cputime?= ulimit -t `${SETENV} LC_MESSAGES=C ulimit -H -t` | | 27 | ULIMIT_CMD_cputime?= ulimit -t `${SETENV} LC_MESSAGES=C ulimit -H -t` |
28 | ULIMIT_CMD_memorysize?= ulimit -v `${SETENV} LC_MESSAGES=C ulimit -H -v` | | 28 | ULIMIT_CMD_memorysize?= ulimit -v `${SETENV} LC_MESSAGES=C ulimit -H -v` |
29 | USERADD?= /usr/sbin/useradd | | 29 | USERADD?= /usr/sbin/useradd |
30 | | | 30 | |
31 | .if exists(/usr/openwin/include/X11/X.h) | | 31 | .if exists(/usr/openwin/include/X11/X.h) |
32 | X11_TYPE?= native | | 32 | X11_TYPE?= native |
33 | .else | | 33 | .else |
34 | X11_TYPE?= modular | | 34 | X11_TYPE?= modular |
35 | .endif | | 35 | .endif |
36 | .if ${X11_TYPE} == native | | 36 | .if ${X11_TYPE} == native |
37 | MOTIF_TYPE_DEFAULT?= dt # default 2.0 compatible libs type | | 37 | MOTIF_TYPE_DEFAULT?= dt # default 2.0 compatible libs type |
38 | .else | | 38 | .else |
39 | MOTIF_TYPE_DEFAULT?= motif | | 39 | MOTIF_TYPE_DEFAULT?= motif |
40 | .endif | | 40 | .endif |
41 | | | 41 | |
42 | # Use SMF by default if available. | | 42 | # Use SMF by default if available. |
43 | .if ${OPSYS_VERSION} >= 051000 | | 43 | .if ${OPSYS_VERSION} >= 051000 |
44 | INIT_SYSTEM?= smf | | 44 | INIT_SYSTEM?= smf |
45 | .endif | | 45 | .endif |
46 | | | 46 | |
47 | # Comes with a builtin implementation based on mit-krb5 | | 47 | # Comes with a builtin implementation based on mit-krb5 |
48 | KRB5_DEFAULT?= mit-krb5 | | 48 | KRB5_DEFAULT?= mit-krb5 |
49 | | | 49 | |
50 | # Builtin defaults which make sense for this platform. | | 50 | # Builtin defaults which make sense for this platform. |
51 | _OPSYS_PREFER.getopt?= native | | 51 | _OPSYS_PREFER.getopt?= native |
52 | _OPSYS_PREFER.libexecinfo?= native | | 52 | _OPSYS_PREFER.libexecinfo?= native |
53 | _OPSYS_PREFER.openssl?= pkgsrc | | 53 | _OPSYS_PREFER.openssl?= pkgsrc |
54 | _OPSYS_PREFER.solaris-pam?= native | | 54 | _OPSYS_PREFER.solaris-pam?= native |
55 | | | 55 | |
56 | _OPSYS_EMULDIR.solaris= # empty | | 56 | _OPSYS_EMULDIR.solaris= # empty |
57 | _OPSYS_EMULDIR.solaris32= # empty | | 57 | _OPSYS_EMULDIR.solaris32= # empty |
58 | _OPSYS_EMULDIR.sunos= # empty | | 58 | _OPSYS_EMULDIR.sunos= # empty |
59 | | | 59 | |
60 | .if exists(/usr/include/netinet/ip6.h) | | 60 | .if exists(/usr/include/netinet/ip6.h) |
61 | _OPSYS_HAS_INET6= yes # IPv6 is standard | | 61 | _OPSYS_HAS_INET6= yes # IPv6 is standard |
62 | .else | | 62 | .else |
63 | _OPSYS_HAS_INET6= no # IPv6 is not standard | | 63 | _OPSYS_HAS_INET6= no # IPv6 is not standard |
64 | .endif | | 64 | .endif |
65 | _OPSYS_HAS_JAVA= no # Java is not standard | | 65 | _OPSYS_HAS_JAVA= no # Java is not standard |
66 | _OPSYS_HAS_MANZ= no # no MANZ for gzipping of man pages | | 66 | _OPSYS_HAS_MANZ= no # no MANZ for gzipping of man pages |
67 | _OPSYS_HAS_OSSAUDIO= no # libossaudio is available | | 67 | _OPSYS_HAS_OSSAUDIO= no # libossaudio is available |
68 | _OPSYS_PERL_REQD= # no base version of perl required | | 68 | _OPSYS_PERL_REQD= # no base version of perl required |
69 | _OPSYS_PTHREAD_AUTO= no # -lpthread needed for pthreads | | 69 | _OPSYS_PTHREAD_AUTO= no # -lpthread needed for pthreads |
70 | _OPSYS_SHLIB_TYPE= ELF # shared lib type | | 70 | _OPSYS_SHLIB_TYPE= ELF # shared lib type |
71 | | | 71 | |
72 | _OPSYS_MISSING_FEATURES= asprintf | | 72 | _OPSYS_MISSING_FEATURES= asprintf |
73 | | | 73 | |
74 | .if !exists(/usr/include/err.h) | | 74 | .if !exists(/usr/include/err.h) |
75 | _OPSYS_MISSING_FEATURES+= err | | 75 | _OPSYS_MISSING_FEATURES+= err |
76 | .endif | | 76 | .endif |
77 | | | 77 | |
78 | .if ${OPSYS_VERSION} < 051100 | | 78 | .if ${OPSYS_VERSION} < 051100 |
79 | _OPSYS_MISSING_FEATURES+= strnlen | | 79 | _OPSYS_MISSING_FEATURES+= strnlen |
80 | .endif | | 80 | .endif |
81 | | | 81 | |
82 | _PATCH_CAN_BACKUP= yes # native patch(1) can make backups | | 82 | _PATCH_CAN_BACKUP= yes # native patch(1) can make backups |
83 | _PATCH_BACKUP_ARG?= -b -V simple -z # switch to patch(1) for backup suffix | | 83 | _PATCH_BACKUP_ARG?= -b -V simple -z # switch to patch(1) for backup suffix |
84 | _USE_RPATH= yes # add rpath to LDFLAGS | | 84 | _USE_RPATH= yes # add rpath to LDFLAGS |
85 | | | 85 | |
86 | # Remove flags specific to GNU ld. | | | |
87 | BUILDLINK_TRANSFORM+= rm:-Wl,--as-needed | | | |
88 | BUILDLINK_TRANSFORM+= rm:-Wl,--disable-new-dtags | | | |
89 | BUILDLINK_TRANSFORM+= rm:-Wl,--enable-new-dtags | | | |
90 | BUILDLINK_TRANSFORM+= rm:-Wl,--export-dynamic | | | |
91 | BUILDLINK_TRANSFORM+= rm:-Wl,--gc-sections | | | |
92 | BUILDLINK_TRANSFORM+= rm:-Wl,--no-as-needed | | | |
93 | BUILDLINK_TRANSFORM+= rm:-Wl,--warn-common | | | |
94 | BUILDLINK_TRANSFORM+= rm:-Wl,--warn-shared-textrel | | | |
95 | BUILDLINK_TRANSFORM+= rm:-Wl,-O1 | | | |
96 | BUILDLINK_TRANSFORM+= rm:-Wl,-O2 | | | |
97 | BUILDLINK_TRANSFORM+= rm:-Wl,-export-dynamic | | | |
98 | BUILDLINK_TRANSFORM+= rm:-export-dynamic | | | |
99 | | | | |
100 | # Convert GNU ld flags to native SunOS ld flags where possible. | | 86 | # Convert GNU ld flags to native SunOS ld flags where possible. |
101 | BUILDLINK_TRANSFORM+= opt:-Wl,--rpath:-Wl,-R | | 87 | BUILDLINK_TRANSFORM+= opt:-Wl,--rpath:-Wl,-R |
102 | | | 88 | |
103 | # Remove GCC-specific flags if using clang | | 89 | # Remove GCC-specific flags if using clang |
104 | .if ${PKGSRC_COMPILER} == "clang" | | 90 | .if ${PKGSRC_COMPILER} == "clang" |
105 | BUILDLINK_TRANSFORM+= rm:-mimpure-text | | 91 | BUILDLINK_TRANSFORM+= rm:-mimpure-text |
106 | .endif | | 92 | .endif |
107 | | | 93 | |
108 | # The native curses implementations are reasonably old and can cause lots of | | 94 | # The native curses implementations are reasonably old and can cause lots of |
109 | # issues with software which assumes newer interfaces, so it's easier to just | | 95 | # issues with software which assumes newer interfaces, so it's easier to just |
110 | # use pkgsrc curses at this point. Both curses and terminfo should be in sync | | 96 | # use pkgsrc curses at this point. Both curses and terminfo should be in sync |
111 | # otherwise it's possible to end up with conflicting buildlink transforms. | | 97 | # otherwise it's possible to end up with conflicting buildlink transforms. |
112 | # | | 98 | # |
113 | _INCOMPAT_CURSES= SunOS-*-* | | 99 | _INCOMPAT_CURSES= SunOS-*-* |
114 | _OPSYS_PREFER.terminfo?= pkgsrc | | 100 | _OPSYS_PREFER.terminfo?= pkgsrc |
115 | | | 101 | |
116 | # Solaris has /usr/include/iconv.h, but it's not GNU iconv, so mark it | | 102 | # Solaris has /usr/include/iconv.h, but it's not GNU iconv, so mark it |
117 | # incompatible. | | 103 | # incompatible. |
118 | _INCOMPAT_ICONV= SunOS-*-* | | 104 | _INCOMPAT_ICONV= SunOS-*-* |
119 | | | 105 | |
120 | _STRIPFLAG_CC?= ${_INSTALL_UNSTRIPPED:D:U-s} # cc(1) option to strip | | 106 | _STRIPFLAG_CC?= ${_INSTALL_UNSTRIPPED:D:U-s} # cc(1) option to strip |
121 | _STRIPFLAG_INSTALL?= ${_INSTALL_UNSTRIPPED:D:U-s} # install(1) option to strip | | 107 | _STRIPFLAG_INSTALL?= ${_INSTALL_UNSTRIPPED:D:U-s} # install(1) option to strip |
122 | | | 108 | |
123 | PKG_TOOLS_BIN?= ${LOCALBASE}/sbin | | 109 | PKG_TOOLS_BIN?= ${LOCALBASE}/sbin |
124 | | | 110 | |
125 | LIBABISUFFIX.sparc64= /sparcv9 | | 111 | LIBABISUFFIX.sparc64= /sparcv9 |
126 | LIBABISUFFIX.x86_64= /amd64 | | 112 | LIBABISUFFIX.x86_64= /amd64 |
127 | LIBABISUFFIX?= ${LIBABISUFFIX.${MACHINE_ARCH}} | | 113 | LIBABISUFFIX?= ${LIBABISUFFIX.${MACHINE_ARCH}} |
128 | _OPSYS_SYSTEM_RPATH?= /lib${LIBABISUFFIX}:/usr/lib${LIBABISUFFIX} | | 114 | _OPSYS_SYSTEM_RPATH?= /lib${LIBABISUFFIX}:/usr/lib${LIBABISUFFIX} |
129 | _OPSYS_LIB_DIRS?= /lib${LIBABISUFFIX} /usr/lib${LIBABISUFFIX} | | 115 | _OPSYS_LIB_DIRS?= /lib${LIBABISUFFIX} /usr/lib${LIBABISUFFIX} |
130 | _OPSYS_INCLUDE_DIRS?= /usr/include | | 116 | _OPSYS_INCLUDE_DIRS?= /usr/include |
131 | | | 117 | |
132 | # Sun Studio support is untested at this time, but would be strongly desired. | | 118 | # Sun Studio support is untested at this time, but would be strongly desired. |
133 | .if ${PKGSRC_COMPILER} != "sunpro" | | 119 | .if ${PKGSRC_COMPILER} != "sunpro" |
134 | _OPSYS_SUPPORTS_CWRAPPERS= yes | | 120 | _OPSYS_SUPPORTS_CWRAPPERS= yes |
135 | .endif | | 121 | .endif |
136 | | | 122 | |
137 | _OPSYS_SUPPORTS_CTF= yes # Compact Type Format conversion. | | 123 | _OPSYS_SUPPORTS_CTF= yes # Compact Type Format conversion. |
138 | _OPSYS_SUPPORTS_FORTIFY= yes # Requires GCC | | 124 | _OPSYS_SUPPORTS_FORTIFY= yes # Requires GCC |
139 | .if ${OPSYS_VERSION} >= 051100 | | 125 | .if ${OPSYS_VERSION} >= 051100 |
140 | _OPSYS_SUPPORTS_MKTOOLS= yes # Requires err.h | | 126 | _OPSYS_SUPPORTS_MKTOOLS= yes # Requires err.h |
141 | .endif | | 127 | .endif |
142 | _OPSYS_SUPPORTS_SSP?= yes # Requires GCC | | 128 | _OPSYS_SUPPORTS_SSP?= yes # Requires GCC |
143 | _OPSYS_CAN_CHECK_SHLIBS= yes # Requires readelf | | 129 | _OPSYS_CAN_CHECK_SHLIBS= yes # Requires readelf |
144 | | | 130 | |
145 | # The Solaris/illumos linker requires explicit library dependencies. | | 131 | # The Solaris/illumos linker requires explicit library dependencies. |
146 | OPSYS_EXPLICIT_LIBDEPS= yes | | 132 | OPSYS_EXPLICIT_LIBDEPS= yes |
147 | | | 133 | |
148 | # check for maximum command line length and set it in configure's environment, | | 134 | # check for maximum command line length and set it in configure's environment, |
149 | # to avoid a test required by the libtool script that takes forever. | | 135 | # to avoid a test required by the libtool script that takes forever. |
150 | # FIXME: Adjust to work on this system and enable the lines below. | | 136 | # FIXME: Adjust to work on this system and enable the lines below. |
151 | #_OPSYS_MAX_CMDLEN_CMD= /sbin/sysctl -n kern.argmax | | 137 | #_OPSYS_MAX_CMDLEN_CMD= /sbin/sysctl -n kern.argmax |