@@ -7,13 +7,14 @@ class Binutils < Formula
77 license all_of : [ "GPL-2.0-or-later" , "GPL-3.0-or-later" , "LGPL-2.0-or-later" , "LGPL-3.0-only" ]
88
99 bottle do
10- sha256 arm64_sequoia : "4f7274b8d53163dc1d8dc2b18cc2c7eff75d5efd01db222e7d8bd5f3f05af2c2"
11- sha256 arm64_sonoma : "bcf972b443b276ee59fc94a4c5c84b54d7702ef6bab66b55c811420eaf548dcd"
12- sha256 arm64_ventura : "db7f43289bcfffe3c70abef62a1a641671ae8fefb858b654161f7914109286fa"
13- sha256 sonoma : "dfb68055c0d2bddab0e17ab861d76be558877d5f3d960c826fb26a0d59eede14"
14- sha256 ventura : "a1821fba84ee3cbaab966febef3bedc05dc1c1327fadeb768c2f19790c97bf10"
15- sha256 arm64_linux : "f2b26e219cd1a37afbd7743be40ce71525604979d0f7bcdc63fbbce016f4cd4d"
16- sha256 x86_64_linux : "0b5a67a3cfd1779c829a131f38895e1b6c755c57187510cf998f77d4d3a7ddd7"
10+ rebuild 1
11+ sha256 arm64_sequoia : "3fb936ff0d64e4bc3530ab07f83417f5dea8c098549ec506f19f1c6ae4962cb6"
12+ sha256 arm64_sonoma : "1a6356d10575b843eafe84253ba51c147334239b37e02d99288d998466912471"
13+ sha256 arm64_ventura : "4a1b661cba6a910e35d0691d2d1dda1ed6337e212fb6237a6189dfa99bb45888"
14+ sha256 sonoma : "fb94a53dfab0618b68dcf429dfcd54d5854f74bff87225dc2f6465d9bb278f07"
15+ sha256 ventura : "96dcff59ccbb203e0fa8ccb7a36bc9eaba8fe6a63010bbb77f1238df951bce78"
16+ sha256 arm64_linux : "9d452137d4cfe39d4edbf7e9ae47389039345a3ac6ec85e9b3bcdca6911f3b75"
17+ sha256 x86_64_linux : "a6a1fca273e6ac2ed2309c0f0c4180cf10fae283bc303c58da8ce3771598c1b3"
1718 end
1819
1920 keg_only "it shadows the host toolchain"
@@ -24,6 +25,8 @@ class Binutils < Formula
2425 uses_from_macos "bison" => :build
2526 uses_from_macos "zlib"
2627
28+ skip_clean "etc/ld.so.conf"
29+
2730 link_overwrite "bin/dwp"
2831
2932 def install
@@ -61,9 +64,13 @@ def install
6164 bin_files = bin . children . select ( &:elf? )
6265 system "strip" , *bin_files , *lib . glob ( "*.a" )
6366 end
67+
68+ # Allow ld to find brew glibc. A broken symlink falls back to /etc/ld.so.conf
69+ ( prefix /"etc" ) . install_symlink etc /"ld.so.conf" if OS . linux?
6470 end
6571
6672 test do
6773 assert_match "Usage:" , shell_output ( "#{ bin } /strings #{ bin } /strings" )
74+ assert_predicate prefix /"etc/ld.so.conf" , :symlink? if OS . linux?
6875 end
6976end
0 commit comments