Feature: ld
formula for Linux
#4634
-
Additional Info
Output of
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
You may use $ "$(brew --prefix binutils)"/bin/ld --version
GNU ld (GNU Binutils) 2.40
Copyright (C) 2023 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty. Or, follow the caveats found in |
Beta Was this translation helpful? Give feedback.
-
ok... I just realized it was already in the output. $ brew install binutils
==> Fetching binutils
==> Downloading https://ghcr.io/v2/homebrew/core/binutils/manifests/2.40
Already downloaded: /var/home/dracula/.cache/Homebrew/downloads/c7fb23edf5c6c66ef0044acaa26d1d03ec2131cb53a64a6127aaf6e5620a905b--binutils-2.40.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/binutils/blobs/sha256:f0917ab2fe7b72350deac1946dd8e937e0199292f05ab7
Already downloaded: /var/home/dracula/.cache/Homebrew/downloads/46c4051d6d134c64f7376d134996bd75e8a31703764e53799f48d37e0780dfcd--binutils--2.40.x86_64_linux.bottle.tar.gz
==> Pouring binutils--2.40.x86_64_linux.bottle.tar.gz
==> Caveats
binutils is keg-only, which means it was not symlinked into /home/linuxbrew/.linuxbrew,
because it shadows the host toolchain.
If you need to have binutils first in your PATH, run:
echo 'export PATH="/home/linuxbrew/.linuxbrew/opt/binutils/bin:$PATH"' >> /var/home/dracula/.bash_profile
For compilers to find binutils you may need to set:
export LDFLAGS="-L/home/linuxbrew/.linuxbrew/opt/binutils/lib"
export CPPFLAGS="-I/home/linuxbrew/.linuxbrew/opt/binutils/include"
==> Summary
🍺 /home/linuxbrew/.linuxbrew/Cellar/binutils/2.40: 4,698 files, 462.4MB
==> Running `brew cleanup binutils`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`). I think I mistakenly thought I can just prepend $ brew reinstall coreutils
==> Fetching coreutils
==> Downloading https://ghcr.io/v2/homebrew/core/coreutils/manifests/9.3
Already downloaded: /var/home/dracula/.cache/Homebrew/downloads/609f2c1be77d32e761174c0fd1ceb71c0714bc34cb531569f43b723f87304ebf--coreutils-9.3.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/coreutils/blobs/sha256:376674abab0d5c19e3f3db5481a2604adac227f89036c
Already downloaded: /var/home/dracula/.cache/Homebrew/downloads/e70a21c1e6dc846b72247528c602c981c4e8f55a0432913ef73f4794591ff5c6--coreutils--9.3.x86_64_linux.bottle.tar.gz
==> Reinstalling coreutils
==> Pouring coreutils--9.3.x86_64_linux.bottle.tar.gz
==> Caveats
All commands have been installed with the prefix "g".
If you need to use these commands with their normal names, you can add a "gnubin" directory to your PATH with:
PATH="/home/linuxbrew/.linuxbrew/opt/coreutils/libexec/gnubin:$PATH"
==> Summary
🍺 /home/linuxbrew/.linuxbrew/Cellar/coreutils/9.3: 574 files, 20.9MB
==> Running `brew cleanup coreutils`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`). Closing since Homebrew/homebrew-core#17794 is no longer the case. |
Beta Was this translation helpful? Give feedback.
ld
is shipped on Linux. The problem is that it is keg-only so you won't find it in"$(brew --prefix)/bin"
.You may use
"$(brew --prefix binutils)"/bin/ld
:Or, follow the caveats found in
brew info binutils
to haveld
and otherbinutils
executables first in yourPATH
. Do this with care as that may shadow the host toolchain.