Commit Graph

61 Commits

Author SHA1 Message Date
Rich Felker 5171ee8724 update default musl version to 1.2.1 2020-08-04 12:05:32 -04:00
Rich Felker b0820cc501 don't replace config.sub in gmp
gmp has its own wrapper version of this file and calls the real one
configfsf.sub. within the gcc build, replacing the wrong one is
harmless, but it breaks independent use of the patched gmp tree and
it's logically wrong.

patch by Laurent Bercot.
2020-06-27 01:35:13 -04:00
Peter Jin 5086175f29 allow sha1 hash checking command to be configured 2020-03-07 20:55:08 -05:00
Filippo Valsorda a54eb56f33 Use CURDIR instead of PWD
PWD is set by the shell, not make, and might not match.

For example, this broke the build through Homebrew, because
PWD stays at the directory where brew is ran.
2020-03-07 20:53:13 -05:00
Rich Felker 75e6c618ad add musl 1.2.0 and make it default 2020-02-21 23:52:34 -05:00
Rich Felker a69bac0464 use new cowpatch -I command rather than open-coding same thing in Makefile 2020-02-17 15:10:44 -05:00
Rich Felker 03b296f811 fix missing exec permissions on replaced config.sub 2020-02-02 23:35:52 -05:00
Rich Felker 59d9dff00c improve patch dependency rules
approach in commit 8a92c5230c only
worked for the "current version" of the packages configured with
GCC_VER, etc. now, all versions have proper dependencies so that it's
possible to test applicability of new patches just by running make
with the directory name.
2020-01-31 16:53:24 -05:00
Rich Felker de5dc219d8 add safety in make rules involving rm -rf
error out if there are any slashes in the name that will later be
passed to rm -rf since these are implicit rules and could
theoretically get instantiated in unintended ways.
2020-01-23 13:22:12 -05:00
Rich Felker eb979cc08b remove old patched source dir before trying to rename new one over it 2020-01-23 13:18:17 -05:00
Rich Felker 1be04b50ec move config.sub dependency to patched source trees instead of orig ones
this was overlooked when cowpatch was introduced.
2020-01-22 17:26:56 -05:00
Rich Felker 8a92c5230c add dependencies on patches for patched/patchable source trees 2020-01-22 17:25:53 -05:00
Travis Cross a226f5f416 Fix initialization of CoW source trees
As part of creating a CoW source tree, we symlink all top-level paths
from the original directory.  In commit ebf93035c, we removed a shell
glob used for this and replaced it with an invocation of `find`.

However, our invocation of `find ... -exec sh -c '... $@ ...' {} \+`
is causing the first path in every directory to be skipped, breaking
the build.  This is because arguments to `sh -c ...` begin with the
zeroth argument, while `$@` only returns the first argument onward.

Let's fix this by providing an explicit zeroth argument to `sh -c`.
2020-01-22 15:49:28 -05:00
Rich Felker 1e4e952ed2 bump default gcc version to 9.2.0 2020-01-22 01:13:14 -05:00
Rich Felker 8adcc4bec7 bump default binutils version to 2.33.1 2020-01-22 00:03:07 -05:00
Rich Felker ebf93035c6 make initialization of cow source trees robust
shell glob of ../$</* fails to catch filenames beginning with dot, and
the easy mitigations for that all produce bad results on non-match.
use find to do it robustly.
2020-01-21 23:49:56 -05:00
Rich Felker c7557051a5 integrate cowpatch for preservation of original source trees
this makes it far easier to iterate testing of patches, and sets the
stage for enforcing re-patching with makefile-level dependencies.

the pristine sources are kept in directories suffixed with ".orig",
and the unsuffixed directory now contains the result of running
cowpatch -- that is, a mix of symlinks to the original files, and
modified copies of the files/directories affected by patches.
2020-01-21 02:49:07 -05:00
Rich Felker 38e52db835 switch linux kernel headers to 4.19.88 by default
using slim headers-only version. this change is needed to support all
future versions of musl on 32-bit archs, since prior to 4.16 the
kernel headers had incompatibility with userspace time_t not matching
the kernel's old (32-bit) time_t. support for older headers will be
dropped entirely soon.
2019-12-18 14:29:07 -05:00
Rich Felker 6725d1e7e5 update default musl version to 1.1.24 2019-11-10 12:34:26 -05:00
rofl0r bda7102680 add support for sabotage-linux' kernel-headers tarballs
as maintained in https://github.com/sabotage-linux/kernel-headers .

downloading (and extracting) a 100+ MB kernel source tarball just for
the headers is extremely inefficient.
sabotage linux' kernel-headers tarball provides the same (including
musl compatibility fixes) in ~800 KB.

in order to use it, specify

LINUX_VER = headers-4.4.2-4

in your config.mak.

if LINUX_VER lacks the "headers-" prefix, the official source tarball
will be downloaded as usual.
2019-08-18 23:19:25 -04:00
Rich Felker b4a38f8ebe update default versions of gcc-dependency math libraries 2019-07-16 13:41:33 -04:00
Rich Felker b5b4d47c48 update defaults to gcc 8.3.0, binutils 2.32 2019-05-26 19:25:39 -04:00
Rich Felker f37089a2b8 add musl 1.1.22, make default version 2019-04-09 21:11:10 -04:00
Rich Felker 96bd58ce57 update default musl version to 1.1.21 2019-01-21 13:20:24 -05: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
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
Rich Felker 62b220c36f update to musl 1.1.19 and make it the default 2018-02-22 16:35:34 -05:00
Rich Felker b85e29c00d update to musl 1.1.18 and make it the default 2017-10-31 15:36:12 -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 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 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
Rich Felker b854a42fc1 update gcc version default to 6.3.0 2017-01-02 20:46:03 -05:00
Rich Felker 67edcf134d update musl version to 1.1.16 2016-12-31 22:49:31 -05: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 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 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 8eeb57f5a5 add support for musl 1.1.15 and make it the default 2016-07-06 03:49:32 +00: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
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 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 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 69cadffdec add patch fixing sh sibcall bug that affected musl, remove workaround 2016-02-12 05:35:23 +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