crosstool-ng/config
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
..
arch sh: require multilib 2016-06-09 17:12:49 -07:00
binutils binutils: Add binutils-2.26 2016-02-04 22:55:08 -08:00
cc gcc: Add --with-multilib-list option 2016-06-09 17:12:49 -07:00
companion_libs Merge pull request #296 from FreddieChopin/add-gmp-6.1.0 2016-01-06 10:19:23 -08:00
debug config: Add static link check to static options 2016-02-26 04:14:39 -08:00
global config: Remove CUSTOM_LOCATION_ROOT_DIR 2015-12-08 07:20:35 -08:00
kernel kernel: Updated kernel revisions 2016-02-26 23:45:36 -05:00
libc musl: config is broken for !EXPERIMENTAL 2016-06-09 17:12:49 -07:00
.gitignore repository: migrate old hg files over to git 2014-06-27 00:28:53 +02:00
backend.in kconfig: Update kconfig. Sync with Linux-4.2 2015-09-03 19:00:28 -07:00
binutils.in binutils: cleanup ELF/FLAT/FDPIC dependencies 2012-11-19 21:39:58 +01:00
cc.in config: Add config support for multiple compilers 2015-05-29 21:49:33 +01:00
companion_libs.in PPL: Remove support for PPL and CLooG/PPL 2015-11-29 17:36:58 -08:00
companion_tools.in comptools/make: Install 'gmake' symlink 2015-01-08 19:15:51 -08:00
config.in config: switch cc with libc in the config order 2014-05-11 13:38:12 +02:00
config.mk Fix samples using GMP 4.3.2. 2015-10-30 16:24:52 -07:00
debug.in config: fix style issues when source-ing files 2010-03-29 20:24:50 +02:00
global.in Fix tristate Kconfig options 2015-09-07 13:30:18 +02:00
kernel.in libc/mingw: replace mingw32 with generic mingw 2012-11-14 14:05:49 +01:00
libc.in Fix for issue #147: 2015-09-01 04:08:17 +02:00
target.in multilib: Determine which options may pass through. 2016-08-23 11:00:27 -07:00
test_suite.in all: unmark experimental features 2012-12-26 20:05:19 +01:00
toolchain.in config: Add static link check to static options 2016-02-26 04:14:39 -08:00