Commit Graph

140 Commits

Author SHA1 Message Date
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
Rich Felker ddc9f102de fix build for s390x due to wrong long double ABI default
musl uses IEEE quad for long double on s390x. current versions check
for mismatch and hard fail at configure time if the compiler is wrong.
with older versions, mcm silently produced a broken toolchain/libc.
2018-02-28 10:36:47 -05:00
Rich Felker defdbb4505 litecross: separate binutils and gcc build trees
putting them together in one tree only works if they're "sufficiently
close" in version, due to each needing (approximately) its own version
of libiberty and possibly the top-level configure infrastructure.

eventually, I want to stage the installs of binutils and gcc under the
build directory, so that the new binutils can be used from their
staged install paths. leave that refactorization for later; for now,
give gcc the binutils it needs directly out of the binutils build
directories.
2018-02-26 21:05:40 +00:00
Rich Felker 62b220c36f update to musl 1.1.19 and make it the default 2018-02-22 16:35:34 -05:00
Rich Felker 030b83f3a8 add binutils patches fixing mips tls reloc output when linking pie
the linker was wrongly leaving dynamic relocations for GD-model TLS
defined in the main program when linking the main program as PIE. this
was only suboptimal for dynamic pie, but for static pie it resulted in
runtime failure since there is no dynamic linker to resolve the DTPMOD
reference.

this has been reported as binutils bug #22570.
2018-01-31 12:26:40 -05:00
Rich Felker b85e29c00d update to musl 1.1.18 and make it the default 2017-10-31 15:36:12 -04:00
Michael Forney 0867cdf300 Fix LINUX_ARCH for aarch64-* TARGET
'aarch64' is converted to 'arm64' in the TARGET_ARCH_MANGLED assignment,
but then LINUX_ARCH is set the first to the first linux arch which
appears in TARGET_ARCH_MANGLED. Since 'arm' is a substring of 'arm64'
and appears ahead of 'arm64' in sorted order, it gets chosen
incorrectly.

To fix this, use 'lastword' instead of 'firstword'. This should work for
all current linux architectures, but is still not perfect in the
theoretical case where the substring match is not rooted at the
beginning of TARGET_ARCH_MANGLED. So, also replace 'findstring' with an
'if' and 'filter'.
2017-10-25 16:05:06 -04:00
Patrick Oppenlander 9c4ba81399 add support for gcc 7.2.0 2017-10-19 19:48:01 -04:00
Patrick Oppenlander 6a21939e2b remove spurious hash marks from documentation 2017-10-19 19:42:21 -04:00
Rich Felker 13726f8fc7 update to musl 1.1.17 and make it the default 2017-10-19 19:41:11 -04:00
Rich Felker 48d9c59d22 fix compiling gcc 6.3.0 with strict c++ compilers
this patch is a backport of gcc revision 239971 to gcc 6.3.0.

submitted by osvein as PR#35.
2017-10-19 19:30:05 -04:00
Dhiru Kholia d7381f4a55 Fix two typos in README.md file 2017-10-19 19:11:41 -04:00
Rich Felker 62cd8d5f25 fix regression in make clean
commit 40005d3ff6 renamed the build
directories from build-* to build/*. update make clean to remove the
new build tree.
2017-06-22 23:06:38 -04:00
Rich Felker 100d309000 litecross: add dummy lib32 symlink to lib in build sysroot
at least mips n32 target seems to be breaking due to an expectation of
finding crti.o/crtn.o there during building of target libs.
2017-06-10 21:24:12 -04:00
Rich Felker 40005d3ff6 add support for canadian-cross builds, reorganize dirs to avoid clashes
cross (or native) compilers meant to be run on a host different from
the build environment can now be built by setting the HOST make
variable on the command line or in config.mak. this requires (for
building the target libraries) a cross toolchain for the same TARGET,
but that can run on the build system, to be present already in the
PATH. future enhancements may make it possible to automatically build
and use the needed toolchain.

leaving HOST blank produces a toolchain that runs on the build system
(host==build in gcc jargon), the same as before with NATIVE unset.

the NATIVE make variable is now obsolete but still supported; it
simply causes HOST to be set equal to TARGET (thus producing a native
toolchain for the target).

builds are now placed in build/$(HOST)/$(TARGET) when HOST is set, and
build/local/$(TARGET) when it's not, so that builds for the same
target but different host do not clobber each other.

default OUTPUT directory when HOST is set is now output-$(HOST). as
usual, multiple targets can safely go in the same output directory,
but toolchains for different hosts should not.
2017-06-10 19:47:23 -04:00
rofl0r e83fe4b8ce litecross: build binutils with --enable-deterministic-archives
binutils' ar program defaults to creating timestamp in archives, which
breaks reproducible builds.

this misfeature can be explicitly turned off on every usage (-D), or be
disabled completely at build time using the --enable-deterministic-archives
option.

since the former requires patches for every package, having the toolchain
doing the right thing by default seems to be the much better choice.

the configure option is available since binutils 2.20, so it should be
safe to use by now.
2017-03-06 02:59:47 +00:00
Rich Felker b854a42fc1 update gcc version default to 6.3.0 2017-01-02 20:46:03 -05:00
Rich Felker b064daac18 add microblaze to list of believed-working targets 2017-01-02 17:12:41 -05:00
Rich Felker 458feff9b0 add patch fixing static linking bug with gotoff relocs on microblaze 2017-01-02 15:52:21 -05:00
Rich Felker 7db01153a2 add patch fixing broken microblaze gcc on 32-bit hosts
bogus use PRIx64 with unsigned long (assumption of 64-bit host) in
gcc. older gcc versions are also affected, I think, but not yet fixed.
2017-01-02 15:15:42 -05:00
rofl0r 3c08cb274c add gcc-6.3.0 hash 2017-01-02 13:16:04 +00:00
Szabolcs Nagy f8b26b0ae8 add gcc-6.3.0 patches 2017-01-02 13:16:04 +00:00
Rich Felker 67edcf134d update musl version to 1.1.16 2016-12-31 22:49:31 -05:00
Rich Felker f5227e9d8a simplify target libgcc build step to be less of a hack 2016-12-31 13:27:39 -05:00
Rich Felker db7aa64d08 improve markdown formatting in readme 2016-12-30 23:49:51 -05:00
Rich Felker 8191d3ff65 document supported TARGET tuples 2016-12-30 23:46:54 -05:00
Rich Felker a327b7fb87 add necessary gcc abi config for powerpc64 targets 2016-12-29 14:40:40 -05:00
Michael Forney 00d4fb72be Move sysroot-specific dependencies to !NATIVE section 2016-12-20 02:00:26 -08:00
Michael Forney 97173cd74f Don't pass --with-build-sysroot with NATIVE build
This is not needed since we already have a native musl toolchain at our
disposal. Previously, since this flag was passed for NATIVE=1, the build would
fail because the build sysroot is only built for cross toolchains.
2016-12-20 02:00:26 -08:00
Rich Felker c3da5effaa update default versions to gcc 6.2 and binutils 2.27 2016-12-14 23:48:51 -05:00
Rich Felker 52172b8706 minor documentation update to reflect new versions 2016-12-14 23:47:44 -05:00
Rich Felker 5c37199dd3 allow using programs over than wget to download sources
based on patch by Michael Forney, but using a plain variable without
without the need for $(call ...). I used a different name for the
variable so that it won't break if anyone has an HTTP_GET variable for
use with the original patch in their config.mak.
2016-12-14 23:42:27 -05:00
Michael Forney 53dd1fbd2c Use $(CURDIR) instead of $(PWD) in Makefile
Some shells (in particular ksh) don't export PWD by default, so it
doesn't end up as a make variable.
2016-12-14 23:32:32 -05:00
Michael Forney 3ac08b98c1 Don't pass -- to printf
POSIX says that printf has no options and doesn't have to conform to the
utility syntax guidelines (which include -- handling).
2016-12-14 23:30:01 -05:00
Rich Felker c01dea5066 further suppress generation of info docs
with latest gcc, info files were appearing in the top-level install
directory. this seems to make them go away again.
2016-12-14 12:42:16 -05:00
Michael Forney c6ac0f2592 Prune .install and ..install.cmd files from kernel headers
These files aren't useful, especially for a toolchain meant to be
relocated, because they contain references to the staging directory
and source paths.
2016-12-14 12:39:08 -05:00
Rich Felker f00b09f654 add patch for s390x musl ldso name to gcc 6.2.0 patchset 2016-11-11 23:42:54 -05:00
Rich Felker a4c1265daa remove broken gcc 6.2.0 powerpc patch
this patch breaks powerpc64 builds and is not necessary to produce a
working 32-bit powerpc toolchain. it seems like it may be useful for
reducing libgcc-internal bloat, but it can be reintroduced later after
it's fixed, if desired.
2016-11-08 17:50:40 -05:00