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

authored by Wolfgang Walther and committed by GitHub 046d26e5 a27ac571

+28
+12
pkgs/build-support/bintools-wrapper/default.nix
··· 383 383 '' 384 384 385 385 ## 386 + ## LLVM ranlab lacks -t option that libtool expects. We can just 387 + ## skip it 388 + ## 389 + 390 + + optionalString (isLLVM && targetPlatform.isOpenBSD) '' 391 + rm $out/bin/${targetPrefix}ranlib 392 + wrap \ 393 + ${targetPrefix}ranlib ${./llvm-ranlib-wrapper.sh} \ 394 + "${bintools_bin}/bin/${targetPrefix}ranlib" 395 + '' 396 + 397 + ## 386 398 ## Extra custom steps 387 399 ## 388 400 + extraBuildCommands;
+16
pkgs/build-support/bintools-wrapper/llvm-ranlib-wrapper.sh
··· 1 + #! @shell@ 2 + # shellcheck shell=bash 3 + 4 + args=() 5 + for p in "$@"; do 6 + case "$p" in 7 + -t) 8 + # Skip, LLVM ranlib doesn't support 9 + ;; 10 + *) 11 + args+=("$p") 12 + ;; 13 + esac 14 + done 15 + 16 + @prog@ "${args[@]}"