This commit removes build-static.sh because statically-linked mold
executable can't generally dlopen a shared library and therefore can't
load the linker LTO plugin.
Now, build-dynamic.sh is renamed dist.sh and recommended for general
use.
mold does not have to be built with clang/clang++, so don't use
these compiler frontends.
mold also doesn't have be built with g++ (GNU C++ compiler).
We use `c++` command instead.
Fixes https://github.com/rui314/mold/issues/261
Fedora dependencies were tested in a fresh Fedora 34 Docker container.
- Use all available CPU threads to speed up compilation.
- Add `sudo make install` step to make the mold binary available
system-wide.
- List Ubuntu instructions as compatible with Debian 11 (tested
in a fresh Docker container).
- Reorder the list of dependencies to be consistent between Ubuntu
and Fedora.
- Don't use a `$` prefix for commands to make copy-pasting easier.
- Fix warnings reported by markdownlint.
Signed-off-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
I was experimenting with cmake to see if it is useful for mold,
but it looks like using cmake doesn't make much sense for us.
So I'm undoing all changes that I did for cmake.
cmake is definitely better than autoconf, and it is also useful
if your program is cross-platform. However, neither of the benefits
don't apply to mold; mold doesn't need a complex feature detection,
and it currently supports only ELF-based Unix-like systems.
I think Makefile is a lingua-franca, while CMakeLists.txt isn't.
The good ol' Makefile works just fine for mold.
In the future, mold might become a cross-platform product, and if
that happens, we might want to re-introduce cmake.
I recommend users use the latest release instead of git HEAD
because HEAD may be broken in a subtle way. Before a release,
I build all Gentoo packages using mold, but I don't do that for
every commit because it takes ~2 days.