Commit Graph

28 Commits

Author SHA1 Message Date
Arnaud Vrac
f9ab04b63a Add mold linker build
Allows building the #mold linker, which can then be used in the
cross-toolchain by passing the -fuse-ld=mold to the gcc flags. It is
much faster than ld or gold.

This requires a C++20 compiler and cmake.

Initially implemented by Arnaud, and HC added configure check for cmake.

Outstanding task to validate compiler is C++20 compatible.

Signed-off-by: Arnaud Vrac <avrac@freebox.fr>
Signed-off-by: Hans-Christian Noren Egtvedt <egtvedt@samfundet.no>
2024-06-05 19:31:45 +12:00
Chris Packham
4442dc87dd config: Detect rsync presence at config time
Linux kernel versions newer than 5.3 require rsync in order to export
the UAPI headers. Commit f441a6bf ("linux: Add dependency on rsync for
Linux >= 5.3") attempted to address this with a check that runs when
crosstool-ng is built. That had the downside that if crosstool-ng was
built and packaged on a machine that had rsync then run on a machine
that didn't then the build would fail due to the missing rsync.
Conversely if the first machine didn't have rsync installed when
crosstool-ng was built then we would not offer newer kernel versions.

We can address this by checking for rsync when the toolchain
configuration is updated using some functionality in the newer Kconfig
that we've updated to previously.

Fixes #1940
Signed-off-by: Chris Packham <judge.packham@gmail.com>
2023-12-18 16:28:14 +13:00
Chris Packham
8fbf528681 config: Update environment variable usage
Upstream changes in the way kconfig handles environment variables means
we need to update our usage of them.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2021-02-02 20:06:32 +13:00
Nathan Chancellor
b0f14b0dfa config: Show crosstool-NG version in .config
This was previously available in 6c62da4803 but was then removed
in cb7fcbe1ef. Add it back since it will be helpful if the user
wants to hide the crosstool-NG version in the pkgversion.

To get the new version, a defconfig from "ct-ng savedefconfig" or
"ct-ng oldconfig" must be used in combination with "ct-ng menuconfig"
or "ct-ng nconfig".

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
2017-09-01 16:49:16 -07:00
Alexey Neyman
ff0a1a3da6 Switch gen-kconfig to new framework
Also:
- Move companion_* to comp_* to match the kconfig symbols
- Replace bootstrap with former gen-versions.sh
- Fold *.in.2 into their respective first parts; this moves common
  options to the end - if it is undesirable, inclusion of *.in
  can be moved where *.in.2 used to be (but that will also move
  version selection after common options).
- Retire addToolVersion.sh (may later replace with a more
  comprehensive script that tries to download the added tarballs,
  copy the patches and try to apply them, and create a version.desc).

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-07-08 10:57:56 -07:00
Alexey Neyman
2f286ce5ab Retire BACKEND stuff
... it is possible to just not set it in the configuration, why force
it? It just increases the complexity in Kconfig.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-04-23 00:24:41 -07:00
Yann E. MORIN"
dd60b1fa9d config: switch cc with libc in the config order
Some of the compiler options depend on the C library choice, (e.g.
whether core passes are needed).

Since the compiler menu comes before the C library menu, those options
may or may not be visible until the C library is chosen, leading to
either options being visible by the user (thus be puzzling as they would
not apply to his case), or invisible to him (yet again puzzling him).

Invert the order of the compiler and the C library in the menuconfig. It
anyway looks more rational, in the end.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2014-05-11 13:38:12 +02:00
Yann E. MORIN"
6c62da4803 kconfig: print version in .config
Having the crosstool-NG version in the .config helps in case we
want to reproduce the toolchain with the exact same version of
crosstool-NG.

This also reverts #bb73e7632b54.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-08-30 11:35:29 +02:00
Yann E. MORIN"
a257ff7da8 configure: add possibility to set arbitrary variable in check_for
If check_for is able to find the required prog/inc/lib, allow it to
set an arbitrary variable to 'y'. This variable is then pushed down
to the kconfig definition.

For example:
  has_or_abort prog=foobar kconfig=has_foobar

If foobar is available, it yields a kconfig variable defaulting to y:
    config CONFIGURE_has_foobar
        bool
        default y

If foobar is missing, it yields a kconfig variable defaulting to n:
    config CONFIGURE_has_foobar
        bool

Thus it is possible to depends on that variabel to show/hide options:
    config SOME_FEATURE
        bool
        prompt "Some feature"
        depends on CONFIGURE_has_foobar

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-05-26 22:51:03 +02:00
Yann E. MORIN"
db796067af config: add main menu title
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-05-10 23:56:11 +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"
5a6f29c1d1 config: do not force setting kernel and arch
In backend mode, only enforce the arch and/or kernel selection if the
upper-layer build system effectively forces the selection.
2010-04-01 19:45:28 +02:00
Yann E. MORIN"
d276ce2a4f config: fix style issues when source-ing files
Always enclose the sourced file between double-quotes (purely for
consistency; enclosing or not are both allowed by the kconfig language).
2010-03-29 20:24:50 +02:00
Yann E. MORIN"
712f0c9919 config: move backend-related options to their own file 2010-03-29 20:15:25 +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"
df2e088c8f companion_tools/autoconf: add autoconf tool
Initial version of adding autoconf as a companion tool.

Signed-off-by: Richard Strand <richard.strand@icomera.com>
[yann.morin.1998@anciens.enib.fr: use generic overide tools dir]
[yann.morin.1998@anciens.enib.fr: update menu entries]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-01-12 21:09:30 +01:00
Yann E. MORIN"
94dbc02a8b config: swap the debug and tools sub-menus
ltrace, in the debug sub-menu, selects libelf, in the tools sub-menu.
Inverse the order of the two sub-menus, so that the user does not have
to go back and forth between the two sub-menus.
2009-08-30 19:34:08 +02:00
Yann E. MORIN"
655be7da5b config: move down companion libraries sub-menu
Move the companion libraries sub-menu down the main menu.
That way, the user does not need to go back and forth in the menu
to change options set by the different components that select the
companion libraries (binutils, gcc, gdb).
2009-08-30 19:33:48 +02:00
Yann E. MORIN"
45747a6453 Merge the uClinux/noMMU stuff back to /trunk:
- merge Linux and uClinux back to a single kernel
- add ARCH_USE_MMU and acquainted config options that
  architectures can auto-select
- make binutils and elf2flt two "Binary utilities" that
  go in a single common sub-{menu,directory} structure

 -------- diffstat follows --------
 /trunk/scripts/build/kernel/uclinux.sh      |    2     0     2     0 -
 /trunk/scripts/build/kernel/linux.sh        |  206   204     2     0 +++++++++++++++++++++++++++++
 /trunk/scripts/build/kernel/linux-common.sh |  198     0   198     0 ----------------------------
 /trunk/scripts/build/binutils.sh            |  232     0   232     0 --------------------------------
 /trunk/scripts/build/elf2flt.sh             |  150     0   150     0 ---------------------
 /trunk/scripts/crosstool-NG.sh.in           |    6     4     2     0 +
 /trunk/config/kernel/linux.in               |  249   249     0     0 +++++++++++++++++++++++++++++++++++
 /trunk/config/kernel/linux.in-common        |  252     0   252     0 -----------------------------------
 /trunk/config/kernel/uclinux.in             |   21     0    21     0 ---
 /trunk/config/target.in                     |   23    22     1     0 +++
 /trunk/config/elf2flt.in                    |   49     0    49     0 -------
 /trunk/config/libc/glibc.in                 |    2     1     1     0
 /trunk/config/libc/eglibc.in                |    2     1     1     0
 /trunk/config/config.in                     |    1     0     1     0 -
 /trunk/config/arch/sh.in                    |    1     1     0     0 +
 /trunk/config/arch/arm.in                   |    2     1     1     0
 /trunk/config/arch/powerpc.in               |    1     1     0     0 +
 /trunk/config/arch/ia64.in                  |    1     1     0     0 +
 /trunk/config/arch/alpha.in                 |    1     1     0     0 +
 /trunk/config/arch/x86.in                   |    1     1     0     0 +
 /trunk/config/arch/mips.in                  |    1     1     0     0 +
 /trunk/config/arch/powerpc64.in             |    1     1     0     0 +
 22 files changed, 489 insertions(+), 913 deletions(-)
2009-05-20 20:13:13 +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"
38c549d748 Prepare for gcc-4.4:
- add 'companion_libs/' to hold all libraries needed to build gcc-4.3+ and gcc-4.4+
- move GMP & MPFR to 'companion_libs/'

 -------- diffstat follows --------
 /trunk/scripts/build/gmp.sh       |   85     0    85     0 ----------------------------
 /trunk/scripts/build/mpfr.sh      |  139     0   139     0 ---------------------------------------------
 /trunk/scripts/addToolVersion.sh  |    4     2     2     0
 /trunk/scripts/crosstool-NG.sh.in |    4     2     2     0
 /trunk/config/companion_libs.in   |   17    10     7     0 +++---
 /trunk/config/gmp_mpfr/gmp.in     |   32     0    32     0 ----------
 /trunk/config/gmp_mpfr/mpfr.in    |   42     0    42     0 --------------
 /trunk/config/config.in           |    2     1     1     0
 /trunk/config/gmp_mpfr.in         |   35     0    35     0 -----------
 9 files changed, 15 insertions(+), 345 deletions(-)
2009-05-03 21:10:15 +00:00
Yann E. MORIN"
82c9d1aceb Simplify the Tools and Debug facilities menu entries:
- each config file no longer have to define their own 'menuconfig foo - if FOO - endif' gym
 - each build script no longer has to say wether they are enabled
 - generation of the 'menuconfig' entries for the Tools and Debug facilities now uses the same code
Some re-ordering of the code to be consistent with the steps ordering (tools, then debug).

 /trunk/kconfig/kconfig.mk                  |   66    43    23     0 +++++++++++++++++++++++-------------
 /trunk/scripts/build/debug.sh              |   14     9     5     0 +++++---
 /trunk/scripts/build/tools/000-template.sh |    7     0     7     0 ----
 /trunk/scripts/build/tools/100-libelf.sh   |    3     0     3     0 --
 /trunk/scripts/build/tools/200-sstrip.sh   |    2     0     2     0 -
 /trunk/scripts/build/debug/000-template.sh |    7     0     7     0 ----
 /trunk/scripts/build/debug/100-dmalloc.sh  |    3     0     3     0 --
 /trunk/scripts/build/debug/400-ltrace.sh   |    3     0     3     0 --
 /trunk/scripts/build/debug/300-gdb.sh      |    3     0     3     0 --
 /trunk/scripts/build/debug/500-strace.sh   |    3     0     3     0 --
 /trunk/scripts/build/debug/200-duma.sh     |    3     0     3     0 --
 /trunk/scripts/build/tools.sh              |   14     9     5     0 +++++---
 /trunk/scripts/crosstool.sh                |    2     1     1     0
 /trunk/config/debug/ltrace.in              |   14     3    11     0 ++------
 /trunk/config/debug/dmalloc.in             |    9     1     8     0 +----
 /trunk/config/debug/gdb.in                 |    9     1     8     0 +----
 /trunk/config/debug/strace.in              |   10     1     9     0 -----
 /trunk/config/debug/duma.in                |   10     1     9     0 -----
 /trunk/config/tools/libelf.in              |   12     2    10     0 +------
 /trunk/config/tools/sstrip.in              |   10     1     9     0 -----
 /trunk/config/config.in                    |    4     2     2     0 +-
 21 files changed, 74 insertions(+), 134 deletions(-)
2008-10-10 14:30:44 +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"
26713d4210 Merge the build system to trunk: ct-ng is now installable:
- ./configure --prefix=/some/place
 - make
 - make install
 - export PATH="${PATH}:/some/place/bin"
 - ct-ng <action>
2007-07-01 19:04:20 +00:00
Yann E. MORIN"
51554bf237 Introduce the notion of tols facilities (none so far, sstrip coming right away...). 2007-06-01 16:55:33 +00:00
Yann E. MORIN"
8d3f0a8781 Debug facilities:
- add a framework to easily add new ones
  - add gdb as a first debug facility
  - add patches for gdb
After the kernel checked its installed headers, clean up the mess of .checked.* files.
Reorder scripts/crosstool.sh:
  - dump the configuration early
  - renice early
  - get info about build system early, when setting up the environment
  - when in cross or native, the host tools are those of the build system, and only in this case
  - elapsed time calculations moved to scripts/functions
Remove handling of the color: it's gone once and for all.
Update tools/addToolVersion.sh:
  - handle debug facilities
  - commonalise some code
  - remove dead tools (cygwin, tcc)
Point to my address for bug reports.
2007-05-17 16:22:51 +00:00
Yann E. MORIN"
5b96251953 Add the EXPERIMENTAL option to show options marked as such.
Add the four types of toolchains ct-ng is able to build as EXPERIMENTAL, except for CROSS which *is* functional.
Reorder menus accordingly.
2007-04-17 22:24:42 +00:00
Yann E. MORIN"
1906cf93f8 Add the full crosstool-NG sources to the new repository of its own.
You might just say: 'Yeah! crosstool-NG's got its own repo!".
Unfortunately, that's because the previous repo got damaged beyond repair and I had no backup.
That means I'm putting backups in place in the afternoon.
That also means we've lost history... :-(
2007-02-24 11:00:05 +00:00