Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

llvmPackages.bintuils: Hack ranlib to ignore -t #359387

Merged
merged 1 commit into from
Dec 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions pkgs/build-support/bintools-wrapper/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,18 @@ stdenvNoCC.mkDerivation {
substituteAll ${./add-darwin-ldflags-before.sh} $out/nix-support/add-local-ldflags-before.sh
''

##
## LLVM ranlab lacks -t option that libtool expects. We can just
## skip it
##

+ optionalString (isLLVM && targetPlatform.isOpenBSD) ''
rm $out/bin/${targetPrefix}ranlib
wrap \
${targetPrefix}ranlib ${./llvm-ranlib-wrapper.sh} \
"${bintools_bin}/bin/${targetPrefix}ranlib"
''

##
## Extra custom steps
##
Expand Down
16 changes: 16 additions & 0 deletions pkgs/build-support/bintools-wrapper/llvm-ranlib-wrapper.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#! @shell@
# shellcheck shell=bash

args=()
for p in "$@"; do
case "$p" in
-t)
# Skip, LLVM ranlib doesn't support
;;
*)
args+=("$p")
;;
esac
done

@prog@ "${args[@]}"
Loading