mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-24 17:40:37 +00:00
Compare commits
6 Commits
staging-ne
...
wip-gcc-16
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f7b16131d9 | ||
|
|
6c37551652 | ||
|
|
aab37bd258 | ||
|
|
017fed1d63 | ||
|
|
f46e80f6c5 | ||
|
|
8c8bcc8565 |
@@ -16,6 +16,8 @@
|
||||
+nixpkgs.url = "https://channels.nixos.org/nixos-26.05/nixexprs.tar.zst";
|
||||
```
|
||||
|
||||
- GCC has been updated from GCC 15 to GCC 16. This introduces some backwards-incompatible changes. Refer to the [upstream porting guide](https://gcc.gnu.org/gcc-16/porting_to.html) for details.
|
||||
|
||||
## Backward Incompatibilities {#sec-nixpkgs-release-26.11-incompatibilities}
|
||||
|
||||
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
autoreconfHook,
|
||||
# By default, jemalloc puts a je_ prefix onto all its symbols on OSX, which
|
||||
# then stops downstream builds (mariadb in particular) from detecting it. This
|
||||
@@ -59,6 +60,16 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
# A (longer) patch addressing the failure posted upstream at:
|
||||
# https://github.com/jemalloc/jemalloc/pull/2954
|
||||
./skip-extent-test-with-prof-active.patch
|
||||
|
||||
# the nonstandard `std::__throw_bad_alloc` is no longer exposed in gcc 16.
|
||||
# this makes it conditional on exceptions and defers to either
|
||||
# `throw std::bad_alloc()` or `std::terminate` as appropriate.
|
||||
# https://github.com/jemalloc/jemalloc/pull/2900
|
||||
(fetchpatch {
|
||||
name = "jemalloc-dont-use-nonstandard-throw-bad-alloc.patch";
|
||||
url = "https://github.com/jemalloc/jemalloc/commit/1a15fe33a48c52bfe26ea83e49f0d317a47da3ea.patch";
|
||||
hash = "sha256-pL9fo8UMSbFlHCo3LFFkw0qBsdrVHcEJIkLutZYa2Yg=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
diff --git a/lib/tests/test_regexranges_main.cpp b/lib/tests/test_regexranges_main.cpp
|
||||
index 567d79230c..e28bba47e5 100644
|
||||
--- a/lib/tests/test_regexranges_main.cpp
|
||||
+++ b/lib/tests/test_regexranges_main.cpp
|
||||
@@ -12,26 +12,26 @@
|
||||
using namespace std;
|
||||
using namespace srchilite;
|
||||
|
||||
-RegexRanges ranges;
|
||||
+RegexRanges regexRanges;
|
||||
|
||||
void check_range_regex(const string &s, bool expectedTrue = true) {
|
||||
cout << "checking " << s << endl;
|
||||
if (expectedTrue)
|
||||
- assertTrue(ranges.addRegexRange(s));
|
||||
+ assertTrue(regexRanges.addRegexRange(s));
|
||||
else
|
||||
- assertFalse(ranges.addRegexRange(s));
|
||||
+ assertFalse(regexRanges.addRegexRange(s));
|
||||
}
|
||||
|
||||
void check_match(const string &line, const string &expected = "") {
|
||||
cout << "searching inside " << line;
|
||||
const boost::regex *matched = 0;
|
||||
if (expected != "") {
|
||||
- matched = ranges.matches(line);
|
||||
+ matched = regexRanges.matches(line);
|
||||
assertTrue(matched != 0);
|
||||
assertEquals(expected, matched->str());
|
||||
cout << " found " << *matched << endl;
|
||||
} else {
|
||||
- assertTrue(ranges.matches(line) == 0);
|
||||
+ assertTrue(regexRanges.matches(line) == 0);
|
||||
cout << " not found" << endl;
|
||||
}
|
||||
}
|
||||
@@ -39,9 +39,9 @@
|
||||
void check_in_range(const string &s, bool expectedTrue = true) {
|
||||
cout << "checking " << s << "... ";
|
||||
if (expectedTrue) {
|
||||
- assertTrue(ranges.isInRange(s));
|
||||
+ assertTrue(regexRanges.isInRange(s));
|
||||
} else {
|
||||
- assertFalse(ranges.isInRange(s));
|
||||
+ assertFalse(regexRanges.isInRange(s));
|
||||
}
|
||||
cout << expectedTrue << endl;
|
||||
}
|
||||
@@ -57,7 +57,7 @@
|
||||
check_range_regex("{notclosed");
|
||||
|
||||
// reset regular expressions
|
||||
- ranges.clear();
|
||||
+ regexRanges.clear();
|
||||
|
||||
check_range_regex("/// foo");
|
||||
check_range_regex("/// bar");
|
||||
@@ -37,6 +37,11 @@ stdenv.mkDerivation rec {
|
||||
url = "https://git.savannah.gnu.org/cgit/src-highlite.git/patch/?id=ab9fe5cb9b85c5afab94f2a7f4b6d7d473c14ee9";
|
||||
hash = "sha256-wmSLgLnLuFE+IC6AjxzZp/HEnaOCS1VfY2cac0T7Y+w=";
|
||||
})
|
||||
|
||||
# GCC 16 detects ambiguity in the `ranges` name in a test (conflicts with
|
||||
# `namespace std::range { }` from GCC), so we rename the variable to
|
||||
# disambiguate.
|
||||
./gcc16-disambiguate-regex-ranges-test.patch
|
||||
]
|
||||
++ lib.optionals stdenv.cc.isClang [
|
||||
# Adds compatibility with C++17 by removing the `register` storage class specifier.
|
||||
|
||||
@@ -38,6 +38,11 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
# GCC 16's unused variable analysis is more advanced, leading to a build
|
||||
# failure since usrsctp builds with -Wno-error.
|
||||
# https://github.com/sctplab/usrsctp/pull/744
|
||||
cmakeFlags = [ (lib.cmakeFeature "CMAKE_C_FLAGS" "-Wno-error=unused-but-set-variable") ];
|
||||
|
||||
# https://github.com/sctplab/usrsctp/issues/662
|
||||
postPatch = ''
|
||||
substituteInPlace usrsctplib/CMakeLists.txt \
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
}:
|
||||
let
|
||||
pname = "gcc";
|
||||
version = "15.3.0";
|
||||
version = "16.1.0";
|
||||
linkerName =
|
||||
{
|
||||
i686-linux = "ld-linux.so.2";
|
||||
@@ -32,7 +32,7 @@ let
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.xz";
|
||||
hash = "sha256-+lnBvu+JlfJ8TXHB3yJ1hxiTFdPm+v8btDBuYbDFMOs=";
|
||||
hash = "sha256-UO+02Uwzl6/zsNYaWr10i03THZ0/Kre+BbFx02pRD3k=";
|
||||
};
|
||||
|
||||
gmpVersion = "6.3.0";
|
||||
|
||||
@@ -21,11 +21,11 @@
|
||||
}:
|
||||
let
|
||||
pname = "gcc";
|
||||
version = "15.3.0";
|
||||
version = "16.1.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.xz";
|
||||
hash = "sha256-+lnBvu+JlfJ8TXHB3yJ1hxiTFdPm+v8btDBuYbDFMOs=";
|
||||
hash = "sha256-UO+02Uwzl6/zsNYaWr10i03THZ0/Kre+BbFx02pRD3k=";
|
||||
};
|
||||
|
||||
gmpVersion = "6.3.0";
|
||||
|
||||
@@ -3266,7 +3266,7 @@ with pkgs;
|
||||
gerbilPackages-unstable = pkgs.gerbil-support.gerbilPackages-unstable; # NB: don't recurseIntoAttrs for (unstable!) libraries
|
||||
glow-lang = pkgs.gerbilPackages-unstable.glow-lang;
|
||||
|
||||
default-gcc-version = 15;
|
||||
default-gcc-version = 16;
|
||||
gcc = pkgs.${"gcc${toString default-gcc-version}"};
|
||||
gccFun = callPackage ../development/compilers/gcc;
|
||||
gcc-unwrapped = gcc.cc;
|
||||
|
||||
Reference in New Issue
Block a user