Commit Graph

227 Commits

Author SHA1 Message Date
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
Rich Felker 005f8e4a3f add binutils 2.27 patch fixing pr17739 on sh
upstream fix was slightly too late to make it into the release. patch
was not included in mcm for previous binutils versions because it
depends on new upstream infrastructure. now gc-sections should be safe
to use on sh.
2016-11-07 16:17:35 -05:00
Szabolcs Nagy d08c2e8e02 fix gcc-5.* build with a recent gcc
https://gcc.gnu.org/ml/gcc-patches/2016-01/msg00044.html
2016-11-07 12:50:37 -05:00
Szabolcs Nagy 21d4b46b6d add gcc-6.2.0 hash 2016-11-06 22:35:17 -05:00
Szabolcs Nagy c54b2f283d add gcc-6.2.0 patches 2016-11-06 22:34:44 -05:00
Szabolcs Nagy ea93e4b169 add binutils-2.27 hash 2016-11-06 22:34:19 -05:00
Rich Felker ceb91e7d4e add binutils-2.27 patches
only trivial updates needed to the J2 patch; others were merged
upstream already.
2016-11-06 22:34:19 -05:00
Szabolcs Nagy 829d4e32fe remove the LC_ROOT hack from build sysroot
LC_ROOT does not seem to have any useful effect, but the
build sysroot is passed to shell scripts without expanding
the LC_ROOT make variable which breaks tests.
2016-11-06 11:38:50 -05:00
Rich Felker 99ee12d604 litecross: eliminate obstacles to toolchain config from make command line
the += approach which worked in config.mak does not work well if the
user wants to pass in configure options from the command line.
restructure configure command line construction such that setting
COMMON_CONFIG, GCC_CONFIG, or TOOLCHAIN_CONFIG from the command line
does not suppress necessary defaults.
2016-07-08 03:53:19 +00:00
Rich Felker b537e759ef add extract_all rule to top-level makefile
this is useful for preparing to automate multiple builds using shared
source trees. otherwise concurrent builds could clash attempting to
extract the same source trees.
2016-07-07 23:58:01 +00:00
Rich Felker f959bd47cd add support for gmp 6.1.1 and upgrade default version
this fixes build failures for native compiler on some targets where
linking gmp fails with undefined references to __gmpn_invert_limb.
2016-07-07 17:07:24 +00:00
Rich Felker 43519b575c fix regression that introduced race condition build failures for gcc
commit 20ce424e65 introduced a situation
where two instances of gcc's build process could be invoked
concurrently in the process of fixing the same issue for musl. only
the production of native compilers seems to have been affected. add a
direct dependency edge rather than relying on the indirect dependency,
which was only present in non-native mode.
2016-07-07 16:56:18 +00:00
Rich Felker 20ce424e65 disable build/install of temp sysroot headers for native compilers
these are not needed since the cross toolchain being used to build the
native compiler already has its own libc and headers.

but more importantly, due to lack of certain dependency chains that
would be present for a cross compiler build, it was possible for two
invocations of musl's make process to occur in parallel (one for temp
sysroot headers, one for actual libc build). this could (and was
observed to) lead to a race condition where alltypes.h was momentarily
truncated in the middle of the libc build.
2016-07-07 00:41:13 +00:00
Rich Felker 8eeb57f5a5 add support for musl 1.1.15 and make it the default 2016-07-06 03:49:32 +00:00