Skip to content

Commit

Permalink
Merge pull request #329815 from obsidiansystems/openbsd-llvm-24.05
Browse files Browse the repository at this point in the history
[Backport 24.05] llvm_18, lld_18: Patch to support more OpenBSD sections
  • Loading branch information
Ericson2314 authored Jul 25, 2024
2 parents 284073a + 5eefee1 commit 6879fbb
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion pkgs/development/compilers/llvm/common/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,23 @@ let
relative = "llvm";
hash = "sha256-Ot45P/iwaR4hkcM3xtLwfryQNgHI6pv6ADjv98tgdZA=";
})
]
++ lib.optionals (lib.versions.major metadata.release_version == "18") [
# Reorgs one test so the next patch applies
(fetchpatch {
name = "osabi-test-reorg.patch";
url = "https://github.com/llvm/llvm-project/commit/06cecdc60ec9ebfdd4d8cdb2586d201272bdf6bd.patch";
stripLen = 1;
hash = "sha256-s9GZTNgzLS511Pzh6Wb1hEV68lxhmLWXjlybHBDMhvM=";
})
# Sets the OSABI for OpenBSD, needed for an LLD patch for OpenBSD.
# https://github.com/llvm/llvm-project/pull/98553
(fetchpatch {
name = "mc-set-openbsd-osabi.patch";
url = "https://github.com/llvm/llvm-project/commit/b64c1de714c50bec7493530446ebf5e540d5f96a.patch";
stripLen = 1;
hash = "sha256-fqw5gTSEOGs3kAguR4tINFG7Xja1RAje+q67HJt2nGg=";
})
];
pollyPatches =
[ (metadata.getVersionFile "llvm/gnu-install-dirs-polly.patch") ]
Expand Down Expand Up @@ -305,7 +322,16 @@ let
)
++ lib.optional (
lib.versionAtLeast metadata.release_version "16" && lib.versionOlder metadata.release_version "18"
) (metadata.getVersionFile "lld/add-table-base.patch");
) (metadata.getVersionFile "lld/add-table-base.patch")
++ lib.optional (lib.versions.major metadata.release_version == "18") (
# https://github.com/llvm/llvm-project/pull/97122
fetchpatch {
name = "more-openbsd-program-headers.patch";
url = "https://github.com/llvm/llvm-project/commit/d7fd8b19e560fbb613159625acd8046d0df75115.patch";
stripLen = 1;
hash = "sha256-7wTy7XDTx0+fhWQpW1KEuz7xJvpl42qMTUfd20KGOfA=";
}
);
};

lldb = callPackage ./lldb.nix (
Expand Down

0 comments on commit 6879fbb

Please sign in to comment.