this feature is still experimental and requires manually setting a
LINUX_ARCH make variable matching the target. automatic mapping will
be added later. if LINUX_ARCH is not set, header installation is
skipped.
libmpx is broken in all gcc versions that have it (not supported yet
by mcm/litecross, but will be).
ifunc is not supported by musl and won't be unless/until the contract
for resolvers can be specified clearly in a way that real-world usage
is safe and does not require lazy binding; having it enabled at gcc
level reportedly produces a broken libatomic.
explicitly enabling libstdcxx-time is needed to get libc clock_gettime
(with vdso support) to be used in libstdc++; it's disabled by default
because of glibc legacy practice of having clock_gettime in librt,
which depends on glibc's libpthread and undermines libstdc++'s
(invalid use of) weak references to pthread symbols.
others are untested and some are likely broken. add this config option
before including config.mak rather than after so that the user can
override it in config.mak if desired.
multilib would not be usable without building multiple versions of
musl anyway, which we don't yet support, so enabling it does not make
sense. due to bugs in gcc's build system, even with multilib disabled,
multilib dir structures get used on 64-bit archs leading to target
libs being installed in /lib64 (or /libx32, etc.) under the sysroot,
rather than /lib. fix this by suppressing the variable that controls
it.
blanking INFO_DEPS suffices to prevent attempts to rebuild the docs,
but does not reliably suppress their installation. blanking infodir
does the latter. there are other methods that work too but this seems
to be the simplest.
nothing in a normal gcc/binutils actually uses flex and bison, but
this useless test for the output filename lex produces breaks the
build unless [f]lex is installed. the result of this check is
specified by posix anyway, so hard-code the specified result.
commit 23d6f66966 introduced this
regression as a failure to backport part of the gas testsuite diff
from binutils master to 2.25.1 where the file being patched had a
trivial difference. I'm not sure how this went unnoticed at the time
it was committed.
this allows sharing a sources directory between multiple checkouts or
independent toolchain-using projects.
also, during distclean, only remove the in-tree sources directory, not
a custom/external one. this is a safety measure in case the SOURCES
variable is set to something stupid like blank, root directory, or
some large shared directory.
this makes it easy to rebuild components simply by removing the source
or build directory with rm -rf; no separate action on the steps files
is needed.
some dependencies are also changed to order-only so that
update/rebuild of one component does not force unnecessary rebuild of
another.
new convenience pseudo-targets are also added.
patch set consists of:
0001 static pie support (--no-dynamic-linker)
0006 avoid erroring out the build when docs can't be built
0007 add sh symbol@PCREL support to gas
example configuration is added to config.mak.dist too.
patch set consists of:
0001 full musl libc target support
0002 fixes for wrong optimizations of weak defs/aliases
0003 various sh breakage in configure scripts
0005 static pie support
0006 --enable-default-pie support
0008 fix for cross compiling bug in build system
0009 fix for wrong default div strategy for sh2 (missing libgcc code)
0010 fix failure to build on modern host gcc due to gnu-inline
0011 fix sh & alpha bootstrap failures before libc is built
0012 fix broken local-exec TLS with -fPIE on sh
old versions of gcc, such as 4.2.1 which I'm in the process of adding
support for, have broken configure scripts that do not accept
variables on the command line and instead interpret them as the target
name. the easiest solution is just passing these in the environment.
the new patch is identical to the one committed upstream, except that
the binutils 2.25.1 used info->executable instead of
bfd_link_executable(info), and support for nds32 and score targets is
removed since 2.25.1 did not have the relevant code for them.
the following issues are fixed:
- ICE generating the new libgcc __ashlsi3_r0 and __lshrsi3_r0 shift
operations for non-J2 SH2.
- new sh_legitimate_constant_p function was unused because there was
an existing version with different signature which C++ allowed to be
overloaded rather than reporting the error.
- reversed asm spec conditional for fdpic broke non-fdpic builds.
this commit rebases the patch against gcc trunk and backports the
result. file order has been tweaked by hand so that the diff is
friendly to manual inspection.
since -E is no longer passed to the linker, musl commit
6fc30c2493fcfedec89e45088bea87766a1e3286 is now necessary to get a
version of rcrt1.o that works with the new static PIE support, or
-Wl,-E can be passed manually to work with old rcrt1.o.
I originally missed the udiv_qrnnd part of the fdpic patch when
forward-porting it because longlong.h moved to a non-obvious location.
however, the original patch was broken anyway; it misordered
instructions at branch delay slots and clobbered in-use registers.
my version of the code is more efficient because it uses knowledge
that __udiv_qrnnd_16 is a pure-PIC function that makes no calls, uses
no static data, and does not clobber r12. this means we only need to
load the instruction address, not the got address, from the function
descriptor to make the call.
the same can be achieved even more efficiently by declaring
__udiv_qrnnd_16 with object type instead of function type and using
the existing non-fdpic asm unmodified. I did not do this because I was
afraid it would be considered a hack unacceptable for upstream.
some of the forward-ported fdpic patch code contained duplicates of
code that was changed in the fix for pr66609. failure to notice this
before allowed the bug to re-emerge and broke musl's use of
overridable weak aliases.