Commit Graph

44 Commits

Author SHA1 Message Date
Alexey Neyman
cf86df688a Add 'companion tools for host' step.
Signed-off-by: Alexey Neyman <stilor@att.net>
2016-12-02 15:03:15 -08:00
Alexey Neyman
3f7fbd7bed Move companion tool build into a separate step.
Also, rename "build" -> "for_build", since we're going to have a "for_host"
as well.

Signed-off-by: Alexey Neyman <stilor@att.net>
2016-12-02 15:03:15 -08:00
Alexey Neyman
3ebc5d0c1e libc/*.sh: Deprecate libc_check_config step.
This step was only used in uClibc. However, with upcoming multilib, the
config management will have to be done for each variant differently,
anyway.

uClibc was the only user of libc_check_config step, as well as
CT_CONFIG_DIR directory. Retire these.

Two other clean-ups in uClibc.sh:
- KERNEL_HEADERS check seems to be bogus, this config option is not
  present even in 0.9.30 - which is not supported already.
- SHARED_LIB_LOADER_PREFIX was renamed to MULTILIB_DIR in 0.9.31,
  according to ChangeLog - and MULTILIB_DIR is passed from command line
  instead.

Signed-off-by: Alexey Neyman <stilor@att.net>
2016-08-23 11:00:27 -07:00
Alexey Neyman
6f7e6b9969 Build companion libs for target.
Currently, only libelf has a for-target step - but it generalizes
the step to hook other libraries into this step.

Signed-off-by: Alexey Neyman <stilor@att.net>
2015-11-13 10:24:22 -08:00
Erico Nunes
b8e64a0c08 avr-libc: add support for avr-libc C library
This commit adds support for the avr-libc C library.
According to the project page at http://www.nongnu.org/avr-libc , the
avr-libc package provides a subset of the standard C library for Atmel
AVR 8-bit RISC microcontrollers. In addition, the library provides the
basic startup code needed by most applications.

Support for this library in crosstool-ng is only enabled for the AVR
8-bit target.

The avr-libc manual and most distributions build the AVR 8-bit gcc
toolchain with the "avr" (non-canonical) target.
Some experimentation also led to the conclusion that other (canonical)
targets are not very well supported, so we force the "avr" target for
crosstool-ng as well.

The manual also recommends building avr-libc after the final gcc build.
To accomplish this with crosstool-ng, a new do_libc_post_cc step is
added, in which currently only avr-libc performs its build, and is a
no-op for the other libc options.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
2015-06-21 20:53:06 -03: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 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
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 E. MORIN"
d776140189 cc/gcc: build core compilers for canadian
Currently, we rely on an existing external cross-compiler targetting
the target, to build the C library.

This can pause quite a few problems if that compiler is different from
the one we are building, because it could introduce some ABI issues.

This patch removes this dependency, by building the core compilers
as we do for standard cross, and also by building the binutils and
gcc, for running on the build machine.

This means we no longer need to offer the cross-sompiler selection in
the menuconfig.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2012-01-03 22:57:25 +01:00
Yann E. MORIN"
b485733f26 cc/gcc: add build frontend
Bizarrely enough, the core gcc are not enough to be able to build a
canadian cross, and a real, full cross compiler is required so that
the canadian cross can be properly built... WTF?!? Sigh...

Add a build-frontend, as was done for the binutils and the complibs.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-04-02 22:54:30 +02:00
Yann E. MORIN"
2e3cc45633 complibs: split companion libraries to backend/frontend, a-la cc_core
Move the actual complibs codes to backend functions that builds the
required combo of build/host/target as requested by a frontend.

This split is currently a no-op, but is required for the upcoming
canadian-cross rework, where we'll be needing to build the complibs
twice, one for build/build, and one for build/host.

This applies to the six companion libraries:
 - GMP
 - MPFR
 - PPL
 - Cloog/PPL
 - MPC
 - libelf

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-17 18:56:30 +02:00
Yann E. MORIN"
533e5c128c binutils: split binutils to backend/frontend, a-la cc_core
Move the actual binutils code to a backend function that builds the
required combo of build/host/target as requested by a frontend.

This split is currently a no-op, but is required for the upcoming
canadian-cross rework, where we'll be needing to build two binutils,
one for build/build/target, and one for build/host/target.

This applies to the three binutils:
 - GNU binutils
 - elf2flt
 - sstrip

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-17 18:29:35 +02:00
Yann E. MORIN"
ffee93e4d2 docs: update my e-mail
Since anciens.enib.fr has been dead for two months now, without any
hope of recovery, update my e-mail to point to @free.fr instead.

Reported-by: "Bryan Hundven" <bryanhundven@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-03-06 21:36:10 +01:00
Yann E. MORIN"
bf2726cb9f binutils/binutils: rename function that build target libraries
Prepare for the incoming build/host/target frontends.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-03-04 17:31:23 +01:00
Yann E. MORIN"
354914c49a complibs/libelf: rename libelf for target function
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2012-01-03 18:39:11 +01:00
Yann E. MORIN"
7494386046 kernel: move the headers install step
The kernel headers are only needed just before we build
the C library headers, and need not be present before.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-01-22 22:52:57 +01:00
Yann E. MORIN"
15a1cc2491 libc: remove now unneeded do_libc_headers
do_libc_headers is now a noop, and is no longer used, so remove that step.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-01-22 22:36:20 +01:00
Yann E. MORIN"
1504a1ef10 complibs: noone is using companion libs on the target; nuke them
As there's no longer any user of the companion libraries on the
target, nuke the build for the target.

Well, at least, there's libelf that's still needed by ltrace, so
we keep it.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-08-23 23:18:49 +02:00
Martin Lund
1779c82ad2 test-suite: Added new test suite feature (experimental)
This patch adds support for installing the gcc test suite. A helper
Makefile is provided for building and running the gcc tests.

The default configuration runs all gcc tests and requires automatic
ssh/scp login access to a networked target board. See README for
more details.

Note: Current feature is tested with the powerpc-unknown-linux-gnu
sample but it should work with others as well.

Signed-off-by: Martin Lund <mgl@doredevelopment.dk>
2010-05-19 17:53:04 +02:00
Yann E. MORIN"
e5a007415a scripts: misc help and auto-complete fixes
- don't list samples in the main help screen
- improve the samples listing in list-samples
- don't document the 'config' action, it's long dead
- document the 'V' environment variable
- improve on START, STOP and PREFIX environment variables
- add PREFIX and V to autocomplete
- advertise auto-complete at install time
2010-04-02 00:18:26 +02:00
Yann E. MORIN"
b0fece4689 tools: move sstrip to the binary utilities menu
sstrip is now alone in its 'tools' menu, and we will probably never gain
any other 'tool'. Besides, sstrip is just strip, but a little bit more
agressive, so it deserves going to the 'binary utilities' menu.
2010-03-17 00:21:57 +01:00
Yann E. MORIN"
991b90f242 comp-libs: make libelf a companion library
When gcc-4.5 is out, it will require libelf. So better make it a
companion library now rather than postponing the ineluctable.
2010-02-17 23:41:17 +01:00
Yann E. MORIN"
52e72144d7 /devel/gcc-4.4:
- add support for building the MPC library.

 -------- diffstat follows --------
 /devel/gcc-4.4/scripts/build/companion_libs/ppl.sh   |    4     2     2     0 +-
 /devel/gcc-4.4/scripts/build/companion_libs/mpc.sh   |   57    57     0     0 ++++++++++++++++++++++++++++++++++
 /devel/gcc-4.4/scripts/build/companion_libs/cloog.sh |    4     2     2     0 +-
 /devel/gcc-4.4/scripts/crosstool-NG.sh.in            |    3     3     0     0 ++
 /devel/gcc-4.4/steps.mk                              |    1     1     0     0 +
 /devel/gcc-4.4/config/companion_libs/mpc.in          |   32    32     0     0 +++++++++++++++++++
 /devel/gcc-4.4/config/companion_libs.in              |   15    10     5     0 ++++++---
 7 files changed, 107 insertions(+), 9 deletions(-)
2009-05-25 18:22:26 +00:00
Yann E. MORIN"
822fb9415e /devel/gcc-4.4:
- add support for building CLooG

 -------- diffstat follows --------
 /devel/gcc-4.4/scripts/build/companion_libs/cloog.sh |   60    60     0     0 ++++++++++++++++++++++++++++++++++
 /devel/gcc-4.4/scripts/addToolVersion.sh             |    3     2     1     0 +-
 /devel/gcc-4.4/scripts/crosstool-NG.sh.in            |    3     3     0     0 ++
 /devel/gcc-4.4/steps.mk                              |    1     1     0     0 +
 /devel/gcc-4.4/config/companion_libs/cloog.in        |   32    32     0     0 ++++++++++++++++++
 /devel/gcc-4.4/config/companion_libs.in              |    1     1     0     0 +
 6 files changed, 99 insertions(+), 1 deletion(-)
2009-05-24 22:04:14 +00:00
Yann E. MORIN"
df07dda46d Merge the /deve/uclinux branch back to /trunk:
- add support for uClinux, the MMU-less ports of Linux.

 -------- diffstat follows --------
 /trunk/scripts/build/kernel/linux.sh      |  100     1    99     0 ---------------
 /trunk/steps.mk                           |    1     1     0     0 +
 /trunk/config/kernel/linux.in             |  247     0   247     0 -------------------------------------
 /trunk/config/kernel.in                   |    2     1     1     0
 /trunk/config/libc/glibc.in               |    2     1     1     0
 /trunk/config/libc/eglibc.in              |    2     1     1     0
 /trunk/config/libc/glibc-eglibc.in-common |    5     5     0     0 +
 /trunk/config/config.in                   |    1     1     0     0 +
 8 files changed, 11 insertions(+), 349 deletions(-)
2009-05-13 20:55:15 +00:00
Yann E. MORIN"
a0cf91e83b Add support for building PPL:
- PPL will be needed to correctly build gcc-4.4+ for the
  GRAPHITE loop optimisation

 -------- diffstat follows --------
 /trunk/scripts/build/companion_libs/ppl.sh |   66    66     0     0 ++++++++++++++++++++++++++++++++++++
 /trunk/scripts/build/companion_libs/gmp.sh |   24    19     5     0 ++++++++++---
 /trunk/scripts/addToolVersion.sh           |    3     2     1     0 +-
 /trunk/scripts/crosstool-NG.sh.in          |    3     3     0     0 ++
 /trunk/steps.mk                            |    1     1     0     0 +
 /trunk/config/companion_libs/ppl.in        |   33    33     0     0 ++++++++++++++++++
 /trunk/config/companion_libs.in            |   22    19     3     0 ++++++++++--
 7 files changed, 143 insertions(+), 9 deletions(-)
2009-05-05 22:04:20 +00:00
Yann E. MORIN"
1115b43f86 On 20090115.0012+0100, "Andy Johnson" <ajohnson@aecno.com> wrote:
... I added a step after
  "debug" called "finish", and moved the code in crosstool.sh
  after the loop that processes the steps from crosstool.sh
  into a do_finish function in functions.  Thus, it is now
  possible to restart after the "debug" step to re-do the
  final few things (clean and compress).

 /trunk/scripts/crosstool-NG.sh |   38     0    38     0 --------------------------------------
 /trunk/scripts/functions       |   42    42     0     0 ++++++++++++++++++++++++++++++++++++++++++
 /trunk/steps.mk                |    3     2     1     0 ++-
 3 files changed, 44 insertions(+), 39 deletions(-)
2009-01-20 20:37:43 +00:00
Yann E. MORIN"
420f3fdd25 Rename scripts/crosstool.sh to scripts/crosstool-NG.sh.
After all, this is not crosstool, but really crosstool-NG!

 /trunk/steps.mk |    2     1     1     0 +-
 /trunk/ct-ng.in |    2     1     1     0 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
2009-01-18 17:45:10 +00:00
Yann E. MORIN"
51f267ee00 Build target GMP and MPFR prior to target binutils:
- binutils can use GMP and MPFR if available, so invert the build order to later make use of GMP and MPFR on the target.

 /trunk/steps.mk |    2     1     1     0 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
2008-11-04 18:28:56 +00:00
Yann E. MORIN"
2730c0b494 Move steps-related help into steps.mk.
/trunk/steps.mk |    4     4     0     0 ++++
 /trunk/ct-ng.in |    2     0     2     0 --
 2 files changed, 4 insertions(+), 2 deletions(-)
2008-10-29 18:34:14 +00:00
Yann E. MORIN"
993eeb9f8f Use $(MAKE) for recursive calls, don't directly use $(CT_NG).
Pass on the V variable on the $(MAKE) command lines.

 /trunk/steps.mk |    6     3     3     0 +++---
 /trunk/ct-ng.in |    2     1     1     0 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
2008-10-29 10:31:15 +00:00
Yann E. MORIN"
b476443822 Enhance the make fragments:
- comment the different parts
- re-order the code so that it is homogeneous amogst fragments
- eye-candy in some existing comments

 /trunk/tools/tools.mk     |   17    15     2     0 +++++++++++++++--
 /trunk/steps.mk           |   38    26    12     0 ++++++++++++++++++++++++++------------
 /trunk/samples/samples.mk |   41    28    13     0 ++++++++++++++++++++++++++++-------------
 /trunk/config/config.mk   |    2     1     1     0 +-
 4 files changed, 70 insertions(+), 28 deletions(-)
2008-10-27 18:42:26 +00:00
Yann E. MORIN"
4e7d6836a5 Cheesy kconfig stuff:
- silent/quiet/verbose build:
   - ct-ng by default only prints quit messages, such as "CC xxx",
   - if using V=0, nothing is printed,
   - if using V=1, the full command lines are printed,
   - other values are indeterminate,
   - should help in debugging the kconfig stuff;
 - complete kconfig/{,m}conf generation:
   - fully dynamic dependencies on source files,
   - compilation of .c into .o, then linking (instead of direct linking),
   - VPATH usage when not --local;
Typo + a coment moved.

 /trunk/kconfig/kconfig.mk |  140    87    53     0 +++++++++++++++++++++++++++++++++--------------------
 /trunk/tools/tools.mk     |   12     6     6     0 ++--
 /trunk/steps.mk           |    6     3     3     0 +-
 /trunk/samples/samples.mk |   30    15    15     0 +++++-----
 /trunk/ct-ng.in           |   40    28    12     0 +++++++++++----
 5 files changed, 139 insertions(+), 89 deletions(-)
2008-10-15 21:29:56 +00:00
Yann E. MORIN"
6a4dc6568b Eye-candy in the help entries.
/trunk/ct-ng.comp |    2     1     1     0 +-
 /trunk/ct-ng.in   |    6     3     3     0 +++---
 /trunk/steps.mk   |    6     3     3     0 +++---
 3 files changed, 7 insertions(+), 7 deletions(-)
2008-10-14 19:29:25 +00:00
Yann E. MORIN"
7a0e770be1 Remove the now really obsolete Linux kernel headers copy and sanitised.
Remove orphanned Linux kernel patchsets.
Initiate a kernel build scripts directory. Move the Linux kernel build script there.

 /trunk/scripts/build/kernel/linux.sh |  146    11   135     0 +++---------------------------------------
 /trunk/scripts/crosstool.sh          |    2     1     1     0
 /trunk/steps.mk                      |    1     0     1     0 -
 /trunk/config/kernel/linux.in        |   49     0    49     0 --------------
 /trunk/config/kernel.in              |    4     4     0     0 +
 5 files changed, 16 insertions(+), 186 deletions(-)
2008-09-10 21:40:23 +00:00
Yann E. MORIN"
1b00a301bd GMP and MPFR are no longer a sub-component of gcc (config-wise).
Build and install GMP and MPFR for the target.
Use the target GMP and MPFR to build the native gdb.
Have separate extra_config for cross gdb, native gdb and gdbserver.
Check native GMP and MPFR in //.

 /trunk/scripts/build/debug/300-gdb.sh |   27    19     8     0 ++++++++++++++++-------
 /trunk/scripts/build/gmp.sh           |   47    39     8     0 ++++++++++++++++++++++++++++++++-------
 /trunk/scripts/build/mpfr.sh          |   49    40     9     0 +++++++++++++++++++++++++++++++++--------
 /trunk/steps.mk                       |    2     2     0     0 ++
 /trunk/config/cc/gcc.in               |   18     1    17     0 +--------------
 /trunk/config/debug/gdb.in            |    6     1     5     0 +----
 /trunk/config/config.in               |    1     1     0     0 +
 /trunk/config/gmp_mpfr.in             |   34    34     0     0 ++++++++++++++++++++++++++++
 8 files changed, 137 insertions(+), 47 deletions(-)
2008-06-20 15:16:43 +00:00
Yann E. MORIN"
9d8b0a6829 Rework a little bit the steps and samples help entries.
/trunk/docs/overview.txt  |    2     1     1     0 +-
 /trunk/steps.mk           |    7     5     2     0 +++++--
 /trunk/samples/samples.mk |    8     5     3     0 +++++---
 /trunk/ct-ng.in           |    5     3     2     0 +++--
 4 files changed, 14 insertions(+), 8 deletions(-)
2008-06-01 21:12:00 +00:00
Yann E. MORIN"
86c54d8079 Merge the fortran stuff to trunk now it works!
Fortran is not supported for all targets, though. ARM at least does not work.

 /trunk/scripts/build/binutils.sh |    8     8     0     0 ++++++++
 /trunk/scripts/build/cc_gcc.sh   |   11     6     5     0 ++++++-----
 /trunk/scripts/crosstool.sh      |   10     9     1     0 +++++++++-
 /trunk/tools/addToolVersion.sh   |    3     3     0     0 +++
 /trunk/steps.mk                  |    2     2     0     0 ++
 /trunk/config/cc/gcc.in          |   16    16     0     0 ++++++++++++++++
 6 files changed, 44 insertions(+), 6 deletions(-)
2008-04-30 10:43:41 +00:00
Yann E. MORIN"
daa31a0c34 Building target libraries before the cross-compiler is available is doomed! Move build binutils' target libraries after final gcc.
Have a unique list of steps, it's easier to maintain.

 /trunk/scripts/build/binutils.sh |    8     5     3     0 +++++---
 /trunk/scripts/crosstool.sh      |   16     2    14     0 ++--------------
 /trunk/steps.mk                  |   29    16    13     0 ++++++++++++++++-------------
 3 files changed, 23 insertions(+), 30 deletions(-)
2008-04-28 07:38:36 +00:00
Yann E. MORIN"
54cca9f2ba Add the possibility to force the number of // jobs without reconfiguring. 2007-08-15 14:59:37 +00:00
Yann E. MORIN"
7131764f9c Remove any reference to libfloat. That has gone once and for all.
Rationale:
Most of the time, soft-float problems are caused by this sucker of gcc:
it has support for soft float for all of the targets I've tried so far,
but does not activate this code until you dwelve into half a dozen of
files to make it accept to build and link the support code...

So, yes: gcc has soft-float support. And again, yes: gcc is a sucker.
2007-07-30 20:02:13 +00:00
Yann E. MORIN"
20e08ffa90 Fix the step shortcuts (using a dash would confuse make). 2007-07-30 19:35:39 +00:00
Yann E. MORIN"
e9916d58e9 Rename all Makefiles used by ct-ng into (something).mk, to avoid confusion. 2007-07-15 09:09:04 +00:00