mk: Add support for is_trivially_copy_constructible in USE_CXX_FEATURES. While a mouthful, this is the name the GCC commit message used for the features.diff -r1.187 -r1.188 pkgsrc/doc/guide/files/fixes.xml
(nia)
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | <!-- $NetBSD: fixes.xml,v 1.187 2023/07/21 08:29:56 nia Exp $ --> | 1 | <!-- $NetBSD: fixes.xml,v 1.188 2023/07/22 12:20:37 nia Exp $ --> | |
2 | 2 | |||
3 | <chapter id="fixes"> <?dbhtml filename="fixes.html"?> | 3 | <chapter id="fixes"> <?dbhtml filename="fixes.html"?> | |
4 | <title>Making your package work</title> | 4 | <title>Making your package work</title> | |
5 | 5 | |||
6 | <sect1 id="general-operation"> | 6 | <sect1 id="general-operation"> | |
7 | <title>General operation</title> | 7 | <title>General operation</title> | |
8 | 8 | |||
9 | <para>One appealing feature of pkgsrc is that it runs on many | 9 | <para>One appealing feature of pkgsrc is that it runs on many | |
10 | different platforms. As a result, it is important to ensure, | 10 | different platforms. As a result, it is important to ensure, | |
11 | where possible, that packages in pkgsrc are portable. This | 11 | where possible, that packages in pkgsrc are portable. This | |
12 | chapter mentions some particular details you should pay | 12 | chapter mentions some particular details you should pay | |
13 | attention to while working on pkgsrc.</para> | 13 | attention to while working on pkgsrc.</para> | |
14 | 14 | |||
@@ -1448,27 +1448,28 @@ fortran77, java, objc, obj-c++, and ada. | @@ -1448,27 +1448,28 @@ fortran77, java, objc, obj-c++, and ada. | |||
1448 | This is a common bug in upstream build systems.</para> | 1448 | This is a common bug in upstream build systems.</para> | |
1449 | 1449 | |||
1450 | <para>To declare which features a package requies from the | 1450 | <para>To declare which features a package requies from the | |
1451 | compiler, set either <varname>USE_CC_FEATURES</varname> | 1451 | compiler, set either <varname>USE_CC_FEATURES</varname> | |
1452 | or <varname>USE_CXX_FEATURES</varname>. Allowed values for | 1452 | or <varname>USE_CXX_FEATURES</varname>. Allowed values for | |
1453 | <varname>USE_CC_FEATURES</varname> are currently: | 1453 | <varname>USE_CC_FEATURES</varname> are currently: | |
1454 | <programlisting> | 1454 | <programlisting> | |
1455 | c11, c99, has_include | 1455 | c11, c99, has_include | |
1456 | </programlisting> | 1456 | </programlisting> | |
1457 | Allowed values for <varname>USE_CXX_FEATURES</varname> are | 1457 | Allowed values for <varname>USE_CXX_FEATURES</varname> are | |
1458 | currently: | 1458 | currently: | |
1459 | <programlisting> | 1459 | <programlisting> | |
1460 | c++11, c++14, c++17, c++20, has_include, regex, filesystem, | 1460 | c++11, c++14, c++17, c++20, has_include, regex, filesystem, | |
1461 | charconv, parallelism_ts, unique_ptr, put_time | 1461 | charconv, parallelism_ts, unique_ptr, put_time, | |
1462 | is_trivially_copy_constructible | |||
1462 | </programlisting> | 1463 | </programlisting> | |
1463 | .</para> | 1464 | .</para> | |
1464 | </para> | 1465 | </para> | |
1465 | </sect2> | 1466 | </sect2> | |
1466 | 1467 | |||
1467 | <sect2 id="java-programming-language"> | 1468 | <sect2 id="java-programming-language"> | |
1468 | <title>Java</title> | 1469 | <title>Java</title> | |
1469 | 1470 | |||
1470 | <para>If a program is written in Java, use the Java framework in | 1471 | <para>If a program is written in Java, use the Java framework in | |
1471 | pkgsrc. The package must include | 1472 | pkgsrc. The package must include | |
1472 | <filename>../../mk/java-vm.mk</filename>. This Makefile fragment | 1473 | <filename>../../mk/java-vm.mk</filename>. This Makefile fragment | |
1473 | provides the following variables:</para> | 1474 | provides the following variables:</para> | |
1474 | 1475 |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: compiler.mk,v 1.101 2023/07/21 08:29:56 nia Exp $ | 1 | # $NetBSD: compiler.mk,v 1.102 2023/07/22 12:20:37 nia Exp $ | |
2 | # | 2 | # | |
3 | # This Makefile fragment implements handling for supported C/C++/Fortran | 3 | # This Makefile fragment implements handling for supported C/C++/Fortran | |
4 | # compilers. | 4 | # compilers. | |
5 | # | 5 | # | |
6 | # The following variables may be set by the pkgsrc user in mk.conf: | 6 | # The following variables may be set by the pkgsrc user in mk.conf: | |
7 | # | 7 | # | |
8 | # PKGSRC_COMPILER | 8 | # PKGSRC_COMPILER | |
9 | # A list of values specifying the chain of compilers to be used by | 9 | # A list of values specifying the chain of compilers to be used by | |
10 | # pkgsrc to build packages. | 10 | # pkgsrc to build packages. | |
11 | # | 11 | # | |
12 | # Valid values are: | 12 | # Valid values are: | |
13 | # ccc Compaq C Compilers (Tru64) | 13 | # ccc Compaq C Compilers (Tru64) | |
14 | # ccache compiler cache (chainable) | 14 | # ccache compiler cache (chainable) | |
@@ -72,27 +72,27 @@ | @@ -72,27 +72,27 @@ | |||
72 | # than provided by the system, or to skip building the package. | 72 | # than provided by the system, or to skip building the package. | |
73 | # | 73 | # | |
74 | # Valid values are: c11, c99, has_include. | 74 | # Valid values are: c11, c99, has_include. | |
75 | # | 75 | # | |
76 | # USE_CXX_FEATURES | 76 | # USE_CXX_FEATURES | |
77 | # | 77 | # | |
78 | # Declares the C++ compiler features required by the package. | 78 | # Declares the C++ compiler features required by the package. | |
79 | # | 79 | # | |
80 | # This is used to (optionally) install a newer compiler | 80 | # This is used to (optionally) install a newer compiler | |
81 | # than provided by the system, to or skip building the package. | 81 | # than provided by the system, to or skip building the package. | |
82 | # | 82 | # | |
83 | # Valid values are: c++11, c++14, c++17, c++20, has_include, | 83 | # Valid values are: c++11, c++14, c++17, c++20, has_include, | |
84 | # regex, filesystem, unique_ptr, charconv, parallelism_ts, | 84 | # regex, filesystem, unique_ptr, charconv, parallelism_ts, | |
85 | # put_time. | 85 | # put_time, is_trivially_copy_constructible. | |
86 | # | 86 | # | |
87 | # The following variables are defined, and available for testing in | 87 | # The following variables are defined, and available for testing in | |
88 | # package Makefiles: | 88 | # package Makefiles: | |
89 | # | 89 | # | |
90 | # CC_VERSION | 90 | # CC_VERSION | |
91 | # The compiler and version being used, e.g., | 91 | # The compiler and version being used, e.g., | |
92 | # | 92 | # | |
93 | # .include "../../mk/compiler.mk" | 93 | # .include "../../mk/compiler.mk" | |
94 | # | 94 | # | |
95 | # .if !empty(CC_VERSION:Mgcc-3*) | 95 | # .if !empty(CC_VERSION:Mgcc-3*) | |
96 | # ... | 96 | # ... | |
97 | # .endif | 97 | # .endif | |
98 | # | 98 | # |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: gcc.mk,v 1.256 2023/07/21 08:29:56 nia Exp $ | 1 | # $NetBSD: gcc.mk,v 1.257 2023/07/22 12:20:37 nia Exp $ | |
2 | # | 2 | # | |
3 | # This is the compiler definition for the GNU Compiler Collection. | 3 | # This is the compiler definition for the GNU Compiler Collection. | |
4 | # | 4 | # | |
5 | # User-settable variables: | 5 | # User-settable variables: | |
6 | # | 6 | # | |
7 | # GCCBASE | 7 | # GCCBASE | |
8 | # If using a native GCC and the compiler is not in $PATH then | 8 | # If using a native GCC and the compiler is not in $PATH then | |
9 | # this should be set to the base installation directory. | 9 | # this should be set to the base installation directory. | |
10 | # | 10 | # | |
11 | # USE_NATIVE_GCC | 11 | # USE_NATIVE_GCC | |
12 | # When set to "yes", the native gcc is used, no matter which | 12 | # When set to "yes", the native gcc is used, no matter which | |
13 | # compiler version a package requires. | 13 | # compiler version a package requires. | |
14 | # | 14 | # | |
@@ -209,26 +209,30 @@ GCC_REQD+= 4.9 | @@ -209,26 +209,30 @@ GCC_REQD+= 4.9 | |||
209 | 209 | |||
210 | .if !empty(USE_CXX_FEATURES:Munique_ptr) | 210 | .if !empty(USE_CXX_FEATURES:Munique_ptr) | |
211 | GCC_REQD+= 4.9 | 211 | GCC_REQD+= 4.9 | |
212 | .endif | 212 | .endif | |
213 | 213 | |||
214 | .if !empty(USE_CXX_FEATURES:Mregex) | 214 | .if !empty(USE_CXX_FEATURES:Mregex) | |
215 | GCC_REQD+= 4.9 | 215 | GCC_REQD+= 4.9 | |
216 | .endif | 216 | .endif | |
217 | 217 | |||
218 | .if !empty(USE_CXX_FEATURES:Mput_time) | 218 | .if !empty(USE_CXX_FEATURES:Mput_time) | |
219 | GCC_REQD+= 5 | 219 | GCC_REQD+= 5 | |
220 | .endif | 220 | .endif | |
221 | 221 | |||
222 | .if !empty(USE_CXX_FEATURES:Mis_trivially_copy_constructible) | |||
223 | GCC_REQD+= 5 | |||
224 | .endif | |||
225 | ||||
222 | .if !empty(USE_CXX_FEATURES:Mfilesystem) | 226 | .if !empty(USE_CXX_FEATURES:Mfilesystem) | |
223 | GCC_REQD+= 8 | 227 | GCC_REQD+= 8 | |
224 | .endif | 228 | .endif | |
225 | 229 | |||
226 | .if !empty(USE_CXX_FEATURES:Mparallelism_ts) | 230 | .if !empty(USE_CXX_FEATURES:Mparallelism_ts) | |
227 | GCC_REQD+= 10 | 231 | GCC_REQD+= 10 | |
228 | .endif | 232 | .endif | |
229 | 233 | |||
230 | .if !empty(USE_CXX_FEATURES:Mcharconv) | 234 | .if !empty(USE_CXX_FEATURES:Mcharconv) | |
231 | GCC_REQD+= 8 | 235 | GCC_REQD+= 8 | |
232 | .endif | 236 | .endif | |
233 | 237 | |||
234 | # Only one compiler defined here supports Ada: lang/gcc6-aux | 238 | # Only one compiler defined here supports Ada: lang/gcc6-aux |