Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

95 lines
1.7 KiB
Nix

{
lib,
stdenv,
gcc_meta,
release_version,
version,
getVersionFile,
monorepoSrc ? null,
fetchpatch,
autoreconfHook269,
runCommand,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "libatomic";
inherit version;
src = runCommand "libatomic-src-${version}" { src = monorepoSrc; } ''
runPhase unpackPhase
mkdir -p "$out/gcc"
cp gcc/BASE-VER "$out/gcc"
cp gcc/DATESTAMP "$out/gcc"
cp -r libatomic "$out"
cp -r config "$out"
cp -r multilib.am "$out"
cp -r libtool.m4 "$out"
cp config.guess "$out"
cp config.rpath "$out"
cp config.sub "$out"
cp config-ml.in "$out"
cp ltmain.sh "$out"
cp install-sh "$out"
cp mkinstalldirs "$out"
[[ -f MD5SUMS ]]; cp MD5SUMS "$out"
'';
patches = [
(fetchpatch {
name = "custom-threading-model.patch";
url = "https://inbox.sourceware.org/gcc-patches/20250716204545.1063669-1-git@JohnEricson.me/raw";
hash = "sha256-kxNntY2r4i/+XHQSpf9bYV2Jg+FD/pD5TiMn5hd4ckk=";
includes = [
"config/*"
"libatomic/*"
];
})
];
postUnpack = ''
mkdir -p ./build
buildRoot=$(readlink -e "./build")
'';
preAutoreconf = ''
sourceRoot=$(readlink -e "./libatomic")
cd $sourceRoot
'';
enableParallelBuilding = true;
nativeBuildInputs = [
autoreconfHook269
];
configurePlatforms = [
"build"
"host"
];
configureFlags = [
"--disable-dependency-tracking"
"cross_compiling=true"
"--disable-multilib"
];
preConfigure = ''
cd "$buildRoot"
configureScript=$sourceRoot/configure
'';
doCheck = true;
passthru = {
isGNU = true;
};
meta = gcc_meta // {
homepage = "https://gcc.gnu.org/";
};
})