Commit Graph

1272 Commits

Author SHA1 Message Date
Martin Guy
e284b218a7 arch/avr32: Fix download of header files
This patch fixes the download of the avr32 headers in crosstool-ng by
fetching them directly from Atmel's web site instead of the now-broken URL
given by the original author of the avr32-header-fetching modification,
who fetched them from a copy on his own, now-defunct server.

It also adds the necessary logic to extract from a zip file, as that is
how the headers are packaged.

To configure it for avr32 after launching ct-ng menuconfig in an empty
directory:

       Paths and misc options ->
               Shell to use as CONFIG_SHELL = sh
       Target options ->
               Target Architecture = avr32
       Toolchain options ->
               Tuple's alias = avr32
       Binary utilities ->
               binutils version = 2.18a
       C compiler
               gcc version = 4.2.2
       C-library
               newlib version = 1.17.0
               Enable IOs on long long = yes
               Enable IOs on floats and doubles = yes
               Disable the syscalls supplied with newlib = yes

CONFIG_SHELL is necessary to get round the "fragment: command not
found" bug when binutils-2.18 is configured using bash.

Prepared against crosstool-ng mercurial trunk on 31 March 2012.

Signed-off-by: Martin Guy <martinwguy@gmail.com>
[yann.morin.1998@free.fr: update bundles sample accordingly]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <CAL4-wQrg_NQ7jm-NCADqeyQr9twyhtx42OUGNThP6gWeqZc=kw@mail.gmail.com>
Patchwork-Id: 232612
2013-03-31 04:07:38 +00:00
Samuel Martin"
355e585232 debug/dmalloc: enforce cross-compilation
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Message-Id: <69772732f551aa342a2c.1363446264@laptop>
Patchwork-Id: 228221
2013-03-16 15:33:44 +01:00
Samuel Martin"
96b2e3c3f6 debug/strace: enforce cross-compilation
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Message-Id: <24b6540a08cbca7ee1fa.1363446263@laptop>
Patchwork-Id: 228220
2013-03-16 15:47:56 +01:00
Samuel Martin"
1fc10f2779 debug/gdb: enforce gdbserver cross-compilation
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Message-Id: <ca85cad85c4dd20e74f1.1363446262@laptop>
Patchwork-Id: 228219
2013-03-16 15:46:45 +01:00
Yann E. MORIN"
d12f807b16 libc/glibc: do not overwrite existing bits/syscall.h
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Rafael C <groups.r2@gmail.com>
Cc: Jérôme BARDON <bardon.pro@gmail.com>
Cc: Daniel Price <daniel.price@gmail.com>
2013-03-03 22:24:40 +01:00
Yann E. MORIN"
75e7c5bc1b libc/glibc: fix installing syscall.h when installing start-files.
Reported-by: Rafael C <groups.r2@gmail.com>
Reported-by: Jérôme BARDON <bardon.pro@gmail.com>
Reported-by: Daniel Price <daniel.price@gmail.com>
[yann.morin.1998@free.fr: use a conditional approach, also suggested by Daniel]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-03-03 22:18:35 +01:00
Yann E. MORIN"
a5491bd775 debug/gdb: a litle bit of trivial code-reordering
Move all options-setting code at the same place.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-03-03 17:17:55 +01:00
Yann E. MORIN"
6fef7d640a debug/gdb: fix possibly broken code
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-03-03 17:15:56 +01:00
Yann E. MORIN"
ea899b6767 debug/gdb: move the ncurses build to a backend
This cleans up the code a bit.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-03-03 16:21:51 +01:00
Yann E. MORIN"
71d2f41cf9 debug/gdb: always enable expat for the cross-gdb
There's no point in not supporting XML in the cross-gdb.
I mean, come on... ;-)

It's still the responsibility of the user to have the necessary
devel expat packages installed for his/her distro.

Reported-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-03-03 16:19:32 +01:00
Yann E. MORIN"
5b41901f99 debug/gdb: fix $need_expat_src usage for native-gdb
For the native-gdb (ie on the target), we unconditionally
need to build expat.

Make it a backend, it makes a litle bit cleaner code.

Reported-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-03-03 15:30:02 +01:00
Yann E. MORIN"
c31652d67d debug/gdb: fix $need_ncurses_src usage
It should be used only to decide whether we need to download/extract
ncurses, not wheter we should build it or not.

Reported-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-03-03 15:25:52 +01:00
Yann E. MORIN"
42b0a64885 debug/gdb: fix the mess do_{gdb,expat,ncurses} have become
Rename those three variables to properly reflect their purpose: decide
whether we need to download/extract gdb/libexpat/libncurses, not whether
we need to build them or not.

This is only a rename for now, subsequent changes will further
fix this mess.

Reported-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-03-03 15:02:32 +01:00
Trevor Woerner
38a4afc266 libc/newlib: update fetch location
The menu system provides an option to allow a user to request newlib
version 2.0.0. newlib-2.0.0, however, is not available at the download
location currently being used. It is, however, available (as are other
supported versions of newlib) at an alternate location.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Message-Id: <75ab5151c7f5dc9086e3.1362334313@suse64>
Patchwork-Id: 224561
2013-03-03 13:10:51 -05:00
Yann E. MORIN"
035fb442ea complibs/ppl: update upstream location
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-02-15 18:54:27 +01:00
Yann E. MORIN"
7057f45317 scripts: fix finishing the toolchain when download/extract-only is set
In case we only download or extract the sources, do not fail while
finishing the toolchain: the test-suite directory may not exist, so
we can't chmod it.

Also, use safer constructs that won't trigger the 'set -e' in case of
failure (eg.: "[ ... ] && ..." is not safe in case the test fails).

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-01-28 21:53:18 +01:00
Samuel Martin
338c1b4642 script: allow to pass any float value for CT_LOAD
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Message-Id: <b51acf21c72b4a8e882e.1359320015@laptop>
Patchwork-Id: 216062
2013-01-27 17:54:19 +01:00
Yann E. MORIN"
150f500426 arch: allow adding a suffix to the arch-part of a tuple
For some architectures, it is legit to have an alternate value in the
'architecture' part of the tuple. For example:
    armv5te-*
    armv7a8-*

Besides, some packages expect the tuple to reflect the arch variant
(eg. openMPI) to detect the variant's capabilities (eg. atomic
primitives).

This patch adds an option for the user to specify a suffix to be added
to the arch-part of the tuple.

Signed-off-by: Willy Tarreau <w@1wt.eu>
Message-ID: <20130120225822.GS6838@1wt.eu>
Patch-Id: 213994
[yann.morin.1998@free.fr: make it a suffix, not an override]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-01-20 12:58:22 +00:00
Yann E. MORIN"
d75440243e scripts: woops, root's UID is 0, not 1000!
Left-over from a test... :-(

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-01-10 23:09:38 +01:00
Yann E. MORIN"
1cabb74b7d scripts: check for running as root
Running as root is really, really dangerous.

Add a runtime-check that refuses to build if running as root.
Can be overriden with a double switch in the menuconfig.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-01-10 22:38:48 +01:00
Yann E. MORIN"
ffe80db73c libc: get rid of libc_finish
At long last, we no longer have any libc that requries a libc_finish.
Yeah!

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-01-10 21:01:59 +01:00
Yann E. MORIN"
b8c9fdf4a3 libc/newlib: install AVR32 headers during the start-files-and-headers phase
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-01-10 19:06:46 +01:00
Yann E. MORIN"
c1d673203d arch/arm: add option to use *eabihf tuples
Toolchains that use the hard-float ABI now are to be denoted by a tuple
ending in *eabihf, while the prevbious *eabi is now an indication that
the toolchain uses the softfloat ABI.

This is purely a cosmetic thing, for distros to differentiate their
hardfloat-ABI ports from their softfloat-ABI ports.

(note: softfloat ABI does not mean that it is using softfloats; it can
be using hardfloat instructions, but using the softfloat ABI).

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-01-10 00:11:17 +01:00
Yann E. MORIN"
15af813bf1 scripts: update config.{guess,sub}
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-01-09 18:52:00 +01:00
Yann E. MORIN"
515938dc92 scripts/addToolsVersion: handle elf2flt
The one was missing from the list.

It is very improbable that we ever need it, as elf2flt does no release,
and we always get it from CVS head. But for the sake of consistency, we
just add it.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-12-27 12:53:32 +01:00
Yann E. MORIN"
ae91413aee scripts/addToolsVersion: properly handle .in vs. .in.2
While most components have their version in the .in file, some
have it in the .in.2 (eg. elf2flt).

Currently, to handle this case, we indiscriminately munge both files,
but this is wrong: in the elf2flt case, if we add a binutils version,
we do not want it to be added to elf2flt, and conversely.

So, for each tool, we need to explicitly know what file to munge.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-12-27 12:45:22 +01:00
Yann E. MORIN"
1e449846a5 script/addToolsVersion: fix eglibc version separator
eglibc uses '_', not '.' to separate major/minor.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-12-26 13:44:43 +01:00
Yann E. MORIN"
ea77a251e5 libc/glibc: both glibc and eglibc have pkgversion and bugurl
Well, all eglibc version we support do, and latest glibc versions
we support do.

Not all glibc versions do, but older versions simply ignore the
unrecognised ./configure flags.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-12-26 13:30:51 +01:00
Yann E. MORIN"
340875e473 libc/eglibc: remove now superfluous config knobs
All eglibc versions we now have support pkgversion and bugurl.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-12-26 12:15:10 +01:00
Yann E. MORIN"
8ec9dbbc8d libc/glibc: always enable obsolete RPC
Since unrecognised ./configure flags are simply ignored,
we can always pass --enable-obsolete-rpc.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-12-26 13:34:55 +01:00
Yann E. MORIN"
188d166ce3 scripts/showTuple: fix stdout
Since we've had the debug shell feature, fd #7 is now used to
redirect stderr, while it was previously unused.

Use fd #9 to redirect stdout.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-01-06 12:08:33 +01:00
Yann E. MORIN"
fc4d1bf65f complibs/ppl: fix build with newer gcc
ppl-0.10.x does not build with gcc-4.6+, as it uses constructs that were
warnings with gcc-4.5 and before, but are now errors with gcc-4.6 and
above.

Fix that by passing -fpermissive in CFLAGS for ppl 0.10.

Reported-by: Jeremy Rosen <jeremy.rosen@openwide.fr>
Reported-by: Peter Korsgaard <jacmet@uclibc.org>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-12-10 00:25:48 +01:00
Yann E. MORIN"
288ac9d627 scripts/xldd: use user's sed and grep
xldd uses sed and grep as detected by ./configure. This works well if is
used on the machine that build the toolchain.

But if the user moves the toolchain to another machine where sed and grep
are not in the same directory (eg. /bin/sed vs. /usr/bin/sed), then xldd
will stop functionning.

Fix that by using ${SED} and ${GREP} if they are set in the environment.

Reported-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-12-05 20:31:43 +01:00
Yann E. MORIN"
4e9c473337 cc/gcc: do not print 'core' or 'final'
In gcc-'s core and final passes, do not print 'core' or 'final' in
log messages. We already print it in step messages.

Also, as we use the core backend to build the bare-metal final gcc,
it can be disturbing to read 'core' while we're in fact in 'final'.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-11-25 18:22:38 +01:00
Yann Diorcet
e9920217e8 cc: add a flag for skipping core passes
It is used for skipping unnecessary compilation steps when the libc
doesn't need to be compiled (eg. when we do not use a C library).

Signed-off-by: Yann Diorcet <diorcet.yann@gmail.com>
Message-Id: <150eadb0117e697d79aa.1353625025@blackmint>
Patchwork-Id: 201222
2012-11-22 23:56:58 +01:00
Yann E. MORIN"
6023f7221a scripts/functions: fix debug-shell
Properly catch resuming the build when continuing past the
failed command.

The 'case ;;&' construct is a bash4ism. Get rid of it.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-11-22 19:43:26 +01:00
Daniel Price
77705cdfe1 scripts: refine static linking check to better guide the user
The current mechanism to check if static linking is possible, and the mesage
displayed on failure, can be puzzling to the unsuspecting user.

Also, the current implementation is not using the existing infrastructure,
and is thus difficult to enhance with new tests.

So, switch to using the standard CT_DoExecLog infra, and use four tests to
check for the host compiler:
  - check we can run it
  - check it can build a trivial program
  - check it can statically link that program
  - check if it statically link with libstdc++

That should cover most of the problems. Hopefully.

(At the same time, fix a typo in a comment)

Signed-off-by: Daniel Price <daniel.price@gmail.com>
[yann.morin.1998@free.fr: split original patch for self-contained changes]
[yann.morin.1998@free.fr: use steps to better see gcc's output]
[yann.morin.1998@free.fr: commit log]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <163f86b5216fc08c672a.1353459722@nipigon.dssd.com>
Patchwork-Id: 200536
2012-11-20 16:59:17 -08:00
Daniel Price
b9d836e9e0 scripts: fail on ':' in paths
Signed-off-by: Daniel Price <daniel.price@gmail.com>
[yann.morin.1998@free.fr: split original patch for self-contained changes]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <163f86b5216fc08c672a.1353459722@nipigon.dssd.com>
Patchwork-Id: 200536
2012-11-20 16:59:17 -08:00
Yann Diorcet
9705ec34cf binutils: introduce the infrastructure to support binutils alternatives
Rework binutils in order to provide soon binutils alternative.

Signed-off-by: Yann Diorcet <diorcet.yann@gmail.com>
[yann.morin.1998@free.fr: split up original patch for self-contained changes]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <d3d1d51f399e6d2c1163.1353320546@macbook-smorlat.local>
Patchwork-Id: 199971
2012-11-19 11:21:31 +01:00
Yann Diorcet
b43fdf40f1 scripts: add BUILD/HOST extra cflags/ldflags
On some hosts, and for certain toolchains (eg. toolchain targetting
the upcoming Darwin), it may be necessary to pass arbitrary CFLAGS
and/or LDFLAGS when building the components.

And necessary infrastructure:
  - EXTRA_{CFLAGS,LDFLAGS}_FOR_{BUILD,HOST} as config options
  - pass those extra flags to components

Fix-up a slight typo in elf2flt at the same time (misnamed cflags).

Signed-off-by: Yann Diorcet <diorcet.yann@gmail.com>
Message-Id: <d24043276c9243a35421.1353077450@macbook-smorlat.local>
Patchwork-Id: 199645
2012-11-16 15:25:57 +01:00
Daniel Price
1af4a119d2 scripts: unquoted variable reference in glibc-eglibc.sh-common
Signed-off-by: Daniel Price <daniel.price@gmail.com>
Message-Id: <12f092a95a94bcf76912.1353367250@redfish.dssd.com>
Patchwork-Id: 200215
2012-11-19 15:20:13 -08:00
Yann Diorcet
ba31ed29c4 binutils/sstrip: remove
sstrip has been obsoleted for a while now, as it's still broken
for some archs, and there seems to be no incentive to fix it
upstream. Besides, the space gained with sstrip is marginal at
best.

Signed-off-by: Yann Diorcet <diorcet.yann@gmail.com>
Message-Id: <65c8bf534d0647ce52cd.1353320545@macbook-smorlat.local>
Patchwork-Id: 199970
2012-11-19 11:19:54 +01:00
Yann Diorcet (diorcet yann
0be070e5b7 complibs: introduce generic multi-complibs infrastructure
Use the same method as companion tools for providing generic and
extendable companion libs.

Signed-off-by: Yann Diorcet <diorcet.yann@gmail.com>
Message-Id: <515c5c4635d99ebe4877.1353074410@macbook-smorlat.local>
Patchwork-Id: 199613
2012-11-16 14:59:27 +01:00
Yann Diorcet
3d01e9f275 libc/mingw: replace mingw32 with generic mingw
Replace the 32-bit-only mingw32 with mingw-w64 that is capable
of building toolchains for both 32-bit and 64-bit Windows.

kernel/mingw: replace mingw32 with generic Windows
kernel/windows: New windows kernel supporting 32 and 64 bit arch
libc/mingw: Remove old options
patches: Remove old mingw libc options' patches

Signed-off-by: "Yann Diorcet" <diorcet.yann@gmail.com>
[yann.morin.1998@free.fr: array var in libc/mingw.sh, typos]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <b045ac08fc9eac2e5ee3.1352898499@blackmint>
Patchwork-Id: 198901
2012-11-14 14:05:49 +01:00
Michael Hope
79a9f857e2 scripts: set default CFLAGS to optimise.
The extra CFLAGS override the product defaults, causing the product to
be built without optimisation or debug.  Be explicit and add these in.

Reported-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Michael Hope <michael.hope@linaro.org>
Message-Id: <CANLjY-=3Gbio6nzUPhhevDHV7cUN=6Vigooe9nSf-RnGCqnjog@mail.gmail.com>
Patchwork-Id: 198808
2012-11-13 15:06:18 +00:00
Johannes Stezenbach
a8318facc4 libc/eglibc: enable rpc in eglibc-2.16+
While eglibc-2.16 recommends to use TI-RPC instead of the old sunrpc, the
old one can be included using a configure option. Since the user can still
use TI-RPC to override the libc implementation, we enable rpc unconditionally.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Message-Id: <20121102140404.GA7707@sig21.net>
Patchwork-Id: 196564
2012-11-02 04:04:04 +00:00
Yann E. MORIN"
05a3ceff5a scripts/xldd: fix debug output layout
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-11-07 21:55:42 +01:00
Yann E. MORIN"
baba086806 libc/uClibc: remove use of snapshots and specific date
We now have the ability to use a custom location, so supporting
snapshots or custom date is no longer needed. Let the user do the
required preparation in this case.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-10-31 23:31:32 +01:00
David Holsgrove
5ed8715c9d libc/uClibc: Add CUSTOM version and CUSTOM_LOCATION config options and GetCustom
CUSTOM_LOCATION config options only presented in menuconfig if component
CUSTOM version selected.

Signed-off-by: "David Holsgrove" <david.holsgrove@xilinx.com>
[yann.morin.1998@free.fr: fix indentation, don't patch custom dir location]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <712995e3e719fbbe24af.1349931201@localhost.localdomain>
PatchWork-Id: 190794
2012-10-11 14:39:44 +10:00
Johannes Stezenbach
5ddbc863e1 scripts/functions: fix endless loop in debug-shell with IO redirection
CT_DEBUG_INTERACTIVE is disabled when stdin, stdout or
stderr are redirected, but the check is only done at
the start of the build and doesn't catch when individual
build commands use redirection.  When stdin is redirected
it will cause the debug shell to exit immediately, causing
and endless loop.  Thus, save the stdin/our/err file handles
and restore them before invoking the debug shell.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Message-Id: <20121030102225.GA8303@sig21.net>
Patchwork-Id: 195409
2012-10-30 00:22:25 +00:00