pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/doc/guide/files
Module Name: pkgsrc
Committed By: nia
Date: Sat May 21 11:14:56 UTC 2022
Modified Files:
pkgsrc/doc/guide/files: fixes.xml
Log Message:
guide: Notes on C++ standards support in pkgsrc
To generate a diff of this commit:
cvs rdiff -u -r1.170 -r1.171 pkgsrc/doc/guide/files/fixes.xml
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/doc/guide/files/fixes.xml
diff -u pkgsrc/doc/guide/files/fixes.xml:1.170 pkgsrc/doc/guide/files/fixes.xml:1.171
--- pkgsrc/doc/guide/files/fixes.xml:1.170 Wed May 11 22:48:43 2022
+++ pkgsrc/doc/guide/files/fixes.xml Sat May 21 11:14:56 2022
@@ -1,4 +1,4 @@
-<!-- $NetBSD: fixes.xml,v 1.170 2022/05/11 22:48:43 rillig Exp $ -->
+<!-- $NetBSD: fixes.xml,v 1.171 2022/05/21 11:14:56 nia Exp $ -->
<chapter id="fixes"> <?dbhtml filename="fixes.html"?>
<title>Making your package work</title>
@@ -1399,7 +1399,7 @@ pre-configure:
<sect2 id="basic-programming-languages">
<title>C, C++, and Fortran</title>
- <para>Compilers for the C, C++, and Fortran languages comes with
+ <para>Compilers for the C and C++ languages comes with
the NetBSD base system. By default, pkgsrc assumes that a package
is written in C and will hide all other compilers (via the wrapper
framework, see <xref linkend="buildlink" />).</para>
@@ -1416,6 +1416,26 @@ pre-configure:
<quote>c</quote>. Packages using GNU configure scripts, even if
written in C++, usually need a C compiler for the configure
phase.</para>
+
+ <para>To express a general requirement on a specific C or C++
+ version, normally only <varname>GCC_REQD</varname> needs to be set.
+ For example, GCC 7 includes support for C++17, so if the package uses
+ C++17 it should specify:
+
+ <programlisting>
+ GCC_REQD+= 7
+ </programlisting></para>
+
+ <para>Language variants like <literal>c++11</literal> for
+ <varname>USE_LANGUAGES</varname> should only be specified
+ if the package does not explicitly set <literal>-std=...</literal>
+ when compiling (i.e. the package assumes the compiler defaults to
+ C++11 or some other standard). This is usually a bug in the
+ upstream build system.</para>
+
+ <para>GCC version 5 includes support for C++14, while GCC 4.7 includes
+ more-or-less complete support for C++11. For more information, consult
+ <ulink url="https://gcc.gnu.org/projects/cxx-status.html">GCC's own documentation on programming language support.</ulink></para>
</sect2>
<sect2 id="java-programming-language">
Home |
Main Index |
Thread Index |
Old Index