Commit Graph

1333 Commits

Author SHA1 Message Date
Fabian Freyer
0e339fbbf6 scripts/functions: use ${sed} instead of 'sed'
Helps build on BSD-like systems.

Reported-by: Fabian Freyer <fabian.freyer@physik.tu-berlin.de>
Signed-off-by: "Fabian Freyer" <fabian.freyer@physik.tu-berlin.de>
[yann.morin.1998@free.fr: split the original patch]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Fabian Freyer <fabian.freyer@physik.tu-berlin.de>
2014-08-28 22:31:57 +02:00
Bryan Hundven
52260ccebb libc/musl: add musl-libc support
This patch adds initial support for musl-libc.

Musl-libc versions currently supported:
* 1.0.3 (Stable)
* 1.1.3 (Previous Mainline)
* 1.1.4 (Mainline)

Futher improvements are needed.
* gcc-4.9.x has issues (Might be fixed in musl-1.1.4).
* Multilib support is needed.
* Checks to make sure paths are correct.
* Move to 2-step gcc build. 3-step build is not necessary.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
[yann.morin.1998@free.fr: removed the gcc musl patch, to be added later;
 removed dead code do_get_arch()]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2014-08-08 22:49:37 +02:00
Bryan Hundven
85622fdd49 Add main EXPERIMENTAL_PATCHES setting
This change adds support for experimental patches to be introduced to
crosstool-ng. The patches enabled by this option are to be located here:

    patches/experimental/<package>/<version>/XXXX-NAME.patch

Where, XXXX is the patch number to be applied in order, like:
    0001-some_patch_one.patch
    0002-some_patch_two.patch
    9999-some_patch_to_be_applied_last.patch

In the first patch series, all patches in the EXPERIMENTAL_PATCHES
option will be applied all at once, or none at all.

In a later [RFC] patch, I plan on adding finer tuned patch
enable/disable options based on the name of the patch and where it is
located in the patches/experimental sub-tree. So the name of the patch
should use underscores between words in the patch name.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
[yann.morin.1998@free.fr: slightly reword prompt]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2014-07-28 01:21:51 +02:00
Cody P Schafer
022dc5e094 scripts/addToolVersion: simpily gcc handling and fix for gcc-4.9.X (and later)
Signed-off-by: Cody P Schafer <dev@codyps.com>
2014-07-19 12:23:02 +02:00
Cody P Schafer
6b1a230482 scripts/addToolVersion: fix for gdb versions >= 7.2
Signed-off-by: Cody P Schafer <dev@codyps.com>
2014-07-19 12:22:31 +02:00
Cody P Schafer
975d24cb35 cc/gcc: avoid passing --enable-multilib (take 2)
The previous patch (cset b61a1b1, cc/gcc: avoid passing --enable-multilib)
only fixed the core backend, and missed the final backend.

This patch does the same as b61a1b1, but for the final backend.

Signed-off-by: Cody P Schafer <dev@codyps.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2014-07-19 12:10:23 +02:00
Yann E. MORIN
645a5c33ae scripts: remove legacy mk-release.sh
This script is too Hg-specific. Just remove it.

In case we need something similar in the future,
we'd just have to use the better git counterparts.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2014-06-28 17:13:33 +02:00
Yann E. MORIN
bda692e737 scripts: remove legacy mk-patches.sh
This script is too Hg-specific. Just remove it.

In case we need something similar in the future,
we'd just have to use the better git counterparts.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2014-06-28 17:07:58 +02:00
Yann E. MORIN
6ecd4e801d scripts: another change needed for the Hg->git conversion
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2014-06-28 13:10:23 +02:00
Yann E. MORIN
a11b51c254 scripts: first batch of hg->git conversion
Replace calls to 'hg' with as-close-as-possible equivalents in git.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2014-06-27 00:59:00 +02:00
Yann E. MORIN
bdf731eead repository: migrate old hg files over to git
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2014-06-27 00:28:53 +02:00
Yann E. MORIN"
d0cc0b3a56 arch: use the newly introduced target_bits_64
Convert MIPS and Sparc over to using the new target_bits_64 variable.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2014-05-12 00:09:31 +02:00
Cody P Schafer
aaaea2987a arch/powerpc: add powerpc64le support
Technically, I don't forbid powerpcle support either, but I'm not sure that
there is any library/compiler support for that at the moment (though the hw
technically makes it possible).

powerpc64le needs glibc 2.19 and gcc 4.9. I haven't looked into the support
tools, but at least gdb 7.5 is too old (7.7.1 definitely has support).

Also make powerpc64 non-experimental. It's practically old at this point.

Signed-off-by: Cody P Schafer <dev@codyps.com>
[yann.morin.1998@free.fr: use ${target_endian_le} and ${target_bits_64}]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <64bfbbced9dd8f62e0d6.1399801945@gun>
Patchwork-Id: 347775
2014-05-12 00:02:13 +02:00
Yann E. MORIN"
12e1875557 scripts/functions: introduce target_bits_32 and target_bits_64 variables
These variables behave the same for bitness as their counterparts do
for endianness: they are defined to the appropriate bitness.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Cody P Schafer <dev@codyps.com>
2014-05-11 23:55:16 +02:00
Yann E. MORIN"
bcb36bb8df scripts/functions: add target_endian_le and target_endian_be
We currently define target_endian_el and target_endian_eb to be the
tuple extension depending on endianness, defined to be respectively
'el' or 'eb' according to the endianness.

Some architecture do not use 'el' or 'eb', but use 'le' or 'be'.

Provide that as well, as two new variables: target_endian_le and
target_endian_be.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Cody P Schafer <dev@codyps.com>
2014-05-11 23:43:52 +02:00
Yann E. MORIN"
8989b2d658 binutils/elf2flt: restore the custom location functionality
Somehow, it got lost when incorporating elf2flt in the binutils farmework.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2014-05-11 17:51:33 +02:00
Yann E. MORIN"
298982aab2 binutils/binutils: do not forget to extract elf2flt
In case we're using a custom (aka local) binutils source, we still
need to extract and patch elf2flt.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2014-05-11 18:42:30 +02:00
Yann E. MORIN"
04a7340d0a binutils/elf2flt: use alternate mirror
The official elf2flt upstream has disapeared.

Switch to a mirror.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2014-05-11 15:43:28 +02:00
Yann E. MORIN"
e2d2b2ae11 functions: finally fix the git helper
It's gonna soon be used by elf2flt, so we better get it working.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2014-05-11 17:47:53 +02:00
Cody Schafer
db2872f2ac cc/gcc: allow CC_EXTRA_CONFIG_ARRAY on baremetal
The final bare-metal compiler is built using the core backend.
Currently the core uses the CC_CORE_EXTRA_CONFIG_ARRAY variable.

While this works as supposed to, this can leave the user puzzled
in the menuconfig, since all he can see is the core options, not
the final options.

Only show the core options if any of the core passes are needed,
and use the final options in the core-backend if we're issuing
the bare-metal compiler.

Signed-off-by: Cody P Schafer <dev@codyps.com>
[yann.morin.1998@free.fr: hide core options if no core pass needed;
 use final option in core backend if issuing the bare-metal compiler]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <22181e546ba746202489.1399688067@localhost>
Patchwork-Id: 347586
2014-05-09 19:13:49 -07:00
Cody Schafer
b61a1b13ee cc/gcc: avoid passing --enable-multilib
Some versions of gcc have a broken --enable-multilib flag. As multilib is the
default, only pass the --disable-multilib flag

Signed-off-by: Cody P Schafer <dev@codyps.com>
[yann.morin.1998@free.fr: make it an if-block; duplicate commit log as comment]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <5c970c1ceb22528fe28a.1399687923@localhost>
Patchwork-Id: 347585
2014-05-09 19:11:59 -07:00
Yann E. MORIN"
4a05e37256 scripts: remove references to curl
It's been a while we're not using curl anymore.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2014-05-10 12:33:37 +02:00
Cody Schafer
490ec21217 scripts: add possibility to not override default connection timeout
Allow '-1' to be specified as CONNECTION_TIMEOUT to disable the use
of the connection timeout for wget.

Signed-off-by: Cody P Schafer <dev@codyps.com>
Message-Id: <cb33f8c2cbaf802d4f04.1399687632@localhost>
Patchwork-Id: 347582
2014-05-09 19:07:02 -07:00
Bryan Hundven
4e6622e882 scripts: Update config.guess and config.sub
Update config.guess and config.sub from:
http://git.savannah.gnu.org/gitweb/?p=config.git

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
[yann.morin.1998@free.fr: further update]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <befa8e8e81336bc1c415.1393054644@Bryans-MacBook-Pro.local>
Patchwork-Id: 323128
2014-02-21 23:28:12 -08:00
Trevor Woerner
3737334080 newlib: fix extract process for custom version
newlib: fix extract process for custom version

If the user specifies the use of a custom newlib version, the logic in the
extract function was reversed, so this step would fail.

Signed-off-by: Trevor Woerner <trevor.woerner@linaro.org>
[yann.morin.1998@free.fr: keep leading indentation]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <c727adf1b7bd2c1e891d.1393353347@openSUSE-i7>
Patchwork-Id: 324060
2014-02-25 13:34:48 -05:00
Yann E. MORIN"
eb0da898f8 cc/gcc: only build required core passes
We now know exactly what pass to build, so build only what is required.

Reported-by: Trevor Woerner <trevor.woerner@linaro.org>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2014-05-05 23:24:05 +02:00
Ray Donnelly
62a1145d61 binutils: Added ranlib to tools list
so that it is available to available to
the core C compiler build because static
libraries are built and ranlib is used
on them.

Signed-off-by: Ray Donnelly <mingw.android@gmail.com>
Message-Id: <CAOYw7dt=+DdnKAHNShfs6a+=7sS+DLQYkyxnQMAwmw7E7zqvgA@mail.gmail.com>
Patchwork-Id: 316477
2014-02-04 07:40:45 +00:00
Yann E. MORIN"
2ee8d1d8f2 cc/gcc: add option to enable/disable decimal floats
Decimal floats need support form the C library, namely support
for fenv, which is missing in uClibc for any architecture but
x86/32.

Add an option (a choice) to enable or disable decimal floats.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2014-01-04 16:17:40 +01:00
Yann E. MORIN"
ec93451443 libc/uClibc: add option to enable fenv
Support for fenv.h is a little bit more tricky that enabling it only
for x86-32 is not right.

Add an option for the user to choose whther to install fenv.h or not.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2014-01-04 16:19:18 +01:00
Yann E. MORIN"
20d851ad9f libc/glibc: fix downloading addons
Do to glibc what we did to eglibc in #dff359adf15c.

Only (very) old versions of glibc have other external addons,
and they are no longer meaningful.

But for consistency, do the change nonetheless.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2014-01-06 20:05:14 +01:00
Yann E. MORIN"
2071cfb13e libc/glibc: print name of skipped addon
When trying to extract an already present (aka bundled) addon,
print the name of that addon, for clarity, and to help analyse
the build.log post-mortem.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2014-01-05 19:25:54 +01:00
Daniel Dittmann
ba4abe8285 cc/gcc: set CXXFLAGS at configure gcc
Since gcc 4.8 C++ is also used as implementation language (see gcc
release notes).

Signed-off-by: "Daniel Dittmann" <ddittmann@gmx.net>
Message-Id: <acc7d11bc77b30f21c5b.1388863298@bernalk.machteam>
Patchwork-Id: 306883
2014-01-04 20:16:18 +01:00
Yann E. MORIN"
c1ed43e527 libc-uclibc: enable fenv for x86 32-bit
Without it, gcc-4.8 fails to build.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2014-01-04 01:10:13 +01:00
Yann E. MORIN"
c6fd7bd2d9 cc/gcc: diable libsanitizer without NPTL
gcc-4.8 comes with a new library to sanitise memory access:
  - heap-, stack-, and global-buffer overflow, use-after-free
  - data-races between threads

This library requires some _np parts of the API, which are not
implemented in the (old) LinuxThreads, which is still available
in uClibc.

Since NPTL requires a i486 or above, i386 are stuck with using LT,
which precludes building the libsanitizer.

Disable libsanitizer, a bit like libatomic is.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Niels Penneman <niels@penneman.org>
2014-01-04 01:02:57 +01:00
Yann E. MORIN"
05429e01f2 libc/eglibc: fix downloading of localedef addon
For the versions of eglibc where the ports addon is not external (ie,
all versions after, and including 2.17), we would fail to download the
localedef addon, since the test did not care about the addon we were
about to download, only whether the ports addon was external or not.

Fix that by skipping the ports addon only if that's the addon we're
trying to download.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2014-01-03 17:10:09 +01:00
Niels Penneman
89e9d9851a cc/gcc: fix gcc 4.8 build for C library without threads support
Signed-off-by: Niels Penneman <niels@penneman.org>
Message-Id: <309df93f4354c80e05c9.1388743085@i7sb.local>
Patchwork-Id: 306521
2014-01-03 10:57:48 +01:00
Yann E. MORIN"
c1a327fc0b scripts: do not allow commas in directories, it breaks things
The comma is used by the autotools as separator in many sed expressions,
which break if a directory contains commas.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2014-01-03 00:13:15 +01:00
Yann E. MORIN"
dbe2cc1c0b kernel/linux: fix fall-out due to arm64 special case
Cset 3b61be3d7aa6 (prepare for arch whose kenel name is not the standard name)
failed to name a variable consistently, so all archs but arm64 were broken.

Fix that by renaming the variable in a consistent way.

Reported-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2014-01-01 19:14:20 +01:00
Yann E. MORIN"
1bf982dd68 arch/arm: add support for AArch64
AArch64 id the 64-bit variant for ARM.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Zhenqiang Chen <zhenqiang.chen@linaro.org>
Cc: Michael Hope <michael.hope@linaro.org>
2013-12-30 23:28:18 +01:00
Yann E. MORIN"
9bda4536fe kernel/linux: prepare for arch whose kenel name is not the standard name
For some architectures, the kernel architecture name is not the common
name of the architecture for other tools.

For example: ARM 64-bit is commonly referenced as aarch64, but the kernel
calls it arm64.

Signed-off-by: Michael Hope <michael.hope@linaro.org>
Signed-off-by: Zhenqiang Chen <zhenqiang.chen@linaro.org>
[yann.morin.1998@free.fr: split out of the aarch64 patch]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-12-30 23:15:02 +01:00
Yann E. MORIN"
def5ffe83a scripts: update config.{guess,sub}
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-12-31 13:02:57 +01:00
Yann E. MORIN"
2c2717a019 libc/newlib: fix variables for avr32 headers
Some of the avr32headers related variables are used in different
functions, so have to be declared globally, not locally.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-12-31 12:55:21 +01:00
Zhenqiang Chen
2f94f99dd8 cc/gcc: Add Fortran support for Baremetal build
Signed-off-by: Zhenqiang Chen <zhenqiang.chen@linaro.org>
[yann.morin.1998@free.fr: fix damage due to mailer]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <CACgzC7D5HCVS-qX=ydcQphNFH=VGgJzTdZWQWaLKAv-CdE8crA@mail.gmail.com>
Patchwork-Id: 292703
2013-11-19 14:44:02 +08:00
Yann E. MORIN"
f63e4f0604 libc/{glibc,eglibc}: Don't download glibc-ports when not available
Don't download glibc-ports when glibc or eglibc version greater than 2.16,
because the "ports" source is mainline in the glibc or eglibc since version 2.17.

Signed-off-by: "Daniel Zimmermann" <netzimme@gmail.com>
Message-Id: <9c045ca3cf1b9dc89da3.1384602843@haus-VirtualBox>
Patchwork-Id: 291766
[yann.morin.1998@free.fr: slightly tweak subject, change variable name]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-11-16 16:16:51 +01:00
Yann E. MORIN"
78c5cab850 debug/gdb: fix canadian-cross in case of static cross gdb
Building the cross-gdb shoud be done using the host compiler,
not the native compiler.

Reported-by: Per Arnold Blaasmo <per-arnold.blaasmo@atmel.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-11-15 21:35:27 +01:00
Yann E. MORIN"
edd01b7729 libc/(e)glibc: fix extra configparms
In case ${CT_LIBC_GLIBC_CONFIGPARMS} starts with a dash, printf will try
to interpret it as an option for itself, and will invariably flail in
panic as it does not recognise any of it.

Use a more robust solution, as suggested by Cody.

Reported-by: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Cody P Schafer <devel-lists@codyps.com>
2013-11-15 21:21:12 +01:00
Yann E. MORIN"
0226e35db7 scripts/functions: use portable 'gzip -dc'
'zcat' on MacOS-X is broken (it is not gzip's zcat, but compres' zcat).

Use 'gzip -dc' for portability, as suggested by Anthony.

Reported-by: Fernando Ortiz <fortiz2k@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Anthony Foiani <anthony.foiani@gmail.com>
2013-11-15 21:16:52 +01:00
Yann E. MORIN"
a5b6b0d129 scripts: remove duplicate '/' in prefix, it breaks relocation
Reported-by: Richard Weinberger <richard.weinberger@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-11-15 18:58:42 +01:00
Yann E. MORIN"
cf36828878 cc/gcc: Add support for golang
Signed-off-by: Richard Weinberger <richard@nod.at>
Message-Id: <ca374aef944e28a6ec3c.1383921708@azrael>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-11-08 15:18:09 +01:00
Michael Hope
c0c6db07fe complibs/isl: add HTTP mirror
Add well-known HTTP mirror as a fallback.  This lets crosstool-ng
work when behind a HTTP/HTTPS only proxy.

Signed-off-by: Michael Hope <michaelh@juju.net.nz>
[me: split original patch in two]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <aeb4a850d0786ee62dc2.1375559989@wanda>
Patchwork-Id: 264436
2013-08-01 20:24:35 +00:00