Commit Graph

204 Commits

Author SHA1 Message Date
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
Rich Felker 7a0997d196 litecross: fix $(TARGET)-based config when value comes from config.mak
commit 03bd65562a wrongly placed the
logic conditional on $(TARGET) before inclusion of config.mak, so that
it only worked when TARGET was set from the make command line or
environment. reorder to fix.
2016-06-22 18:32:56 +00:00
Rich Felker 347bfc9f61 update config.mak presets to sync with modern expectations
config.mak no longer needs to do so much explicitly; the mandatory
options for the target or for musl are auto-selected by the makefile.
2016-06-20 23:26:56 +00:00
Filippo Valsorda 8467bf3a6f Patch elf.h circular dependency out of linux-4.4.10
This enables building on platforms without a native elf.h, like OS X

Fixes #8
2016-05-30 04:44:24 +02:00
Filippo Valsorda d6fe0339ee Fix ub in binutils causing failure to build for arm with clang
https://sourceware.org/bugzilla/show_bug.cgi?id=19222

Fixed by applying binutils@d840c08.
2016-05-30 04:44:24 +02:00
Szabolcs Nagy 59de5df535 add optional isl support for advanced loop optimizations
isl-0.15 does not work before gcc-5.3.0, for older gcc try isl-0.14.1
2016-05-22 23:54:39 +00:00
Rich Felker 03bd65562a litecross: build target config logic into the makefile
leaving necessary configuration options for certain targets to the
user is error-prone and inconvenient. instead of configuration for
exact target string matchs in the sample config.mak, provide general
logic in the makefile itself which should cover all variants as well.
2016-05-19 03:15:32 +00:00
Patrick Oppenlander ab95e8efdc clean: remove linux-* 2016-05-17 02:16:02 +00:00
Patrick Oppenlander ec0f9f1d28 support installing headers for linux 4.x, 3.x and 2.6 kernels 2016-05-17 02:15:51 +00:00
Patrick Oppenlander e84b1bd1fc add support for gcc 5.3.0 and use by default 2016-05-17 02:15:34 +00:00
Rich Felker 0de8362e97 litecross: simplify and fix kernel header installation
I didn't realize before but, using the O make variable, kernel source
can do out-of-tree builds, making it safe to use a symlink rather than
partial copy for the source dir. the partial copy did not work for all
archs; in particular x86 was broken.
2016-05-14 07:37:06 +00:00
Rich Felker 0b3c60ceeb document suppression of kernel headers in sample config.mak 2016-05-14 05:39:05 +00:00
Rich Felker 8b61ebbd9a litecross: rm stale kernel header src/obj dirs before making new ones 2016-05-14 05:25:11 +00:00
Rich Felker 5faef372d4 litecross: automatically determine LINUX_ARCH for kernel headers 2016-05-14 05:23:25 +00:00
Rich Felker 9bd379f80b add support for installation of linux kernel headers
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.
2016-05-14 04:17:47 +00:00
Rich Felker 75b8346bed litecross: create $(TARGET)-cc symlink for installed compiler
in case the user does not want to write the 'g' when invoking 'gcc'.
2016-05-14 03:10:55 +00:00
Rich Felker 0291cc44ee litecross: add some gcc options that should always be used with musl
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.
2016-05-06 18:37:09 +00:00
Rich Felker 4a5931ba67 litecross: only build c,c++ frontends by default
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.
2016-05-06 05:33:19 +00:00
Rich Felker 7a6ed3af0f litecross: always disable multilib, suppress lib64, etc. dir structures
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.
2016-05-06 05:29:07 +00:00
Rich Felker b732495b33 litecross: add support for cross-compiling a native toolchain
experimental feature. activated by setting NATIVE make var.
cross-compiler for the host/target system must already be installed at
a location in PATH.
2016-05-06 03:00:35 +00:00
Rich Felker 4afd97ae89 add config example for keeping build path out of output debug info 2016-05-04 03:37:56 +00:00
Rich Felker 26847b129b fix suppression of info installation
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.
2016-05-03 04:28:26 +00:00
Rich Felker 5df79ffdbf add config.mak.dist example for static-linked cross toolchain 2016-05-02 19:43:47 +00:00
Rich Felker dd00bd7925 add small build (no debug, etc.) example to config.mak.dist 2016-05-02 19:24:49 +00:00