Merge pull request #10652 from danielnachun/revert-gcc-linkage-fix

cc: revert change to remove linker flag
This commit is contained in:
Bo Anderson 2021-02-19 02:48:56 +00:00 committed by GitHub
commit 3ff5795ae1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -303,12 +303,6 @@ class Cmd
end
def ldflags_linux(args)
# Remove $HOMEBREW_PREFIX/lib from the args because it is already provided by the GCC specs,
# and breaks linkage to GCC runtime libraries.
# Don't remove it when using clang, which does not use specs like GCC does.
# https://github.com/Homebrew/brew/pull/10606
args.pop() if tool !~ /^clang/
unless mode == :ld
wl = "-Wl,"
args << "-B#{@opt}/glibc/lib"