summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2011-10-14 20:44:24 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2011-10-14 20:44:24 (GMT)
commite2b9a81da34023db468b61caecf1b4799016f174 (patch)
tree6bdb3dc39eb5a490d49823b07b336a260cb0a6f9 /config
parent6e00f49ab44487694fd0e68a3f4b2c4f43f72afe (diff)
scripts: check host features with host compiler
Currently, we check host feature in ./configure. This works only for cross toolchains, but not for canadian toolchains. ./configure has absolutely no way to know what the host for the toolchain will be; only the build scripts know. So, move the headers & libraries checks from ./configure to the build scripts, early enough in the build, but not before we know the host compiler and other tools. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Diffstat (limited to 'config')
-rw-r--r--config/cc/gcc.in.23
-rw-r--r--config/debug/gdb.in.cross12
-rw-r--r--config/debug/gdb.in.native4
-rw-r--r--config/toolchain.in15
4 files changed, 7 insertions, 27 deletions
diff --git a/config/cc/gcc.in.2 b/config/cc/gcc.in.2
index 641478d..35a1070 100644
--- a/config/cc/gcc.in.2
+++ b/config/cc/gcc.in.2
@@ -44,9 +44,8 @@ config CC_STATIC_LIBSTDCXX
bool
prompt "Link libstdc++ statically into the gcc binary"
default y
- depends on CONFIGURE_static_link_ok
- depends on CONFIGURE_has_static_libstdcxx
depends on CC_GCC_4_4_or_later
+ select WANTS_STATIC_LINK
help
Newer gcc versions use the PPL library which is C++ code. Statically
linking libstdc++ increases the likeliness that the gcc binary will
diff --git a/config/debug/gdb.in.cross b/config/debug/gdb.in.cross
index 633def3..d9e80d4 100644
--- a/config/debug/gdb.in.cross
+++ b/config/debug/gdb.in.cross
@@ -3,18 +3,10 @@
config STATIC_TOOLCHAIN
select GDB_CROSS_STATIC if GDB_CROSS
-comment "Cross-gdb - disabled (requires expat; re-run ./configure to enable)"
- depends on !CONFIGURE_has_expat
-
-comment "Static cross-gdb - disabled (requires static expat; re-run ./configure to enable)"
- depends on STATIC_TOOLCHAIN && !CONFIGURE_has_static_expat
-
config GDB_CROSS
bool
prompt "Cross-gdb"
default y
- depends on CONFIGURE_has_expat
- depends on !STATIC_TOOLCHAIN || CONFIGURE_has_static_expat
select GDB_GDBSERVER if ! BARE_METAL
help
Build and install a cross-gdb for the target, to run on host.
@@ -24,8 +16,7 @@ if GDB_CROSS
config GDB_CROSS_STATIC
bool
prompt "Build a static cross gdb"
- depends on CONFIGURE_static_link_ok
- depends on CONFIGURE_has_static_expat
+ select WANTS_STATIC_LINK
help
A static cross gdb can be usefull if you debug on a machine that is
not the one that is used to compile the toolchain.
@@ -36,7 +27,6 @@ config GDB_CROSS_STATIC
config GDB_CROSS_PYTHON
bool
prompt "Enable python scripting"
- depends on CONFIGURE_has_python
depends on ! GDB_CROSS_STATIC
default y
help
diff --git a/config/debug/gdb.in.native b/config/debug/gdb.in.native
index a4144b4..8d2159a 100644
--- a/config/debug/gdb.in.native
+++ b/config/debug/gdb.in.native
@@ -10,13 +10,9 @@ config GDB_NATIVE
if GDB_NATIVE
-config GDB_NATIVE_NO_STATIC
- bool
-
config GDB_NATIVE_STATIC
bool
prompt "Build a static native gdb"
- depends on ! GDB_NATIVE_NO_STATIC
help
In case you have trouble with dynamic loading of shared libraries,
you will find that a static gdb comes in handy.
diff --git a/config/toolchain.in b/config/toolchain.in
index 5e45fc7..d034315 100644
--- a/config/toolchain.in
+++ b/config/toolchain.in
@@ -46,20 +46,14 @@ config SYSROOT_DIR_PREFIX
In fact, the sysroot path is constructed as:
${CT_PREFIX_DIR}/${CT_TARGET}/${CT_SYSROOT_DIR_PREFIX}/${CT_SYSROOT_NAME}
-# In case we need to add more conditions to enable static
-# toolchain, we'll be adding them here
-config STATIC_TOOLCHAIN_POSSIBLE
+config WANTS_STATIC_LINK
bool
- default y
- depends on CONFIGURE_static_link_ok
- depends on CONFIGURE_has_static_libstdcxx
- # Add new deps here! :-)
config STATIC_TOOLCHAIN
bool
prompt "Build Static Toolchain (EXPERIMENTAL)"
depends on EXPERIMENTAL
- depends on STATIC_TOOLCHAIN_POSSIBLE
+ select WANTS_STATIC_LINK
help
Build static host binaries.
@@ -68,8 +62,9 @@ config STATIC_TOOLCHAIN
you can say 'Y' here, and all the host tools will be linked statically.
The impacted tools are:
- - the GNU binutils
- - the cross-gdb
+ - the cross-binutils (GNU binutils, elf2flt)
+ - the cross-compiler (gcc)
+ - the cross-debugger (gdb)
The default is 'N', to build dynamicaly-linked host binaries.