Commit Graph

227 Commits

Author SHA1 Message Date
Rich Felker c7557051a5 integrate cowpatch for preservation of original source trees
this makes it far easier to iterate testing of patches, and sets the
stage for enforcing re-patching with makefile-level dependencies.

the pristine sources are kept in directories suffixed with ".orig",
and the unsuffixed directory now contains the result of running
cowpatch -- that is, a mix of symlinks to the original files, and
modified copies of the files/directories affected by patches.
2020-01-21 02:49:07 -05:00
Rich Felker 431a47af9e add gcc patch fixing libstdc++ futex use for time64 compatibility
this is not the cleanest fix but should at least make it non-broken.
2020-01-21 00:07:40 -05:00
Travis Cross 33fb24c113 Add license file and copyright notes
After discussion with Rich Felker and other contributors, it's clear
that we want to license this project under the MIT/Expat license.
However, we need to be clear that we're not claiming to license the
binary artifacts, as those retain the licenses of the upstream
projects.  Similarly, the patches, to the extent that there is any
copyright interest in them at all, retain the licenses from the
upstream projects.

We've added language in the README and in a new `COPYRIGHT` file to
make all of this clear.

Ref: #25 #30 #80
2020-01-19 17:09:33 -05:00
Rich Felker c9d96aeae7 work around gcc libstdc++ time64 incompatibility
with the default --enable-libstdcxx-time, libstdc++'s configure probes
for the existence of a clock_gettime syscall and sets up the time API
implementation to make direct syscalls, presumably as a workaround for
old glibc tucking away the clock_gettime function in librt, which in
turn depends on libpthread. this breaks since struct timespec does not
match the syscall's interface on 32-bit archs.

passing --enable-libstdcxx-time=rt forces different configure paths
that correctly use the public clock_gettime function and librt if
needed.

this issue should be patched in gcc rather than worked around via
configure options, but I'd rather wait to patch until I understand how
to fix it correctly and produce a patch that's acceptable to upstream
and distros.
2020-01-19 12:40:04 -05:00
Rich Felker 38e52db835 switch linux kernel headers to 4.19.88 by default
using slim headers-only version. this change is needed to support all
future versions of musl on 32-bit archs, since prior to 4.16 the
kernel headers had incompatibility with userspace time_t not matching
the kernel's old (32-bit) time_t. support for older headers will be
dropped entirely soon.
2019-12-18 14:29:07 -05:00
Rich Felker 5c7b663936 add support for linux 4.19 kernel headers
both 4.19.90 from official kernel tarball and 4.19.88 from the
sabotage-linux headers-only package are added. the latter should be
preferred unless you have a reason not to, as it's much smaller and
has some patches that improve interaction with musl.

support for all earlier kernel header versions will be dropped soon,
since everything prior to 4.16 has incompatibilities with 32-bit archs
moving to time64.
2019-12-18 14:23:28 -05:00
Rich Felker a6d3e6188d mention riscv64 target support in README.md 2019-11-19 13:31:33 -05:00
Rich Felker 52527c462f add patch fixing copy relocs issue on riscv
this is binutils issue 23825, but it's caused by gcc using local-exec
model rather than initial-exec model with the intent of making
binutils generate copy relocations. this is harmful, unnecessary, and
not presently supported by musl (and probably should never be). patch
taken from https://github.com/riscv/riscv-gcc/pull/118.
2019-11-19 08:50:58 -05:00
Andrew Chambers a9a3b3aee2 Remove absolute references to pwd in linux headers.
Some distributions don't have pwd at this path.
2019-11-10 20:26:27 -05:00
Rich Felker 90ecfe079b renumber latest gcc 8.3.0 patch so as not to duplicate numbering 2019-11-10 20:19:00 -05:00
Rich Felker 9e06392a64 add gcc 9.2.0 hash and patches
patches from Szabolcs Nagy's patchset, carried forward from 8.x with
minimal changes, with #0014 added from recent additions not reflected.
2019-11-10 20:13:42 -05:00
Rich Felker 6725d1e7e5 update default musl version to 1.1.24 2019-11-10 12:34:26 -05:00
Rich Felker cd7430c2ec add support for musl 1.1.23 and 1.1.24
omission at the time of releases was purely an oversight.
2019-11-10 12:33:53 -05:00
Rich Felker 02be46d639 add patches fixing ld bug linking arm tlsdesc relocs on 64-bit host
this is binutils issue #25062. without it, cross-ld crashes linking
arm programs using tlsdesc if the host is 64-bit.
2019-10-06 23:36:25 -04:00
Rich Felker 684cb17061 update arm static pie TLS relocs patch to upstream version, backport
commit c9ac08753a omitted a few changes,
resulting in spurious NONE-type relocs and possibly other problems.
update patches to match upstream fix.
2019-10-06 20:47:22 -04:00
Rich Felker c9ac08753a add binutils patch to fix broken arm LD/GD TLS relocs in static PIE
this is the same issue fixed for mips in 0004-mips-pie-tls.diff for
2.27, upstream in 2.32.
2019-10-02 10:44:20 -04:00
Rich Felker 5fd2126e13 add patches fixing broken libgcc multi-thread detection via weak refs
tested to apply successfully to all supported gcc versions except
possibly 4.2.1, for which it is not added yet.
2019-09-24 19:19:23 -04:00
rofl0r bda7102680 add support for sabotage-linux' kernel-headers tarballs
as maintained in https://github.com/sabotage-linux/kernel-headers .

downloading (and extracting) a 100+ MB kernel source tarball just for
the headers is extremely inefficient.
sabotage linux' kernel-headers tarball provides the same (including
musl compatibility fixes) in ~800 KB.

in order to use it, specify

LINUX_VER = headers-4.4.2-4

in your config.mak.

if LINUX_VER lacks the "headers-" prefix, the official source tarball
will be downloaded as usual.
2019-08-18 23:19:25 -04:00
Rich Felker d969dea983 make --disable-separate-code the default for binutils
the default is ordered such that user-provided config variables in
config.mak or on the make command line can still override it.

this is a dubious anti-ROP feature with high cost (file size, load
time, VMA count consumed per library), and historically was broken in
some binutils versions. the ones we use don't seem to be affected, but
it's better to have it off anyway.
2019-07-16 15:18:14 -04:00
Rich Felker b4a38f8ebe update default versions of gcc-dependency math libraries 2019-07-16 13:41:33 -04:00
Kevin Mark 708132a371 Support MPC 1.1.0 2019-07-16 13:37:50 -04:00
Kevin Mark 5c552fe594 Support MPFR 4.0.2 2019-07-16 13:35:57 -04:00
Kevin Mark fc0c061cf6 Support ISL 0.21 2019-07-16 13:35:53 -04:00
Kevin Mark 0d2b46b621 Support GMP 6.1.2 2019-07-16 13:35:48 -04:00
Kevin Mark 38f8d54c3f Add ISL and build directories to .gitignore 2019-07-16 13:32:11 -04:00
Rich Felker b5b4d47c48 update defaults to gcc 8.3.0, binutils 2.32 2019-05-26 19:25:39 -04:00
Rich Felker 629189831f add binutils 2.32 hash and patches 2019-05-26 15:23:16 -04:00
Rich Felker 1878d65cbe add gcc 8.3.0 hash and patches 2019-05-26 15:22:55 -04:00
rofl0r fa132e0104 binutils 2.27: add patch so reproducible builds work even on mips 2019-04-11 18:57:51 -04:00
Rich Felker f37089a2b8 add musl 1.1.22, make default version 2019-04-09 21:11:10 -04:00
rofl0r 7ea487218f add support for GCC 6.5.0
new patch: 0017-c++-abi-break.diff fixes a C++ ABI break regression.
0010-static-pie-support.diff was removed as it doesn't apply anymore,
and forward-porting it requires arcane knowledge of GCC details.

the patches 0018 and 0019 have been copied from GCC 7.3.0. the static
pie patch from GCC 6.4.0, renumbered 0020, depends on the reversions
they make.
2019-02-12 19:40:33 -05:00
Michael Forney a14e91fef8 litecross: Pass --enable-deterministic-archives to binutils, not gcc
When the gcc and binutils build trees were separated in defdbb4505,
--enable-deterministic-archives was accidentally left in FULL_GCC_CONFIG.
This had the effect of reverting commit e83fe4b8ce, breaking
reproducible builds (unless it was specified explicitly in config.mak).
2019-02-11 18:30:46 -05:00
Rich Felker 96bd58ce57 update default musl version to 1.1.21 2019-01-21 13:20:24 -05:00
Rich Felker 9b8fcbc4ca add hash for support of musl 1.1.21 2019-01-21 13:19:50 -05:00
midipix 040804dfa6 remove explicit target definitions for gmp, mpfr, and mpc.
Originally added in commit 40d6414f28,
the purpose of the above target definitions was to allow using the
static-only symlink variant of slibtool (i.e. slibtool-static) in
those build steps which required it. Given slibtool's newly added
ability to auto-detect its desired operation mode (shared-only,
static-only, or both), as well as the integration of rlibtool
support in mcm, the aforementioned explicit target definitions
are no longer needed.
2018-11-04 10:30:17 -05:00
midipix 0b2487ef91 slibtool support: remove the LIBTOOL_STATIC_ARG var (no longer needed).
Beginning with slibtool version 0.5.26 and the introduction of the
rlibtool symlink (the equivalent of slibtool --heuristics), slibtool
may now be told to automatically detect its desired operation mode
(share-only, static-only, or both) by way of parsing the generated
libtool script which it replaces.
2018-11-04 10:30:17 -05:00
rofl0r edc9d8e2f0 fix file extension of 2 patches
closes #54
2018-11-02 23:34:29 -04:00
rofl0r 474a7e06c0 GCC 5.3.0: fix filenames in 0008-shsibcall.diff
as reported in #15, some patch programs choke on the comments after
the filename...
2018-10-31 19:11:37 +00:00
Rich Felker e3e354f63a add patches to fix invalid tls-model usage in gcc target libs
the initial-exec tls model is not valid in any code that might be
dynamically loaded. it usually happens to work on glibc because glibc
reserves some static tls space for late-loaded libraries that need it,
but if it's already been exhausted that will fail. musl does not
support this hack at all, and it's not valid for gcc target libs to be
doing it anywhere, so patch it out entirely rather than just for musl.
2018-09-25 13:52:59 -04:00
Rich Felker b0d7c70efe move support for non-latest versions in gcc 5 and 6 series
this is to prevent unbounded growth of patch sets to be maintained
and backported to.
2018-09-25 13:50:37 -04:00
luca 9f502174c2 add sha1 for musl 1.1.20 2018-09-05 00:16:27 -07:00
Rich Felker fdf772bfe5 update musl version to 1.1.20 2018-09-04 15:13:33 -04:00
Rich Felker 5dd1a49567 fix regression supporting HOST, NATIVE vars set from config.mak
the logic for processing the NATIVE var (shortcut for HOST=$(TARGET))
and HOST var took place before inclusion of config.mak, causing NATIVE
not to be honored and wrong BUILD_DIR and OUTPUT defaults to be used
if either was set from config.mak rather than on the make command
line. the current preferred interface is the command line, but the
regression was unintentional.

to fix it, replace the conditional blocks of the makefile with
conditional functions in recursively-expanded variables HOST,
BUILD_DIR, and OUTPUT. this way, assignments to NATIVE or HOST that
take place later in config.mak will affect the resulting values, as
intended.
2018-08-05 21:36:14 -04:00
Szabolcs Nagy 1e04a0d998 add gcc-7.3.0 hash 2018-07-11 16:13:49 -04:00
Szabolcs Nagy c8a05936f0 add gcc-7.3.0 patches 2018-07-11 16:12:22 -04:00
midipix 40d6414f28 add distinct build target definitions for gmp, mpfr, and mpc.
Generated from within gcc, the above dependency libraries are built with the
--disable-shared libtool option. As with binutils, distinct build steps for
each of the above in litecross/Makefile allow for their correct (static only)
generation by an alternate libtool utility, such as slibtool.
2018-06-21 15:35:01 -04:00
Rich Felker 58da30d441 add m68k support patches for all currently supported gcc versions
these are not complete/correct in that they do not account for ABI
variants (softfloat and coldfire fpu) in the dynamic linker name, but
I was unable to get gcc's configure to accept --with-float=soft on
m68k to test softfloat and begin figuring out how to do the spec
logic. at some point this needs to be figured out and completed, but
at least the default ABI is available in mcm now.
2018-06-21 15:30:04 -04:00
Rich Felker 2fef342276 update gcc version default to 6.4.0
at some point the default should be moved to 7.x or later, but I have
not sufficiently tested it yet.
2018-05-08 20:50:23 -04:00
rofl0r ab0c081d13 add support for GCC 6.4.0
GCC 6.4.0 has one big advantage over 6.3.0: it is shipped as .tar.xz,
shaving 30 MB from its download size, and also considerably speeding
up the extraction process.

All patches are copies of the GCC 6.3.0 ones, except
0004-posix_memalign.diff which was rebased to apply cleanly.
0014-ubsan-empty-string-fix.diff was removed, since it was upstreamed.
2018-05-07 22:21:02 -04:00
midipix 5a84fa2cbb support using an alternate libtool utility, such as slibtool. 2018-02-28 14:18:08 -05:00