toolchain: use same gdb Config.in for internal/external toolchains
authorPeter Korsgaard <jacmet@sunsite.dk>
Mon, 15 Dec 2008 15:28:48 +0000 (15:28 -0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Mon, 15 Dec 2008 15:28:48 +0000 (15:28 -0000)
We used to use different gdb configs for internal and external toolchains
because mconf won't source the same file twice. This works, but is kind of
sub optimal, as people forget to keep them in sync.

Fix it to use the same file for both situations by shuffling around the
config options a bit. Should work identical to before (except for the newer
gdb versions available for ext).

toolchain/Config.in
toolchain/Config.in.1 [new file with mode: 0644]
toolchain/Config.in.2
toolchain/external-toolchain/Config.in
toolchain/external-toolchain/Config.in.2 [new file with mode: 0644]
toolchain/gdb/Config.in.2 [deleted file]
toolchain/gdb/gdb.mk

index ccea8c5e716a14989273ead03859c743898d089a..d66ce1d38a82531e200f35b8914a2a5cf2df0b86 100644 (file)
@@ -28,7 +28,16 @@ config BR2_TOOLCHAIN_SOURCE
 
 source "target/device/Config.in.toolchain"
 
-source "toolchain/Config.in.2"
+source "toolchain/Config.in.1"
 source "toolchain/external-toolchain/Config.in"
 
+# we want gdb config in the middle of both source and external
+# toolchains, but mconf won't let us source the same file twice,
+# so put it here instead
+source "toolchain/gdb/Config.in"
+comment "Common Toolchain Options"
+
+source "toolchain/Config.in.2"
+source "toolchain/external-toolchain/Config.in.2"
+
 endmenu
diff --git a/toolchain/Config.in.1 b/toolchain/Config.in.1
new file mode 100644 (file)
index 0000000..83bc710
--- /dev/null
@@ -0,0 +1,9 @@
+#
+
+if BR2_TOOLCHAIN_SOURCE
+source "toolchain/kernel-headers/Config.in"
+source "toolchain/uClibc/Config.in"
+source "toolchain/binutils/Config.in"
+source "toolchain/gcc/Config.in"
+source "toolchain/ccache/Config.in"
+endif
index c1733e96ee7e3e90e238e2a5eb09356f5c68daec..b8c1515069b51a1a49fbc1f132bba961a31e45ac 100644 (file)
@@ -1,15 +1,6 @@
 #
 
 if BR2_TOOLCHAIN_SOURCE
-source "toolchain/kernel-headers/Config.in"
-source "toolchain/uClibc/Config.in"
-source "toolchain/binutils/Config.in"
-source "toolchain/gcc/Config.in"
-source "toolchain/ccache/Config.in"
-source "toolchain/gdb/Config.in"
-
-comment "Common Toolchain Options"
-
 source "toolchain/elf2flt/Config.in"
 source "toolchain/mklibs/Config.in"
 source "toolchain/sstrip/Config.in"
index 6c957bc9b36f39cfe43486dcfc807bc2f92e499b..71dad0d767769266a586dba50447eb7513df5ca4 100644 (file)
@@ -1,9 +1,6 @@
 #
 
 if BR2_TOOLCHAIN_EXTERNAL
-comment "External Toolchain Options"
-
-
 config BR2_TOOLCHAIN_EXTERNAL_LIB_C
        string "The core C library from the external toolchain"
        default "libc.so.0"
@@ -27,82 +24,4 @@ config BR2_TOOLCHAIN_EXTERNAL_STRIP
         prompt "Strip shared libraries"
        help
          Strip shared libraries copied from the external toolchain.
-
-comment "Common Toolchain Options"
-
-source "toolchain/gdb/Config.in.2"
-
-config BR2_TOOLCHAIN_EXTERNAL_PATH
-       string "External toolchain path"
-       default "/path/to/staging_dir/usr"
-       help
-         Path to where the external toolchain is installed.
-
-config BR2_TOOLCHAIN_EXTERNAL_PREFIX
-       string "External toolchain prefix"
-       default "$(ARCH)-linux"
-       help
-         This the the external toolchain prefix. For example:
-           armeb-unknown-linux-gnu, mipsel-unknown-linux-gnu, etc.
-
-choice
-       prompt "Thread library implementation"
-       default BR2_EXT_PTHREADS_OLD
-       help
-         Select the version of libpthreads used in the external toolchain.
-
-       config BR2_EXT_PTHREADS_NONE
-               bool
-               prompt "none"
-
-       config BR2_EXT_PTHREADS
-               bool
-               prompt "linuxthreads"
-
-       config BR2_EXT_PTHREADS_OLD
-               bool
-               prompt "linuxthreads (stable/old)"
-
-       config BR2_EXT_PTHREADS_NATIVE
-               bool
-               prompt "Native POSIX Threading (NPTL)"
-endchoice
-
-config BR2_LARGEFILE
-       bool "Toolchain supports large files (> 2 GB) ?"
-       depends on !BR2_cris
-       default y
-       help
-         Set this option if the external toolchain supports large
-         files (> 2 GB)
-
-
-config BR2_INET_IPV6
-       bool "Toolchain supports IPv6 ?"
-       help
-         Set this option if the external toolchain supports IPv6.
-
-config BR2_INET_RPC
-       bool "Toolchain supports RPC ?"
-       help
-         Set this option if the external toolchain supports RPC.
-
-config BR2_SOFT_FLOAT
-       bool "Toolchain supports soft float ?"
-       depends on BR2_arm || BR2_armeb || BR2_mips || BR2_mipsel || BR2_powerpc
-       help
-         Set this option if the external toolchain supports soft float.
-
-config BR2_GCC_CROSS_CXX
-       bool "Toolchain has C++ cross-compiler ?"
-       help
-         Set this option if the external toolchain has a C++
-         cross-compiler.
-
-config BR2_TARGET_OPTIMIZATION
-       string "Target Optimizations"
-       default "-Os -pipe"
-       help
-         Optimizations to use when building for the target host.
-
 endif
diff --git a/toolchain/external-toolchain/Config.in.2 b/toolchain/external-toolchain/Config.in.2
new file mode 100644 (file)
index 0000000..6d17455
--- /dev/null
@@ -0,0 +1,77 @@
+#
+
+if BR2_TOOLCHAIN_EXTERNAL
+config BR2_TOOLCHAIN_EXTERNAL_PATH
+       string "External toolchain path"
+       default "/path/to/staging_dir/usr"
+       help
+         Path to where the external toolchain is installed.
+
+config BR2_TOOLCHAIN_EXTERNAL_PREFIX
+       string "External toolchain prefix"
+       default "$(ARCH)-linux"
+       help
+         This the the external toolchain prefix. For example:
+           armeb-unknown-linux-gnu, mipsel-unknown-linux-gnu, etc.
+
+choice
+       prompt "Thread library implementation"
+       default BR2_EXT_PTHREADS_OLD
+       help
+         Select the version of libpthreads used in the external toolchain.
+
+       config BR2_EXT_PTHREADS_NONE
+               bool
+               prompt "none"
+
+       config BR2_EXT_PTHREADS
+               bool
+               prompt "linuxthreads"
+
+       config BR2_EXT_PTHREADS_OLD
+               bool
+               prompt "linuxthreads (stable/old)"
+
+       config BR2_EXT_PTHREADS_NATIVE
+               bool
+               prompt "Native POSIX Threading (NPTL)"
+endchoice
+
+config BR2_LARGEFILE
+       bool "Toolchain supports large files (> 2 GB) ?"
+       depends on !BR2_cris
+       default y
+       help
+         Set this option if the external toolchain supports large
+         files (> 2 GB)
+
+
+config BR2_INET_IPV6
+       bool "Toolchain supports IPv6 ?"
+       help
+         Set this option if the external toolchain supports IPv6.
+
+config BR2_INET_RPC
+       bool "Toolchain supports RPC ?"
+       help
+         Set this option if the external toolchain supports RPC.
+
+config BR2_SOFT_FLOAT
+       bool "Toolchain supports soft float ?"
+       depends on BR2_arm || BR2_armeb || BR2_mips || BR2_mipsel || BR2_powerpc
+       help
+         Set this option if the external toolchain supports soft float.
+
+config BR2_GCC_CROSS_CXX
+       bool "Toolchain has C++ cross-compiler ?"
+       help
+         Set this option if the external toolchain has a C++
+         cross-compiler.
+
+config BR2_TARGET_OPTIMIZATION
+       string "Target Optimizations"
+       default "-Os -pipe"
+       help
+         Optimizations to use when building for the target host.
+
+endif
diff --git a/toolchain/gdb/Config.in.2 b/toolchain/gdb/Config.in.2
deleted file mode 100644 (file)
index 6eafa60..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-# Keep this in sync with Config.in
-# Why don't you use Config.in in the first place?
-
-comment "Gdb Options"
-
-config BR2_PACKAGE_GDB
-       bool "Build gdb debugger for the Target"
-       select BR2_PACKAGE_NCURSES
-       help
-           Build the full gdb debugger to run on the target.
-
-config BR2_PACKAGE_GDB_SERVER
-       bool "Build gdb server for the Target"
-       help
-           Build the gdbserver stub to run on the target.
-           A full gdb is needed to debug the progam.
-
-config BR2_PACKAGE_GDB_HOST
-       bool "Build gdb for the Host"
-       help
-           Build gdb to run on the host to debug programs run on the target.
-
-choice
-       prompt "GDB debugger Version"
-       default BR2_GDB_VERSION_6_3
-       depends on BR2_PACKAGE_GDB || BR2_PACKAGE_GDB_SERVER || BR2_PACKAGE_GDB_HOST
-       help
-         Select the version of gdb you wish to use.
-
-       config BR2_EXT_GDB_VERSION_6_2_1
-               bool "gdb 6.2.1"
-
-       config BR2_EXT_GDB_VERSION_6_3
-               bool "gdb 6.3"
-
-       config BR2_EXT_GDB_VERSION_6_4
-               bool "gdb 6.4"
-
-       config BR2_EXT_GDB_VERSION_6_5
-               bool "gdb 6.5"
-
-       config BR2_EXT_GDB_VERSION_SNAPSHOT
-               bool "gdb snapshot"
-
-endchoice
-
-config BR2_EXT_GDB_VERSION
-       string
-       default "6.2.1"    if BR2_EXT_GDB_VERSION_6_2_1
-       default "6.3"      if BR2_EXT_GDB_VERSION_6_3
-       default "6.4"      if BR2_EXT_GDB_VERSION_6_4
-       default "6.5"      if BR2_EXT_GDB_VERSION_6_5
-       default "6.6"      if BR2_EXT_GDB_VERSION_6_6
-       default "snapshot" if BR2_EXT_GDB_VERSION_SNAPSHOT
index 66e0b4179678fea2465aad07633cbbf3bbf5b853..f239dba01550149f565b215d680be315ad9df32e 100644 (file)
@@ -3,13 +3,8 @@
 # gdb
 #
 ######################################################################
-ifeq ($(BR2_TOOLCHAIN_SOURCE),y)
 GDB_VERSION:=$(strip $(subst ",, $(BR2_GDB_VERSION)))
 #"))
-else
-GDB_VERSION:=$(strip $(subst ",, $(BR2_EXT_GDB_VERSION)))
-#"))
-endif
 
 ifeq ($(GDB_VERSION),snapshot)
 # Be aware that this changes daily....