Commit Graph

226 Commits

Author SHA1 Message Date
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
Rich Felker d02af99f00 remove obsolete/broken texinfo suppression example from config.mak.dist 2016-05-02 19:22:36 +00:00
Rich Felker bfde1aeb9b add info about using pre-installed gmp/mpc/mpfr to config.mak.dist 2016-05-02 19:21:46 +00:00
Rich Felker 2d0015f547 remove spurious flex dependency
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.
2016-05-02 18:43:15 +00:00
Rich Felker ab6716ea08 suppress info build and installation, remove texinfo dependency 2016-05-02 18:19:19 +00:00
Rich Felker 7160eb79e4 litecross: pass any updates to the MAKE var into gcc build system
adding them to $(MAKE) is the best way I know to get make variable
overrides into the gcc build system.
2016-05-02 17:58:38 +00:00
Rich Felker 0ab346e85d litecross: accept empty {GMP,MPC,MPFR}_SRCDIR to use pre-installed ones 2016-05-02 17:45:22 +00:00
Rich Felker 7ed2e2c6a0 fix sample config for disabling makeinfo 2016-05-02 05:38:34 +00:00
Rich Felker 82fb13a8ff fix small copy&paste error in litecross makefile dependencies 2016-05-02 05:36:54 +00:00
Rich Felker ee1ebda23e overhaul build process with litecross, next-gen top-level makefile 2016-05-01 05:36:28 +00:00
Rich Felker b453751480 fix build on systems where native ar/ranlib don't work for target
explicitly pass the pathnames to newly-installed binutils versions of
these programs into musl's make.
2016-04-29 22:02:15 +00:00
Rich Felker 2f1e820bed fix failure of mips libgcc_eh patch to apply
commit 0a16a12799 introduced this patch
with missing leading path component.
2016-04-19 01:48:39 +00:00
Rich Felker 0a16a12799 add patch fixing mips libgcc_eh build not to depend on kernel headers 2016-04-11 02:42:07 +00:00
Rich Felker 43bdd7fc19 fix binutils patching regression that stopped the build
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.
2016-03-02 00:47:54 +00:00
Rich Felker 23d6f66966 update j2 support patches to Yoshinori Sato's versions
with some minor fixes. unlike my minimal patches, Sato-san's properly
add the isa level logic to binutils and add cas.l atomic intrinsics to
gcc.
2016-02-12 05:57:31 +00:00
Rich Felker 69cadffdec add patch fixing sh sibcall bug that affected musl, remove workaround 2016-02-12 05:35:23 +00:00
Rich Felker 6385b3240a fix .gitignore to only apply to top-level directory 2016-02-11 23:55:01 +00:00
Rich Felker cf013ce0c0 add patch to fix ld bug breaking musl on microblaze 2016-02-11 23:53:39 +00:00
Rich Felker f592ffb96b fix j2 cas.l instruction encoding in patch 2016-01-15 01:13:15 +00:00
Rich Felker ea4a0ce03b update documentation with better instructions, added presets 2015-11-18 22:50:22 +00:00
Rich Felker 8878510198 fix bad codegen in sh/fdpic when stack protector is enabled 2015-11-16 02:12:46 +00:00
Rich Felker 35bbd0c571 align sh/fdpic patch with what went upstream to gcc 2015-11-16 02:09:36 +00:00
Rich Felker 65dad1f164 add .gitignore file 2015-11-10 01:18:10 +00:00
Rich Felker 7d900812a5 make sources directory customizable and dynamically created
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.
2015-11-10 01:11:56 +00:00
Rich Felker d8d90e3808 remove default sh2eb target and error out if TARGET is not set 2015-11-10 00:18:50 +00:00
Rich Felker d2f59c98d6 remove lto from gcc language list in sample config
afaik explicitly including lto is not necessary, and including it
breaks older gcc versions.
2015-11-10 00:05:12 +00:00
Rich Felker 6c4e6003f9 move some gcc configure options from Makefile to config
there is no reason to hard-code --disable-libquadmath or
--disable-decimal-float; some users may want these features.
2015-11-10 00:02:34 +00:00
Rich Felker 0b1f5d1197 replace steps directory with stamp files in source/build dirs
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.
2015-11-09 23:45:56 +00:00
Rich Felker 3fb6709806 add support for last GPLv2 binutils version (git snapshot)
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.
2015-11-06 06:44:16 +00:00