Commit Graph

74 Commits

Author SHA1 Message Date
Alexey Neyman
5cf859d9d9 Add config flags for omitting 'arch' and 'vendor'
... parts of the config tuple. While here, remove parts that are
setting portions of the target tuple to a value that's already
the default.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-12-10 01:10:01 -08:00
Alexey Neyman
854b18b2ac Disallow selection of "both endianness"
... if the architecture only supports single endianness selection.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-12-07 14:48:08 -08:00
Alexey Neyman
d9afcd80fc Warn if architecture is empty on x86/32bit
as that defaults to i386, which will fail with glibc (and likely other
libcs).

Fixes #617.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-12-03 16:17:25 -08:00
Alexey Neyman
d1910b945b Restrict flat format to architectures that support it
Fixes #878

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-12-01 15:08:46 -08:00
Alexey Neyman
3b62fd4083 Doh, forgot one place to rename the BOTH_ENDIAN option
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-09-05 11:55:47 -07:00
Alexey Neyman
413f5f6100 Super-H multilib toolchain fixes
1. On SuperH, configuring GCC with explicit variant of the CPU
(like "sh4") limits the default set of multilibs to just that CPU
and requires --with-multilib-list to change. Allow for "unspecified"
variant, so that we can defer to GCC to determine the list.

2. Support toolchains with both endiannesses at the same time.

3. Add a SuperH/newlib sample

4. Add more flags processing for uClibc

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-09-03 12:11:23 -07:00
Alexey Neyman
64d5c254c7 Fix xtensa overlays
They are unpacked properly, but fail during build.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-07-08 21:43:27 -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
993b4acec5 Building packages using the new framework
(fails at building GMP off the VCS because it needs to run bootstrap scripts)

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-07-08 10:57:56 -07:00
Alexey Neyman
567277099a Fix the references to old config variables
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-07-08 10:57:56 -07:00
Alexey Neyman
c0162ff475 Make ARM32 option appear only if 32-bit is selected
Fixes #745

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-06-13 00:19:30 -07:00
Andrew Wygle
68d0cfd0e0 Added MSP430 architecture support.
Signed-off-by: Andrew Wygle <awygle@gmail.com>
2017-06-02 13:06:29 -07:00
Alexey Neyman
105e4b59b7 Get rid of config.gen
Instead, prepare the files as a part of bootstrap and install them.
This avoids rebuilding these files in each working directory; they
don't change anyway as they are generated from the same installed
source.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-04-22 18:41:50 -07:00
Alexey Neyman
e9661686a6 Remove explicit core passes selection for multilib
It is only used if this libc flavor uses a multilib iterator (and not
determines the multilibs itself). This class currently includes glibc,
uClibc, musl - but they explicitly select CC_CORE_PASSES_NEEDED anyway.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-03-28 14:47:33 -07:00
Alexey Neyman
63b2a19de4 Add an option to "demultilib"
It turns out buildroot does not currently accept a toolchain where a dynamic
linker does not reside in the multi-os-directory. Unfortunately this is
how glibc installs itself on AArch64 without any extra tricks.

So, provide an option to force everything into /lib or /usr/lib; patch to
buildroot will be worked on separately.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-03-17 14:31:17 -07:00
Alexey Neyman
431821741f Remove "pre-declaration" of config options
... these are apparently not needed with the current kconfig and only
result in warnings like "SYMBOL changed state" and "reassigning SYMBOL".

Perhaps, it was necessary to run kconfig without first generating
config.gen? But now all the targets that invoke $(CONF) have
`config_files` as a dependency.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-02-06 15:15:41 -08:00
Alexey Neyman
82072d0cbc multilib: Determine which options may pass through.
On some arches (e.g. MIPS) the options like -mabi do not work if
specified more than once (see the comment in 100-gcc.sh). Therefore,
we need to determine which of the options produced by <arch>.sh can
be passed to multilib builds and which must be removed (i.e., which
options vary among the multilibs).

This presents a chicken-and-egg problem. GCC developers, in their
infinite wisdom, do not allow arbitrary multilib specification to be
supplied to GCC's configure. Instead, the target (and sometimes some
extra options) determine the set of multilibs - which may include
different CPUs, different ABIs, different endianness, different FPUs,
different floating-point ABIs, ... That is, we don't know which parts
vary until we build GCC and ask it.

So, the solution implemented here is:
- For multilib builds, start with empty CT_ARCH_TARGET_CFLAGS/LDFLAGS.
- For multilib builds, require core pass 1. Pass 1 does not build any
  target binaries, so at that point, our target options have not been
  used yet.
- Provide an API to modify the environment variables for the steps that
  follow the current one.
- As a part of multilib-related housekeeping, determine the variable
  part of multilibs and filter out these options; pass the rest into
  CT_TARGET_CFLAGS/LDFLAGS.

This still does not handle extra dependencies between GCC options (like
-ma implying -mcpu=X -mtune=Y, etc.) but I feel that would complicate
matters too much. Let's leave this until there's a compelling case for
it.

Also, query GCC's sysroot suffix for targets that use it (SuperH,
for example) - the default multilib may not work if the command line
specifies the default option explicitly (%sysroot_suffix_spec is not
aware of multilib defaults).

Signed-off-by: Alexey Neyman <stilor@att.net>
2016-08-23 11:00:27 -07:00
Alexey Neyman
bb704f532a Allow --with-cpu/--with-tune for !arm.
The configure error mentioned in the commits that disable
--with-arch/--with-tune when --with-cpu is specified is specific to ARM
builds. For other architectures, it makes sense (hey, it even makes
sense for ARM - read 'info gcc'! - it is just a shortcoming of ARM
build, apparently).

Thus, add an arch setting ARCH_EXCLUSIVE_WITH_CPU (currently, set only
for ARM) that will trigger current behavior. Permit combinations of
--with-arch/cpu/tune for other arches.

Signed-off-by: Alexey Neyman <stilor@att.net>
2015-11-14 15:04:55 -08:00
Erico Nunes
230dc12285 avr: add support for AVR 8-bit architecture
This commit adds support for the Atmel AVR 8-bit RISC architecture.
This is the first 8-bit architecture to be added to crosstool-ng so the
configuration options for 8-bit architectures are added here as well.

gcc has had support for AVR for quite a while, at least since the 4.3
series for the currently popular ATmega microcontroler series.
The AVR architecture only supports bare-metal toolchains.

gcc for the AVR 8-bit architecture, usually referred to as avr-gcc, is
commonly used in conjunction with the avr-libc library which provides
additional resources for the Atmel AVR 8-bit microcontrollers.

avr-gcc can also be found as a supported package in some recent Linux
distributions.

This commit also closes #66

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
2015-06-21 20:49:10 -03:00
Yann E. MORIN
11acb6da21 arch: do not allow specifying both --with-cpu and --with-tune
Similarly to what we've just done to prevent both --with-arch and
--with-cpu, we do the same to prevent using both --with-cpu and
--with-tune at the same time, since --with-cpu should fully imply
the CPU to tune for (and gcc now errors out when both are specified.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Bryan Hundven <bryanhundven@gmail.com>
2015-06-10 20:56:12 +02:00
Yann E. MORIN
8a2eb07cf1 arch: do not allow specifying both --with-arch and --with-cpu
Normally, a specific CPU fully implies the architecture level. For
example, a cortec-a8 is forcibly an armv7, so spwecifying both is
redundant, and even dangerous (as incompatible values may be passed).

So far, gcc was pretty happy when both were specified at the same time,
and some time ago, it started being a warning, and only recently was it
turned into a hard error.

So, hide the architecture level prompt when a CPU has been specified.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2015-06-08 22:42:38 +02:00
Cody Schafer
13fcbed86e arch: add option to let gccdecide what floating point to use
Add an ARCH_FLOAT_AUTO option to avoid passing float options
to gcc and allow it to choose

Signed-off-by: Cody P Schafer <dev@codyps.com>
[yann.morin.1998@free.fr: slightly reword the commit log]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <088489641f4790262685.1399687813@localhost>
Patchwork-Id: 347584
2014-05-09 19:10:08 -07: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"
db5b6a4915 all: unmark experimental features
It's been some time now we've had those features, so unmark them
being experimental.

It does not mean everything is perfect, but may gather some more
testing of those features.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-12-26 20:05:19 +01:00
Yann E. MORIN"
114e6eb147 arch: re-order the entries in the float choice
Re-order the three entries in the float choice, in a more sensible
order, ie:
  - all hard-float options come first, then soft-float
  - options that use the FPU are marked so: hard and softfp
  - options that do not use the FPU are marked so: software

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-12-23 14:32:20 +01:00
Yann E. MORIN"
4bc4d99b8d config: add option to build multilib
Add a toolchain-wide option to enable multilib.

This is currently a noop, and will be implemented
in subsequent patches for each impacted components.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-23 23:25:43 +01:00
Yann E. MORIN"
67d2ab4fb6 config/target: enforce floating point support
Do not prompt for the type of floating-point support, if the
architecture did not explicitly stated that it did support it.

Reported-by: Morten Thunberg Svendsen <mts@doredevelopment.dk>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-25 23:59:29 +01:00
Yann E. MORIN"
5235cc4215 config/target: add float support selection
Changeset #149c33923f47 broke the architectures that do not
support the --with-float=X ./configure flag (in gcc). For example,
x86_64 does not support it.

Add a new blind config option that architectures can set to tell
they support floating point selection.

Reported-by: Morten Thunberg Svendsen <mts@doredevelopment.dk>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-25 23:57:55 +01:00
Yann E. MORIN"
88d01dd861 arch: rename the SUPPORT_XXX options
First, 'SUPPORT' should be spelled 'SUPPORTS'.

Second, 'SUPPORT_XXX' really means 'supports --with-xxx', so rename the
affected options accordingly. Update the affected archs to match the new
namings.

Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-30 00:25:22 +01:00
Yann E. MORIN"
2df9653787 config: introduce endianness as a string
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-14 19:13:00 +01:00
Yann E. MORIN"
4fc56b1d14 arch: add softfp support
Some architectures support a mixed hard/soft floating point, where
the compiler emits hardware floating point instructions, but passes
the operands in core (aka integer) registers.

For example, ARM supports this mode (to come in the next changeset).

Add support for softfp cross compilers to the GCC and GLIBC
configuration. Needed for Ubuntu and other distros that are softfp.

Signed-off-by: Michael Hope <michael.hope@linaro.org>
[yann.morin.1998@anciens.enib.fr: split the original patch]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-10-19 15:27:32 +13:00
Yann E. MORIN"
28e54116c3 scripts: introduce float type as a string
With the upcoming softfp support, the case..esac test would become
a bit convoluted if it were to test three different booleans.

Introduce a new blind string config option that defaults to the
selected floating point type used.

Signed-off-by: Michael Hope <michael.hope@linaro.org>
[yann.morin.1998@anciens.enib.fr: split the original patch]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-10-19 15:27:32 +13:00
Yann E. MORIN"
c009897aee misc: fix more typos here and there...
Reported-by: "Antony N. Pavlov" <antony@niisi.msk.ru>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-17 16:53:40 +02:00
Benoît THÉBAUDEAU"
96245813d8 kconfig: remove useless 'default n'
kconfig bools are disabled by default, so specifying 'default n' is useless and
noisy. This patch removes all occurrences of 'default n'.

Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
2011-05-31 16:27:39 +02:00
Yann E. MORIN"
2ba42cb171 config: reorder the architectures sub-menu
Re-organise the sub-menu so that:
 - the archs list comes first,
 - followed by archs generic options
 - followed by archs specific options

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-04-27 22:18:07 +02:00
Yann E. MORIN"
abab3f15b5 config/arch: re-organise architecture-specific options
Move the arch-specific options to the second-part of
the generated files, so they appear after the generic
options, but before the optimisations.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-09-11 12:38:12 +02:00
Yann E. MORIN"
43ca5b4095 config: add support for a second part of the generated choices
Some components have configuration options that can depend on
generic options, so they should go below those.

uClibc for example:
- has its own options (wchar...)
- uses the generic options (threads...)
- if linuxthreads chosen, offers two impls

So we need to be able to split the components options in 2,
one part that is above the generic options, and one part that
ends up below the generic options.
2010-06-08 23:26:54 +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"
4d4fbdcc61 config/arch: also export bitness as a string 2010-01-09 15:40:08 +01:00
Yann E. MORIN"
d5eb1f0dcf arch: cleanup the 32- and 64-bit selection 2009-11-17 22:29:50 +01:00
Yann E. MORIN"
1f18636343 arch: add hidden config knobs for 32- and 64-bit support and select
Add new hidden config knobs that architectures can select to
say whether they support 32- or 64-bit variants, and which
they default to.
2009-11-17 09:27:38 +01:00
Yann E. MORIN"
f7991ce0a8 config: add help for the MMU/noMMU entry 2009-10-21 23:45:55 +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"
f9f70c5ad6 Do not autodetect 64-bit archs, have them tell be 'select'-ing ARCH_64 in the configuration.
/trunk/scripts/crosstool.sh  |   12     5     7     0 +++++-------
 /trunk/docs/overview.txt     |    6     6     0     0 ++++++
 /trunk/config/target.in      |    4     4     0     0 ++++
 /trunk/config/arch/x86_64.in |    1     1     0     0 +
 /trunk/config/arch/ia64.in   |    1     1     0     0 +
 5 files changed, 17 insertions(+), 7 deletions(-)
2008-11-07 08:09:42 +00:00
Yann E. MORIN"
c7df47dcea In generated choice menus, move the selection options outside the choice menu.
/trunk/kconfig/kconfig.mk |   60    35    25     0 +++++++++++++++++++++++++++++++----------------------
 /trunk/config/kernel.in   |    6     0     6     0 -----
 /trunk/config/target.in   |    6     0     6     0 -----
 3 files changed, 35 insertions(+), 37 deletions(-)
2008-10-12 11:22:46 +00:00
Yann E. MORIN"
ed92de0b90 Make bare-metal a kernel selection.
/trunk/config/kernel.in |   22    14     8     0 ++++++++++++++--------
 /trunk/config/target.in |   13     0    13     0 -------------
 2 files changed, 14 insertions(+), 21 deletions(-)
2008-09-15 09:43:35 +00:00
Yann E. MORIN"
799672a641 Introduce a new EXPERIMENTAL feature: BARE_METAL.
This should ultimately llow to build bare-metal compilers, for targets that have no kernel and no C library.
Move the C library build script to their own sub-directory; introduce an empty build script for bare-metal.
Move the compiler build script to its own sub-directory.
Move the kernel build script to its own sub-directory; introduce an empty build script for bare-metal.
Update the ARM target tuples to enable bare-metal targets.
Add two ARM bare-metal samples.
Add latest Linux kernel versions.

 /trunk/scripts/build/kernel/none.sh              |   77     6    71     0 +----
 /trunk/scripts/build/cc/gcc.sh                   |   58    41    17     0 ++-
 /trunk/scripts/build/libc/none.sh                |  513     9   504     0 +-----------------------------
 /trunk/scripts/crosstool.sh                      |   17     9     8     0 +
 /trunk/scripts/functions                         |    6     4     2     0 +
 /trunk/scripts/showSamples.sh                    |    6     3     3     0
 /trunk/samples/arm-unknown-elf/crosstool.config  |  225   225     0     0 +++++++++++++
 /trunk/samples/arm-unknown-eabi/crosstool.config |  223   223     0     0 +++++++++++++
 /trunk/config/kernel/linux_headers_install.in    |   64    27    37     0 ++--
 /trunk/config/kernel.in                          |    9     8     1     0 +
 /trunk/config/toolchain.in                       |    1     1     0     0 +
 /trunk/config/cc/gcc.in                          |    3     3     0     0 +
 /trunk/config/debug/dmalloc.in                   |    1     1     0     0 +
 /trunk/config/debug/gdb.in                       |    4     3     1     0 +
 /trunk/config/debug/strace.in                    |    1     1     0     0 +
 /trunk/config/debug/duma.in                      |    1     1     0     0 +
 /trunk/config/cc.in                              |    8     8     0     0 +
 /trunk/config/target.in                          |   13    13     0     0 +
 /trunk/config/binutils.in                        |    1     1     0     0 +
 /trunk/config/gmp_mpfr.in                        |    1     1     0     0 +
 /trunk/config/libc.in                            |   17    11     6     0 +
 /trunk/arch/arm/functions                        |    3     1     2     0 -
 22 files changed, 600 insertions(+), 652 deletions(-)
2008-09-14 16:21:07 +00:00
Yann E. MORIN"
ebeba61f44 Move TARGET_LDFLAGS up with all target-dependent flags.
/trunk/config/target.in |    1     1     0     0 +
 1 file changed, 1 insertion(+)
2008-08-12 09:54:42 +00:00
Yann E. MORIN"
ef0f400c26 Introduce four new ARCH specific variables that CT_DoArchValues can set if they want:
- CT_ARCH_CC_CORE_EXTRA_CONFIG
  - CT_ARCH_CC_EXTRA_CONFIG
  - CT_ARCH_TARGET_CLFAGS
  - CT_ARCH_TARGET_LDFLAGS
This will hopefully enable architectures to specify specific flags.
PowerPC will need them to introduce SPE (coming RSN).

 /trunk/scripts/crosstool.sh |    2     2     0     0 ++
 /trunk/scripts/functions    |    4     2     2     0 ++--
 /trunk/docs/overview.txt    |   45    22    23     0 ++++++++++++++++++++++-----------------------
 /trunk/config/target.in     |   10    10     0     0 ++++++++++
 4 files changed, 36 insertions(+), 25 deletions(-)
2008-08-07 15:18:18 +00:00
Yann E. MORIN"
a865cf8aeb Re-order architecture specifics.
/trunk/config/target.in |   12     7     5     0 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
2008-06-30 11:33:52 +00:00