Commit Graph

169 Commits

Author SHA1 Message Date
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
Rich Felker e2f13c3960 allow override of download sites via config.mak variables 2015-11-06 06:35:17 +00:00
Rich Felker 06a1f34243 add support for gcc 4.2.1 (last gplv2 version)
patch set consists of:

0001 full musl libc target support
0002 fixes for wrong optimizations of weak defs/aliases
0003 various sh breakage in configure scripts
0005 static pie support
0006 --enable-default-pie support
0008 fix for cross compiling bug in build system
0009 fix for wrong default div strategy for sh2 (missing libgcc code)
0010 fix failure to build on modern host gcc due to gnu-inline
0011 fix sh & alpha bootstrap failures before libc is built
0012 fix broken local-exec TLS with -fPIE on sh
2015-11-06 06:23:54 +00:00
Rich Felker 35cdd4619f pass CFLAGS to gcc configure as env vars, not on command line
old versions of gcc, such as 4.2.1 which I'm in the process of adding
support for, have broken configure scripts that do not accept
variables on the command line and instead interpret them as the target
name. the easiest solution is just passing these in the environment.
2015-11-06 00:46:00 +00:00
Rich Felker d48d611f99 fix docs error introduced in binutils static pie patch
this broke the build. apparently the original patch I sent upstream
had this error and it was fixed when committing without me noticing.
2015-11-06 00:40:50 +00:00
Rich Felker eeaae9e133 update gcc defaultpie patch to be switchable at configure time
the sample config.mak.dist is also updated to show usage.
2015-11-05 23:37:39 +00:00
Rich Felker 527fca9755 update binutils static pie patch to support all targets
the new patch is identical to the one committed upstream, except that
the binutils 2.25.1 used info->executable instead of
bfd_link_executable(info), and support for nds32 and score targets is
removed since 2.25.1 did not have the relevant code for them.
2015-11-05 23:33:19 +00:00
Rich Felker 8137f50ef9 add patch to fix binutils pr 19091 affecting sh/fdpic shared libs
this may not be the correct fix but works for now. patch will be
updated as needed. for details see:

https://sourceware.org/bugzilla/show_bug.cgi?id=19091
2015-10-08 16:34:45 +00:00