Skip to contentSkip to conversation

Toolchain rework take 4

PATCH In review Gustavo Zacarias 5 participants 19 messages Dec 31, 2010 – Sep 12, 2011 Kbuild

lore
Share & tools
lore
#0 lore raw

cover Toolchain rework take 4

Fixed according to feedback.
Added symlink for staging.
Fixed some issues with gcc target.

#1 lore raw

[Buildroot] (no subject)

GIT: [PATCH 1/6] binutils: make it a proper package
GIT: [PATCH 2/6] gcc: install copies of libgcc, libstdc++ and libgcj to the sysroot
GIT: [PATCH 3/6] gdb: make it a proper package
GIT: [PATCH 4/6] oprofile: use new libbfd option
GIT: [PATCH 5/6] toolchain: do staging symlink
GIT: [PATCH 6/6] target gcc: cleanup

#3 lore raw

PATCH 1/6 binutils: make it a proper package

In reply to Gustavo Zacarias

* Convert binutils to a proper autotargets package

* Add version 2.21 and drop version 2.17

* Hook up packaged binutils for target gcc

* Build tools are on HOST_DIR now so change it

* Move cross/host gcc to HOST_DIR

* Drop kludge from commit 3c77bab2eeace3ee675bd745ca335fa3dd1630bb This is fixed in the next commit "gcc: install copies of libgcc, libstdc++ and libgcj to the sysroot" - tested for arm & x86_64 targets.

* TARGET_CROSS now pointed to HOST_DIR too

---
 Makefile                                           |    4 +-
 package/Config.in                                  |    1 +
 package/Makefile.in                                |    2 +-
 package/binutils/Config.in                         |   22 +++
 .../Config.in => package/binutils/Config.in.host   |   17 +-
 .../binutils-2.18}/100-makeinfo-version.patch      |    0
 .../binutils-2.18}/110-arm-eabi-conf.patch         |    0
 .../binutils-2.18}/300-001_ld_makefile_patch.patch |    0
 .../300-012_check_ldrunpath_length.patch           |    0
 .../binutils-2.19.1}/110-arm-eabi-conf.patch       |    0
 .../binutils/binutils-2.19.1}/120-sh-conf.patch    |    0
 .../300-001_ld_makefile_patch.patch                |    0
 .../300-012_check_ldrunpath_length.patch           |    0
 .../binutils-2.19}/110-arm-eabi-conf.patch         |    0
 .../binutils/binutils-2.19}/120-sh-conf.patch      |    0
 .../binutils-2.19}/300-001_ld_makefile_patch.patch |    0
 .../300-012_check_ldrunpath_length.patch           |    0
 .../binutils-2.20.1}/110-arm-eabi-conf.patch       |    0
 .../binutils/binutils-2.20.1}/120-sh-conf.patch    |    0
 .../300-001_ld_makefile_patch.patch                |    0
 .../300-012_check_ldrunpath_length.patch           |    0
 .../binutils-2.20.1}/400-arm_link_speed.patch      |    0
 .../binutils-2.20}/110-arm-eabi-conf.patch         |    0
 .../binutils/binutils-2.20}/120-sh-conf.patch      |    0
 .../binutils-2.20}/300-001_ld_makefile_patch.patch |    0
 .../300-012_check_ldrunpath_length.patch           |    0
 .../binutils-2.20}/400-arm_link_speed.patch        |    0
 .../binutils-2.21}/110-arm-eabi-conf.patch         |    0
 .../binutils/binutils-2.21}/120-sh-conf.patch      |    0
 .../binutils-2.21}/300-001_ld_makefile_patch.patch |    0
 .../300-012_check_ldrunpath_length.patch           |   21 +++
 package/binutils/binutils.mk                       |   56 ++++++
 toolchain/Makefile.in                              |    2 +-
 toolchain/binutils/2.17/100-uclibc-conf.patch      |  139 ---------------
 toolchain/binutils/2.17/110-arm-eabi-conf.patch    |   24 ---
 .../binutils/2.17/300-001_ld_makefile_patch.patch  |   50 ------
 .../binutils/2.17/300-006_better_file_error.patch  |   43 -----
 .../2.17/300-012_check_ldrunpath_length.patch      |   47 -----
 .../2.17/400-mips-ELF_MAXPAGESIZE-4K.patch         |   26 ---
 .../binutils/2.17/500-fix-makeinfo-check.patch     |   17 --
 toolchain/binutils/binutils.mk                     |  179 --------------------
 toolchain/gcc/Config.in.2                          |    4 +
 toolchain/gcc/gcc-uclibc-4.x.mk                    |   81 ++++------
 toolchain/toolchain-buildroot.mk                   |    1 -
 toolchain/toolchain-buildroot/Config.in            |    2 +-
 toolchain/toolchain-crosstool-ng.mk                |    1 -
 toolchain/toolchain-external.mk                    |    1 -
 47 files changed, 148 insertions(+), 592 deletions(-)
 create mode 100644 package/binutils/Config.in
 rename toolchain/binutils/Config.in => package/binutils/Config.in.host (83%)
 rename {toolchain/binutils/2.18 => package/binutils/binutils-2.18}/100-makeinfo-version.patch (100%)
 rename {toolchain/binutils/2.18 => package/binutils/binutils-2.18}/110-arm-eabi-conf.patch (100%)
 copy {toolchain/binutils/2.18 => package/binutils/binutils-2.18}/300-001_ld_makefile_patch.patch (100%)
 rename {toolchain/binutils/2.18 => package/binutils/binutils-2.18}/300-012_check_ldrunpath_length.patch (100%)
 copy {toolchain/binutils/2.19.1 => package/binutils/binutils-2.19.1}/110-arm-eabi-conf.patch (100%)
 copy {toolchain/binutils/2.19.1 => package/binutils/binutils-2.19.1}/120-sh-conf.patch (100%)
 rename {toolchain/binutils/2.19.1 => package/binutils/binutils-2.19.1}/300-001_ld_makefile_patch.patch (100%)
 rename {toolchain/binutils/2.19.1 => package/binutils/binutils-2.19.1}/300-012_check_ldrunpath_length.patch (100%)
 rename {toolchain/binutils/2.19 => package/binutils/binutils-2.19}/110-arm-eabi-conf.patch (100%)
 rename {toolchain/binutils/2.19 => package/binutils/binutils-2.19}/120-sh-conf.patch (100%)
 rename {toolchain/binutils/2.19 => package/binutils/binutils-2.19}/300-001_ld_makefile_patch.patch (100%)
 rename {toolchain/binutils/2.19 => package/binutils/binutils-2.19}/300-012_check_ldrunpath_length.patch (100%)
 rename {toolchain/binutils/2.20.1 => package/binutils/binutils-2.20.1}/110-arm-eabi-conf.patch (100%)
 rename {toolchain/binutils/2.20.1 => package/binutils/binutils-2.20.1}/120-sh-conf.patch (100%)
 rename {toolchain/binutils/2.20.1 => package/binutils/binutils-2.20.1}/300-001_ld_makefile_patch.patch (100%)
 rename {toolchain/binutils/2.20.1 => package/binutils/binutils-2.20.1}/300-012_check_ldrunpath_length.patch (100%)
 rename {toolchain/binutils/2.20.1 => package/binutils/binutils-2.20.1}/400-arm_link_speed.patch (100%)
 rename {toolchain/binutils/2.20 => package/binutils/binutils-2.20}/110-arm-eabi-conf.patch (100%)
 rename {toolchain/binutils/2.20 => package/binutils/binutils-2.20}/120-sh-conf.patch (100%)
 rename {toolchain/binutils/2.20 => package/binutils/binutils-2.20}/300-001_ld_makefile_patch.patch (100%)
 rename {toolchain/binutils/2.20 => package/binutils/binutils-2.20}/300-012_check_ldrunpath_length.patch (100%)
 rename {toolchain/binutils/2.20 => package/binutils/binutils-2.20}/400-arm_link_speed.patch (100%)
 rename {toolchain/binutils/2.19.1 => package/binutils/binutils-2.21}/110-arm-eabi-conf.patch (100%)
 rename {toolchain/binutils/2.19.1 => package/binutils/binutils-2.21}/120-sh-conf.patch (100%)
 rename {toolchain/binutils/2.18 => package/binutils/binutils-2.21}/300-001_ld_makefile_patch.patch (100%)
 create mode 100644 package/binutils/binutils-2.21/300-012_check_ldrunpath_length.patch
 create mode 100644 package/binutils/binutils.mk
 delete mode 100644 toolchain/binutils/2.17/100-uclibc-conf.patch
 delete mode 100644 toolchain/binutils/2.17/110-arm-eabi-conf.patch
 delete mode 100644 toolchain/binutils/2.17/300-001_ld_makefile_patch.patch
 delete mode 100644 toolchain/binutils/2.17/300-006_better_file_error.patch
 delete mode 100644 toolchain/binutils/2.17/300-012_check_ldrunpath_length.patch
 delete mode 100644 toolchain/binutils/2.17/400-mips-ELF_MAXPAGESIZE-4K.patch
 delete mode 100644 toolchain/binutils/2.17/500-fix-makeinfo-check.patch
 delete mode 100644 toolchain/binutils/binutils.mk
Makefile +2 -2
index 6d6e836..e634848 100644
@@ -245,7 +245,7 @@ BASE_TARGETS += host-ccache
 endif
 
 ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
-BASE_TARGETS += uclibc-configured binutils cross_compiler uclibc-target-utils kernel-headers
+BASE_TARGETS += uclibc-configured host-binutils cross_compiler uclibc-target-utils kernel-headers
 else
 BASE_TARGETS += uclibc
 endif
@@ -618,7 +618,7 @@ endif
 
 configured: dirs kernel-headers uclibc-config busybox-config linux26-config
 
-prepatch:	gcc-patched binutils-patched gdb-patched uclibc-patched
+prepatch:	gcc-patched gdb-patched uclibc-patched
 
 cross: $(BASE_TARGETS)
 
package/Config.in +1 -0
index ec5d73e..da5b62b 100644
@@ -35,6 +35,7 @@ endmenu
 menu "Development tools"
 source "package/autoconf/Config.in"
 source "package/automake/Config.in"
+source "package/binutils/Config.in"
 source "package/bison/Config.in"
 source "package/bsdiff/Config.in"
 source "package/ccache/Config.in"
package/Makefile.in +1 -1
index 7ff1700..a1e290f 100644
@@ -109,7 +109,7 @@ TARGET_CXXFLAGS=$(TARGET_CFLAGS)
 TARGET_SYSROOT_OPT=--sysroot=$(STAGING_DIR)
 
 ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
-TARGET_CROSS=$(STAGING_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-
+TARGET_CROSS=$(HOST_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y)
 TOOLCHAIN_EXTERNAL_PREFIX=$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX))
 ifeq ($(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y)
package/binutils/Config.in new file +22 -0
new file mode 100644
index 0000000..83d3364
@@ -0,0 +1,22 @@
+config BR2_PACKAGE_BINUTILS
+	bool "binutils libbfd"
+	depends on BR2_TOOLCHAIN_BUILDROOT
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
+	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE
+	help
+	  Install libbfd from binutils in the target.
+	  
+	  This is used by oprofile to avoid a full-blown target binutils.
+
+config BR2_PACKAGE_BINUTILS_TARGET
+	bool "binutils full"
+	depends on BR2_TOOLCHAIN_BUILDROOT
+	select BR2_PACKAGE_BINUTILS
+	help
+	  The GNU Binutils are a collection of binary tools:
+
+	  ld - the GNU linker.
+	  as - the GNU assembler.
+	  and others...
+	  
+	  http://www.gnu.org/software/binutils/
package/binutils/Config.in.host renamed from toolchain/binutils/Config.in +7 -10
similarity index 83%
rename from toolchain/binutils/Config.in
rename to package/binutils/Config.in.host
index 165b43e..4a5e8ef 100644
@@ -1,18 +1,11 @@
-# Choose binutils version.
-
 comment "Binutils Options"
 
 choice
 	prompt "Binutils Version"
-	default BR2_BINUTILS_VERSION_2_20_1
+	default BR2_BINUTILS_VERSION_2_21
 	help
 	  Select the version of binutils you wish to use.
 
-	config BR2_BINUTILS_VERSION_2_17
-		depends on !BR2_avr32
-		depends on BR2_DEPRECATED
-		bool "binutils 2.17"
-
 	config BR2_BINUTILS_VERSION_2_18
 		depends on !BR2_avr32
 		depends on BR2_DEPRECATED
@@ -40,19 +33,23 @@ choice
 		depends on !BR2_avr32
 		bool "binutils 2.20.1"
 
+	config BR2_BINUTILS_VERSION_2_21
+		depends on !BR2_avr32
+		bool "binutils 2.21"
+
 endchoice
 
 config BR2_BINUTILS_VERSION
 	string
-	default "2.17"		if BR2_BINUTILS_VERSION_2_17
 	default "2.18"		if BR2_BINUTILS_VERSION_2_18
 	default "2.18-avr32-1.0.1" if BR2_BINUTILS_VERSION_2_18_AVR32_1_0_1
 	default "2.19"		if BR2_BINUTILS_VERSION_2_19
 	default "2.19.1"	if BR2_BINUTILS_VERSION_2_19_1
 	default "2.20"		if BR2_BINUTILS_VERSION_2_20
 	default "2.20.1"	if BR2_BINUTILS_VERSION_2_20_1
+	default "2.21"		if BR2_BINUTILS_VERSION_2_21
 
-config BR2_EXTRA_BINUTILS_CONFIG_OPTIONS
+config BR2_BINUTILS_EXTRA_CONFIG_OPTIONS
 	string "Additional binutils options"
 	default ""
 	help
package/binutils/binutils-2.18/100-makeinfo-version.patch renamed from toolchain/binutils/2.18/100-makeinfo-version.patch +0 -0
similarity index 100%
rename from toolchain/binutils/2.18/100-makeinfo-version.patch
rename to package/binutils/binutils-2.18/100-makeinfo-version.patch
package/binutils/binutils-2.18/110-arm-eabi-conf.patch renamed from toolchain/binutils/2.18/110-arm-eabi-conf.patch +0 -0
similarity index 100%
rename from toolchain/binutils/2.18/110-arm-eabi-conf.patch
rename to package/binutils/binutils-2.18/110-arm-eabi-conf.patch
package/binutils/binutils-2.18/300-001_ld_makefile_patch.patch renamed from toolchain/binutils/2.18/300-001_ld_makefile_patch.patch +0 -0
similarity index 100%
copy from toolchain/binutils/2.18/300-001_ld_makefile_patch.patch
copy to package/binutils/binutils-2.18/300-001_ld_makefile_patch.patch
package/binutils/binutils-2.18/300-012_check_ldrunpath_length.patch renamed from toolchain/binutils/2.18/300-012_check_ldrunpath_length.patch +0 -0
similarity index 100%
rename from toolchain/binutils/2.18/300-012_check_ldrunpath_length.patch
rename to package/binutils/binutils-2.18/300-012_check_ldrunpath_length.patch
package/binutils/binutils-2.19.1/110-arm-eabi-conf.patch renamed from toolchain/binutils/2.19.1/110-arm-eabi-conf.patch +0 -0
similarity index 100%
copy from toolchain/binutils/2.19.1/110-arm-eabi-conf.patch
copy to package/binutils/binutils-2.19.1/110-arm-eabi-conf.patch
package/binutils/binutils-2.19.1/120-sh-conf.patch renamed from toolchain/binutils/2.19.1/120-sh-conf.patch +0 -0
similarity index 100%
copy from toolchain/binutils/2.19.1/120-sh-conf.patch
copy to package/binutils/binutils-2.19.1/120-sh-conf.patch
package/binutils/binutils-2.19.1/300-001_ld_makefile_patch.patch renamed from toolchain/binutils/2.19.1/300-001_ld_makefile_patch.patch +0 -0
similarity index 100%
rename from toolchain/binutils/2.19.1/300-001_ld_makefile_patch.patch
rename to package/binutils/binutils-2.19.1/300-001_ld_makefile_patch.patch
package/binutils/binutils-2.19.1/300-012_check_ldrunpath_length.patch renamed from toolchain/binutils/2.19.1/300-012_check_ldrunpath_length.patch +0 -0
similarity index 100%
rename from toolchain/binutils/2.19.1/300-012_check_ldrunpath_length.patch
rename to package/binutils/binutils-2.19.1/300-012_check_ldrunpath_length.patch
package/binutils/binutils-2.19/110-arm-eabi-conf.patch renamed from toolchain/binutils/2.19/110-arm-eabi-conf.patch +0 -0
similarity index 100%
rename from toolchain/binutils/2.19/110-arm-eabi-conf.patch
rename to package/binutils/binutils-2.19/110-arm-eabi-conf.patch
package/binutils/binutils-2.19/120-sh-conf.patch renamed from toolchain/binutils/2.19/120-sh-conf.patch +0 -0
similarity index 100%
rename from toolchain/binutils/2.19/120-sh-conf.patch
rename to package/binutils/binutils-2.19/120-sh-conf.patch
package/binutils/binutils-2.19/300-001_ld_makefile_patch.patch renamed from toolchain/binutils/2.19/300-001_ld_makefile_patch.patch +0 -0
similarity index 100%
rename from toolchain/binutils/2.19/300-001_ld_makefile_patch.patch
rename to package/binutils/binutils-2.19/300-001_ld_makefile_patch.patch
package/binutils/binutils-2.19/300-012_check_ldrunpath_length.patch renamed from toolchain/binutils/2.19/300-012_check_ldrunpath_length.patch +0 -0
similarity index 100%
rename from toolchain/binutils/2.19/300-012_check_ldrunpath_length.patch
rename to package/binutils/binutils-2.19/300-012_check_ldrunpath_length.patch
package/binutils/binutils-2.20.1/110-arm-eabi-conf.patch renamed from toolchain/binutils/2.20.1/110-arm-eabi-conf.patch +0 -0
similarity index 100%
rename from toolchain/binutils/2.20.1/110-arm-eabi-conf.patch
rename to package/binutils/binutils-2.20.1/110-arm-eabi-conf.patch
package/binutils/binutils-2.20.1/120-sh-conf.patch renamed from toolchain/binutils/2.20.1/120-sh-conf.patch +0 -0
similarity index 100%
rename from toolchain/binutils/2.20.1/120-sh-conf.patch
rename to package/binutils/binutils-2.20.1/120-sh-conf.patch
package/binutils/binutils-2.20.1/300-001_ld_makefile_patch.patch renamed from toolchain/binutils/2.20.1/300-001_ld_makefile_patch.patch +0 -0
similarity index 100%
rename from toolchain/binutils/2.20.1/300-001_ld_makefile_patch.patch
rename to package/binutils/binutils-2.20.1/300-001_ld_makefile_patch.patch
package/binutils/binutils-2.20.1/300-012_check_ldrunpath_length.patch renamed from toolchain/binutils/2.20.1/300-012_check_ldrunpath_length.patch +0 -0
similarity index 100%
rename from toolchain/binutils/2.20.1/300-012_check_ldrunpath_length.patch
rename to package/binutils/binutils-2.20.1/300-012_check_ldrunpath_length.patch
package/binutils/binutils-2.20.1/400-arm_link_speed.patch renamed from toolchain/binutils/2.20.1/400-arm_link_speed.patch +0 -0
similarity index 100%
rename from toolchain/binutils/2.20.1/400-arm_link_speed.patch
rename to package/binutils/binutils-2.20.1/400-arm_link_speed.patch
package/binutils/binutils-2.20/110-arm-eabi-conf.patch renamed from toolchain/binutils/2.20/110-arm-eabi-conf.patch +0 -0
similarity index 100%
rename from toolchain/binutils/2.20/110-arm-eabi-conf.patch
rename to package/binutils/binutils-2.20/110-arm-eabi-conf.patch
package/binutils/binutils-2.20/120-sh-conf.patch renamed from toolchain/binutils/2.20/120-sh-conf.patch +0 -0
similarity index 100%
rename from toolchain/binutils/2.20/120-sh-conf.patch
rename to package/binutils/binutils-2.20/120-sh-conf.patch
package/binutils/binutils-2.20/300-001_ld_makefile_patch.patch renamed from toolchain/binutils/2.20/300-001_ld_makefile_patch.patch +0 -0
similarity index 100%
rename from toolchain/binutils/2.20/300-001_ld_makefile_patch.patch
rename to package/binutils/binutils-2.20/300-001_ld_makefile_patch.patch
package/binutils/binutils-2.20/300-012_check_ldrunpath_length.patch renamed from toolchain/binutils/2.20/300-012_check_ldrunpath_length.patch +0 -0
similarity index 100%
rename from toolchain/binutils/2.20/300-012_check_ldrunpath_length.patch
rename to package/binutils/binutils-2.20/300-012_check_ldrunpath_length.patch
package/binutils/binutils-2.20/400-arm_link_speed.patch renamed from toolchain/binutils/2.20/400-arm_link_speed.patch +0 -0
similarity index 100%
rename from toolchain/binutils/2.20/400-arm_link_speed.patch
rename to package/binutils/binutils-2.20/400-arm_link_speed.patch
package/binutils/binutils-2.21/110-arm-eabi-conf.patch renamed from toolchain/binutils/2.19.1/110-arm-eabi-conf.patch +0 -0
similarity index 100%
rename from toolchain/binutils/2.19.1/110-arm-eabi-conf.patch
rename to package/binutils/binutils-2.21/110-arm-eabi-conf.patch
package/binutils/binutils-2.21/120-sh-conf.patch renamed from toolchain/binutils/2.19.1/120-sh-conf.patch +0 -0
similarity index 100%
rename from toolchain/binutils/2.19.1/120-sh-conf.patch
rename to package/binutils/binutils-2.21/120-sh-conf.patch
package/binutils/binutils-2.21/300-001_ld_makefile_patch.patch renamed from toolchain/binutils/2.18/300-001_ld_makefile_patch.patch +0 -0
similarity index 100%
rename from toolchain/binutils/2.18/300-001_ld_makefile_patch.patch
rename to package/binutils/binutils-2.21/300-001_ld_makefile_patch.patch
package/binutils/binutils-2.21/300-012_check_ldrunpath_length.patch new file +21 -0
new file mode 100644
index 0000000..df78310
@@ -0,0 +1,21 @@
+diff -Nura binutils-2.21.orig/ld/emultempl/elf32.em binutils-2.21/ld/emultempl/elf32.em
+--- binutils-2.21.orig/ld/emultempl/elf32.em	2010-10-29 09:10:36.000000000 -0300
++++ binutils-2.21/ld/emultempl/elf32.em	2010-12-10 09:26:56.746102724 -0300
+@@ -1270,6 +1270,8 @@
+ 	      && command_line.rpath == NULL)
+ 	    {
+ 	      lib_path = (const char *) getenv ("LD_RUN_PATH");
++	      if ((lib_path) && (strlen (lib_path) == 0))
++	      	lib_path = NULL;
+ 	      if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
+ 						      force))
+ 		break;
+@@ -1497,6 +1499,8 @@
+   rpath = command_line.rpath;
+   if (rpath == NULL)
+     rpath = (const char *) getenv ("LD_RUN_PATH");
++  if ((rpath) && (strlen (rpath) == 0))
++  	rpath = NULL;
+ 
+   for (abfd = link_info.input_bfds; abfd; abfd = abfd->link_next)
+     if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
package/binutils/binutils.mk new file +56 -0

56 lines not on this page · raw message

toolchain/Makefile.in +1 -1
index 2cb6e95..a7ca558 100644
@@ -1,6 +1,6 @@
 BR2_CONFIGURE_DEVEL_SYSROOT=--with-sysroot=$(TOOLCHAIN_DIR)/uClibc_dev/
 BR2_CONFIGURE_STAGING_SYSROOT=--with-sysroot=$(STAGING_DIR)
-BR2_CONFIGURE_BUILD_TOOLS=--with-build-time-tools=$(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/bin
+BR2_CONFIGURE_BUILD_TOOLS=--with-build-time-tools=$(HOST_DIR)/usr/$(REAL_GNU_TARGET_NAME)/bin
 
 # gcc has a bunch of needed stuff....
 include toolchain/gcc/Makefile.in
toolchain/binutils/2.17/100-uclibc-conf.patch deleted +0 -139

139 lines not on this page · raw message

toolchain/binutils/2.17/110-arm-eabi-conf.patch deleted +0 -24
deleted file mode 100644
index be85ceb..0000000
@@ -1,24 +0,0 @@
-diff -urN binutils-2.16.91.0.7.orig/configure binutils-2.16.91.0.7/configure
---- binutils-2.16.91.0.7.orig/configure	2006-05-31 14:54:24.000000000 +0300
-+++ binutils-2.16.91.0.7/configure	2006-05-31 14:55:53.000000000 +0300
-@@ -1299,7 +1299,7 @@
-   arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
-     noconfigdirs="$noconfigdirs target-libffi target-qthreads"
-     ;;
--  arm*-*-linux-gnueabi)
-+  arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
-     noconfigdirs="$noconfigdirs target-libffi target-qthreads"
-     noconfigdirs="$noconfigdirs target-libjava target-libobjc"
-     ;;
-diff -urN binutils-2.16.91.0.7.orig/configure.in binutils-2.16.91.0.7/configure.in
---- binutils-2.16.91.0.7.orig/configure.in	2006-05-31 14:54:24.000000000 +0300
-+++ binutils-2.16.91.0.7/configure.in	2006-05-31 14:55:53.000000000 +0300
-@@ -497,7 +497,7 @@
-   arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
-     noconfigdirs="$noconfigdirs target-libffi target-qthreads"
-     ;;
--  arm*-*-linux-gnueabi)
-+  arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
-     noconfigdirs="$noconfigdirs target-libffi target-qthreads"
-     noconfigdirs="$noconfigdirs target-libjava target-libobjc"
-     ;;
toolchain/binutils/2.17/300-001_ld_makefile_patch.patch deleted +0 -50

50 lines not on this page · raw message

toolchain/binutils/2.17/300-006_better_file_error.patch deleted +0 -43

43 lines not on this page · raw message

toolchain/binutils/2.17/300-012_check_ldrunpath_length.patch deleted +0 -47

47 lines not on this page · raw message

toolchain/binutils/2.17/400-mips-ELF_MAXPAGESIZE-4K.patch deleted +0 -26
deleted file mode 100644
index 5959c71..0000000
@@ -1,26 +0,0 @@
---- binutils/bfd/elf32-mips.c~
-+++ binutils/bfd/elf32-mips.c
-@@ -1613,7 +1613,9 @@
- 
- /* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
-    page sizes of up to that limit, so we need to respect it.  */
--#define ELF_MAXPAGESIZE			0x10000
-+/*#define ELF_MAXPAGESIZE			0x10000*/
-+/* Use 4K to shrink the elf header.  NOT for general use! */
-+#define ELF_MAXPAGESIZE			0x1000
- #define elf32_bed			elf32_tradbed
- 
- /* Include the target file again for this target.  */
---- binutils/bfd/elfn32-mips.c~
-+++ binutils/bfd/elfn32-mips.c
-@@ -2399,7 +2399,9 @@
- 
- /* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
-    page sizes of up to that limit, so we need to respect it.  */
--#define ELF_MAXPAGESIZE			0x10000
-+/*#define ELF_MAXPAGESIZE			0x10000*/
-+/* Use 4K to shrink the elf header.  NOT for general use! */
-+#define ELF_MAXPAGESIZE			0x1000
- #define elf32_bed			elf32_tradbed
- 
- /* Include the target file again for this target.  */
toolchain/binutils/2.17/500-fix-makeinfo-check.patch deleted +0 -17
deleted file mode 100644
index c4c8888..0000000
@@ -1,17 +0,0 @@
----
- configure |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: binutils-2.17/configure
-===================================================================
---- binutils-2.17.orig/configure
-+++ binutils-2.17/configure
-@@ -3637,7 +3637,7 @@
-     # For an installed makeinfo, we require it to be from texinfo 4.4 or
-     # higher, else we use the "missing" dummy.
-     if ${MAKEINFO} --version \
--       | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[4-9]|[5-9])' >/dev/null 2>&1; then
-+       | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[4-9]|4\.[1-9][0-9]|[5-9])' >/dev/null 2>&1; then
-       :
-     else
-       MAKEINFO="$MISSING makeinfo"
toolchain/binutils/binutils.mk deleted +0 -179

179 lines not on this page · raw message

toolchain/gcc/Config.in.2 +4 -0
index d9ebfcd..9676fdf 100644
@@ -1,6 +1,10 @@
 config BR2_PACKAGE_GCC_TARGET
 	bool "native toolchain in the target filesystem"
 	depends on BR2_HAVE_DEVFILES
+	select BR2_PACKAGE_BINUTILS_TARGET
+	select BR2_PACKAGE_MPC if BR2_GCC_VERSION_4_5_X
+	select BR2_PACKAGE_MPFR
+	select BR2_PACKAGE_GMP
 	help
 	  If you want the target system to be able to run
 	  binutils/gcc and compile native code, say Y here.
toolchain/gcc/gcc-uclibc-4.x.mk +32 -49

225 lines not on this page · raw message

toolchain/toolchain-buildroot.mk +0 -1
index f12a480..c611562 100644
@@ -1,7 +1,6 @@
 # Include files required for the internal toolchain backend
 
 include toolchain/dependencies/dependencies.mk
-include toolchain/binutils/binutils.mk
 include toolchain/elf2flt/elf2flt.mk
 include toolchain/gcc/gcc-uclibc-4.x.mk
 include toolchain/gdb/gdb.mk
toolchain/toolchain-buildroot/Config.in +1 -1
index c458251..3894890 100644
@@ -3,6 +3,6 @@
 if BR2_TOOLCHAIN_BUILDROOT
 source "toolchain/kernel-headers/Config.in"
 source "toolchain/uClibc/Config.in"
-source "toolchain/binutils/Config.in"
+source "package/binutils/Config.in.host"
 source "toolchain/gcc/Config.in"
 endif
toolchain/toolchain-crosstool-ng.mk +0 -1
index 1befff2..e480da9 100644
@@ -2,7 +2,6 @@
 
 # Explicit ordering:
 include toolchain/helpers.mk
-include toolchain/binutils/binutils.mk
 include toolchain/dependencies/dependencies.mk
 include toolchain/elf2flt/elf2flt.mk
 include toolchain/gcc/gcc-uclibc-4.x.mk
toolchain/toolchain-external.mk +0 -1
index c43618b..d67405b 100644
@@ -1,7 +1,6 @@
 # Required includes for the external toolchain backend
 
 include toolchain/helpers.mk
-include toolchain/binutils/binutils.mk
 include toolchain/dependencies/dependencies.mk
 include toolchain/elf2flt/elf2flt.mk
 include toolchain/gcc/gcc-uclibc-4.x.mk
Signature · 1 line
1.7.2.2
#4 lore raw

PATCH 1/6 binutils: make it a proper package

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Gustavo" == Gustavo Zacarias <[email protected]> writes:

Gustavo> * Convert binutils to a proper autotargets package Gustavo> * Add version 2.21 and drop version 2.17

Gustavo> * Hook up packaged binutils for target gcc

Gustavo> * Build tools are on HOST_DIR now so change it

Gustavo> * Move cross/host gcc to HOST_DIR

Gustavo> * Drop kludge from commit 3c77bab2eeace3ee675bd745ca335fa3dd1630bb

 Gustavo>   This is fixed in the next commit "gcc: install copies of libgcc,
 Gustavo>   libstdc++ and libgcj to the sysroot" - tested for arm & x86_64
 Gustavo>   targets.

Gustavo> * TARGET_CROSS now pointed to HOST_DIR too

Committed with small changes to Config.in, thanks!

Signature · 1 line
Bye, Peter Korsgaard
#5 lore raw

PATCH 2/6 gcc: install copies of libgcc, libstdc++ and libgcj to the sysroot

In reply to Gustavo Zacarias

We want to keep a copy around for the future SDK functionality.

Also it's a better fix for bug #1051.

---
 toolchain/gcc/gcc-uclibc-4.x.mk |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
toolchain/gcc/gcc-uclibc-4.x.mk +8 -0
index 0d6f2ae..633b8aa 100644
@@ -424,6 +424,8 @@ ifeq ($(BR2_GCC_SHARED_LIBGCC),y)
 	# These go in /lib, so...
 	rm -rf $(TARGET_DIR)/usr/lib/libgcc_s*.so*
 	-cp -dpf $(HOST_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib*/libgcc_s* \
+		$(STAGING_DIR)/lib/
+	-cp -dpf $(HOST_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib*/libgcc_s* \
 		$(TARGET_DIR)/lib/
 	-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/lib/libgcc_s*
 endif
@@ -431,14 +433,20 @@ ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
 ifeq ($(BR2_GCC_SHARED_LIBGCC),y)
 	mkdir -p $(TARGET_DIR)/usr/lib
 	-cp -dpf $(HOST_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib*/libstdc++.so* \
+		$(STAGING_DIR)/usr/lib/
+	-cp -dpf $(HOST_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib*/libstdc++.so* \
 		$(TARGET_DIR)/usr/lib/
 	-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libstdc++.so*
 endif
 endif
 ifeq ($(BR2_INSTALL_LIBGCJ),y)
+	cp -dpf $(HOST_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib*/libgcj.so* $(STAGING_DIR)/usr/lib/
 	cp -dpf $(HOST_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib*/libgcj.so* $(TARGET_DIR)/usr/lib/
+	mkdir -p $(STAGING_DIR)/usr/lib/security
 	mkdir -p $(TARGET_DIR)/usr/lib/security
 	cp -dpf $(HOST_DIR)/usr/lib/security/classpath.security \
+		$(STAGING_DIR)/usr/lib/security/
+	cp -dpf $(HOST_DIR)/usr/lib/security/classpath.security \
 		$(TARGET_DIR)/usr/lib/security/
 	-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libgcj.so*
 endif
Signature · 1 line
1.7.2.2
#6 lore raw

PATCH 2/6 gcc: install copies of libgcc, libstdc++ and libgcj to the sysroot

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Gustavo" == Gustavo Zacarias <[email protected]> writes:

Gustavo> We want to keep a copy around for the future SDK functionality. Gustavo> Also it's a better fix for bug #1051.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#7 lore raw

PATCH 3/6 gdb: make it a proper package

In reply to Gustavo Zacarias

* Convert gdb to a proper autotargets package
* Add version 7.2
* Drop version 6.6
* Mark version 6.7.1 (non-avr32) as deprecated

Kconfig can't handle duplicate choices and we can't make source depend on anything.
To fix this we suffix the different version choices for each case (in the toolchain menu with internal toolchain, in the package menu for target gdb/gdbserver for internal and external toolchains.

TODO: copy gdbserver from external toolchains

---
 Makefile                                           |    2 +-
 package/Config.in                                  |    6 +
 package/gdb/Config.in.external                     |   66 ++++++
 package/gdb/Config.in.host                         |   49 ++++
 package/gdb/Config.in.internal                     |   70 ++++++
 .../gdb-6.7.1}/600-fix-compile-flag-mismatch.patch |    0
 .../gdb-6.8}/600-fix-compile-flag-mismatch.patch   |    0
 package/gdb/gdb-7.2/100-fix-ipa.patch              |   25 ++
 .../gdb/gdb-7.2/101-fix-gdbserver-uninstall.patch  |   23 ++
 package/gdb/gdb.mk                                 |   62 +++++
 toolchain/gdb/6.6/100-uclibc-conf.patch            |   82 -------
 .../gdb/6.6/600-fix-compile-flag-mismatch.patch    |   69 ------
 toolchain/gdb/Config.in                            |   69 ------
 toolchain/gdb/gdb.mk                               |  237 --------------------
 toolchain/toolchain-buildroot.mk                   |    1 -
 toolchain/toolchain-buildroot/Config.in            |    1 +
 toolchain/toolchain-common.in                      |    5 -
 toolchain/toolchain-crosstool-ng.mk                |    1 -
 toolchain/toolchain-external.mk                    |    1 -
 19 files changed, 303 insertions(+), 466 deletions(-)
 create mode 100644 package/gdb/Config.in.external
 create mode 100644 package/gdb/Config.in.host
 create mode 100644 package/gdb/Config.in.internal
 rename {toolchain/gdb/6.7.1 => package/gdb/gdb-6.7.1}/600-fix-compile-flag-mismatch.patch (100%)
 rename {toolchain/gdb/6.8 => package/gdb/gdb-6.8}/600-fix-compile-flag-mismatch.patch (100%)
 create mode 100644 package/gdb/gdb-7.2/100-fix-ipa.patch
 create mode 100644 package/gdb/gdb-7.2/101-fix-gdbserver-uninstall.patch
 create mode 100644 package/gdb/gdb.mk
 delete mode 100644 toolchain/gdb/6.6/100-uclibc-conf.patch
 delete mode 100644 toolchain/gdb/6.6/600-fix-compile-flag-mismatch.patch
 delete mode 100644 toolchain/gdb/Config.in
 delete mode 100644 toolchain/gdb/gdb.mk
Makefile +1 -1
index e634848..f2f0dd0 100644
@@ -618,7 +618,7 @@ endif
 
 configured: dirs kernel-headers uclibc-config busybox-config linux26-config
 
-prepatch:	gcc-patched gdb-patched uclibc-patched
+prepatch:	gcc-patched uclibc-patched
 
 cross: $(BASE_TARGETS)
 
package/Config.in +6 -0
index da5b62b..e5ff8d9 100644
@@ -55,6 +55,12 @@ source "package/flex/Config.in"
 if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 source "package/gawk/Config.in"
 endif
+if BR2_TOOLCHAIN_BUILDROOT
+source "package/gdb/Config.in.internal"
+endif
+if !BR2_TOOLCHAIN_BUILDROOT
+source "package/gdb/Config.in.external"
+endif
 source "toolchain/gcc/Config.in.2"
 source "package/gettext/Config.in"
 source "package/gmp/Config.in"
package/gdb/Config.in.external new file +66 -0

66 lines not on this page · raw message

package/gdb/Config.in.host new file +49 -0

49 lines not on this page · raw message

package/gdb/Config.in.internal new file +70 -0

70 lines not on this page · raw message

package/gdb/gdb-6.7.1/600-fix-compile-flag-mismatch.patch renamed from toolchain/gdb/6.7.1/600-fix-compile-flag-mismatch.patch +0 -0
similarity index 100%
rename from toolchain/gdb/6.7.1/600-fix-compile-flag-mismatch.patch
rename to package/gdb/gdb-6.7.1/600-fix-compile-flag-mismatch.patch
package/gdb/gdb-6.8/600-fix-compile-flag-mismatch.patch renamed from toolchain/gdb/6.8/600-fix-compile-flag-mismatch.patch +0 -0
similarity index 100%
rename from toolchain/gdb/6.8/600-fix-compile-flag-mismatch.patch
rename to package/gdb/gdb-6.8/600-fix-compile-flag-mismatch.patch
package/gdb/gdb-7.2/100-fix-ipa.patch new file +25 -0
new file mode 100644
index 0000000..96037a9
@@ -0,0 +1,25 @@
+Fix gdbserver standalone
+
+See http://www.cygwin.com/ml/gdb-patches/2010-09/msg00148.html
+
+Signed-off-by: Gustavo Zacarias <[email protected]>
+---
+ gdb/gdbserver/Makefile.in |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
+index 76577cf..c2fc245 100644
+--- a/gdb/gdbserver/Makefile.in
++++ b/gdb/gdbserver/Makefile.in
+@@ -164,7 +164,7 @@ install: all install-only
+ install-only:
+ 	n=`echo gdbserver | sed '$(program_transform_name)'`; \
+ 	if [ x$$n = x ]; then n=gdbserver; else true; fi; \
+-	if [ x$IPA_DEPFILES != x ]; then \
++	if [ x$$IPA_DEPFILES != x ]; then \
+ 		$(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(libdir); \
+ 		$(INSTALL_PROGRAM) $(IPA_LIB) $(DESTDIR)$(libdir)/$(IPA_LIB); \
+ 	fi; \
+-- 
+1.7.2.2
+
package/gdb/gdb-7.2/101-fix-gdbserver-uninstall.patch new file +23 -0
new file mode 100644
index 0000000..c42fddc
@@ -0,0 +1,23 @@
+Fix uninstall target of gdbserver... meaning honor DESTDIR.
+
+Signed-off-by: Gustavo Zacarias <[email protected]>
+---
+ gdb/gdbserver/Makefile.in |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
+index 76577cf..43024fe 100644
+--- a/gdb/gdbserver/Makefile.in
++++ b/gdb/gdbserver/Makefile.in
+@@ -176,7 +176,7 @@ install-only:
+ uninstall: force
+ 	n=`echo gdbserver | sed '$(program_transform_name)'`; \
+ 	if [ x$$n = x ]; then n=gdbserver; else true; fi; \
+-	rm -f $(bindir)/$$n$(EXEEXT) $(DESTDIR)$(man1dir)/$$n.1
++	rm -f $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(man1dir)/$$n.1
+ 
+ installcheck:
+ check:
+-- 
+1.7.2.2
+
package/gdb/gdb.mk new file +62 -0

62 lines not on this page · raw message

toolchain/gdb/6.6/100-uclibc-conf.patch deleted +0 -82

82 lines not on this page · raw message

toolchain/gdb/6.6/600-fix-compile-flag-mismatch.patch deleted +0 -69

69 lines not on this page · raw message

toolchain/gdb/Config.in deleted +0 -69

69 lines not on this page · raw message

toolchain/gdb/gdb.mk deleted +0 -237

237 lines not on this page · raw message

toolchain/toolchain-buildroot.mk +0 -1
index c611562..764a1da 100644
@@ -3,7 +3,6 @@
 include toolchain/dependencies/dependencies.mk
 include toolchain/elf2flt/elf2flt.mk
 include toolchain/gcc/gcc-uclibc-4.x.mk
-include toolchain/gdb/gdb.mk
 include toolchain/kernel-headers/kernel-headers.mk
 include toolchain/mklibs/mklibs.mk
 include toolchain/uClibc/uclibc.mk
toolchain/toolchain-buildroot/Config.in +1 -0
index 3894890..485ab7c 100644
@@ -5,4 +5,5 @@ source "toolchain/kernel-headers/Config.in"
 source "toolchain/uClibc/Config.in"
 source "package/binutils/Config.in.host"
 source "toolchain/gcc/Config.in"
+source "package/gdb/Config.in.host"
 endif
toolchain/toolchain-common.in +0 -5
index bdc6e76..1276305 100644
@@ -1,10 +1,5 @@
 # Generic toolchain options
 
-# 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"
-
 config BR2_LARGEFILE
 	bool
 
toolchain/toolchain-crosstool-ng.mk +0 -1
index e480da9..5b0cc4e 100644
@@ -5,7 +5,6 @@ include toolchain/helpers.mk
 include toolchain/dependencies/dependencies.mk
 include toolchain/elf2flt/elf2flt.mk
 include toolchain/gcc/gcc-uclibc-4.x.mk
-include toolchain/gdb/gdb.mk
 include toolchain/toolchain-crosstool-ng/crosstool-ng.mk
 include toolchain/mklibs/mklibs.mk
 include toolchain/uClibc/uclibc.mk
toolchain/toolchain-external.mk +0 -1
index d67405b..4ade92a 100644
@@ -4,7 +4,6 @@ include toolchain/helpers.mk
 include toolchain/dependencies/dependencies.mk
 include toolchain/elf2flt/elf2flt.mk
 include toolchain/gcc/gcc-uclibc-4.x.mk
-include toolchain/gdb/gdb.mk
 include toolchain/kernel-headers/kernel-headers.mk
 include toolchain/mklibs/mklibs.mk
 include toolchain/toolchain-external/ext-tool.mk
Signature · 1 line
1.7.2.2
#8 lore raw

PATCH 3/6 gdb: make it a proper package

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Gustavo" == Gustavo Zacarias <[email protected]> writes:

Gustavo> * Convert gdb to a proper autotargets package Gustavo> * Add version 7.2
Gustavo> * Drop version 6.6
Gustavo> * Mark version 6.7.1 (non-avr32) as deprecated

Gustavo> Kconfig can't handle duplicate choices and we can't make source depend Gustavo> on anything.
Gustavo> To fix this we suffix the different version choices for each case (in Gustavo> the toolchain menu with internal toolchain, in the package menu for Gustavo> target gdb/gdbserver for internal and external toolchains.

Gustavo> TODO: copy gdbserver from external toolchains

Hmm, I don't quite like this Config.in.{internal,external} stuff, I'll take a look and see if I can combine them.

Signature · 1 line
Bye, Peter Korsgaard
#9 lore raw

PATCH 3/6 gdb: make it a proper package

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Korsgaard <[email protected]> writes:

Gustavo> TODO: copy gdbserver from external toolchains

Peter> Hmm, I don't quite like this Config.in.{internal,external} stuff, I'll Peter> take a look and see if I can combine them.

We can do something like this below, but I also now noticed that you can no longer build both gdbserver and full gdb, like we used to be able to do. The gdb build system seems a bit odd, so I don't see any nice way of building both in the same make step.

Any ideas?

#10 lore raw

PATCH 3/6 gdb: make it a proper package

(Top-posting for clarity)
Five of the six patches from Gustavo's patch-set containing the one below from way back in January was applied; this one wasn't applied. Has there been any progress on making GDB and friends a generic target since?

Ar Domh, 2011-01-02 ag 23:45 +0100, scr?obh Peter Korsgaard:

Quoted 159 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Korsgaard <[email protected]> writes:

Gustavo> TODO: copy gdbserver from external toolchains

Peter> Hmm, I don't quite like this Config.in.{internal,external} stuff, I'll Peter> take a look and see if I can combine them.

We can do something like this below, but I also now noticed that you can no longer build both gdbserver and full gdb, like we used to be able to do. The gdb build system seems a bit odd, so I don't see any nice way of building both in the same make step.

Any ideas?

Quoted 1 line

From 70cf4a88935ef184134b6e60302e02fec78fb0d1 Mon Sep 17 00:00:00 2001

From: Peter Korsgaard <[email protected]>
Date: Sun, 2 Jan 2011 23:28:02 +0100
Subject: [PATCH] gdb: cleanup

---
 package/Config.in                             |    7 +--
 package/gdb/{Config.in.external => Config.in} |    7 ++-
 package/gdb/Config.in.internal                |   70 -------------------------
 3 files changed, 7 insertions(+), 77 deletions(-)
 rename package/gdb/{Config.in.external => Config.in} (90%)
 delete mode 100644 package/gdb/Config.in.internal
package/Config.in +1 -6
index e5ff8d9..cee3993 100644
@@ -55,12 +55,7 @@ source "package/flex/Config.in"
 if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 source "package/gawk/Config.in"
 endif
-if BR2_TOOLCHAIN_BUILDROOT
-source "package/gdb/Config.in.internal"
-endif
-if !BR2_TOOLCHAIN_BUILDROOT
-source "package/gdb/Config.in.external"
-endif
+source "package/gdb/Config.in"
 source "toolchain/gcc/Config.in.2"
 source "package/gettext/Config.in"
 source "package/gmp/Config.in"
package/gdb/Config.in renamed from package/gdb/Config.in.external +6 -1
similarity index 90%
rename from package/gdb/Config.in.external
rename to package/gdb/Config.in
index 9f7b0bf..2cdfde4 100644
@@ -1,3 +1,5 @@
+if BR2_PACKAGE_HOST_GDB || !BR2_TOOLCHAIN_BUILDROOT
+
 config BR2_PACKAGE_GDB
 	bool
 	default y if BR2_PACKAGE_GDB_TARGET || BR2_PACKAGE_GDB_SERVER
@@ -22,7 +24,7 @@ config BR2_PACKAGE_GDB_SERVER
 
 choice
 	prompt "GDB debugger Version"
-	depends on BR2_PACKAGE_GDB
+	depends on BR2_PACKAGE_GDB && !BR2_TOOLCHAIN_BUILDROOT
 	default BR2_GDB_VERSION_6_8_e if !BR2_avr32
 	default BR2_GDB_VERSION_6_7_1_AVR32_2_1_5_e if BR2_avr32
 	help
@@ -64,3 +66,6 @@ config BR2_GDB_VERSION
 	default "7.0.1"			if BR2_GDB_VERSION_7_0_1_e
 	default "7.1"			if BR2_GDB_VERSION_7_1_e
 	default "7.2"			if BR2_GDB_VERSION_7_2_e
+	default "$(BR2_GDB_VERSION)"	if BR2_TOOLCHAIN_BUILDROOT
+
+endif
package/gdb/Config.in.internal deleted +0 -70
deleted file mode 100644
index d3d8de5..0000000
@@ -1,70 +0,0 @@
-config BR2_PACKAGE_GDB
-	bool
-	default y if BR2_PACKAGE_GDB_TARGET || BR2_PACKAGE_GDB_SERVER
-
-config BR2_PACKAGE_GDB_TARGET
-	bool "gdb"
-	select BR2_PACKAGE_NCURSES
-	select BR2_PACKAGE_GDB
-	depends on BR2_USE_WCHAR
-	help
-	    Build the full gdb debugger to run on the target.
-
-comment "GDB debugger for the target needs WCHAR support in toolchain"
-	depends on !BR2_USE_WCHAR
-
-config BR2_PACKAGE_GDB_SERVER
-	bool "gdbserver"
-	depends on BR2_PACKAGE_HOST_GDB
-	select BR2_PACKAGE_GDB
-	help
-	    Build the gdbserver stub to run on the target.
-	    A full gdb is needed to debug the progam.
-
-comment "GDB server needs you to build a host GDB in toolchain"
-	depends on !BR2_PACKAGE_HOST_GDB
-
-choice
-	prompt "GDB debugger Version"
-	depends on !BR2_PACKAGE_HOST_GDB && BR2_PACKAGE_GDB
-	default BR2_GDB_VERSION_6_8_i if !BR2_avr32
-	default BR2_GDB_VERSION_6_7_1_AVR32_2_1_5_i if BR2_avr32
-	help
-	  Select the version of gdb you wish to use.
-
-	config BR2_GDB_VERSION_6_7_1_i
-		depends on !BR2_avr32
-		bool "gdb 6.7.1"
-		depends on BR2_DEPRECATED
-
-	config BR2_GDB_VERSION_6_7_1_AVR32_2_1_5_i
-		depends on BR2_avr32
-		bool "gdb 6.7.1-avr32-2.1.5"
-
-	config BR2_GDB_VERSION_6_8_i
-		bool "gdb 6.8"
-		depends on !BR2_avr32
-
-	config BR2_GDB_VERSION_7_0_1_i
-		bool "gdb 7.0.1"
-		select BR2_PTHREAD_DEBUG if !BR2_PTHREADS_NONE
-
-	config BR2_GDB_VERSION_7_1_i
-		bool "gdb 7.1"
-		select BR2_PTHREAD_DEBUG if !BR2_PTHREADS_NONE
-
-	config BR2_GDB_VERSION_7_2_i
-		bool "gdb 7.2"
-		select BR2_PTHREAD_DEBUG if !BR2_PTHREADS_NONE
-
-endchoice
-
-config BR2_GDB_VERSION
-	depends on !BR2_PACKAGE_HOST_GDB && BR2_PACKAGE_GDB
-	string
-	default "6.7.1"			if BR2_GDB_VERSION_6_7_1_i
-	default "6.7.1-avr32-2.1.5"	if BR2_GDB_VERSION_6_7_1_AVR32_2_1_5_i
-	default "6.8"			if BR2_GDB_VERSION_6_8_i
-	default "7.0.1"			if BR2_GDB_VERSION_7_0_1_i
-	default "7.1"			if BR2_GDB_VERSION_7_1_i
-	default "7.2"			if BR2_GDB_VERSION_7_2_i
Signature · 6 lines
1.7.1



 Peter> -- 
 Peter> Bye, Peter Korsgaard
#11 lore raw

PATCH 3/6 gdb: make it a proper package

Hello,

Le Mon, 12 Sep 2011 19:10:21 +0100,
Quotient Remainder <[email protected]> a ?crit :

Quoted 5 lines

(Top-posting for clarity)
Five of the six patches from Gustavo's patch-set containing the one below from way back in January was applied; this one wasn't applied. Has there been any progress on making GDB and friends a generic target since?

Not as far as I know, but a renewed effort would be very interesting.

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#12 lore raw

PATCH 3/6 gdb: make it a proper package

In reply to Quotient Remainder
Quoted 6 lines · Quotient Remainder

(Top-posting for clarity)
Five of the six patches from Gustavo's patch-set containing the one below from way back in January was applied; this one wasn't applied. Has there been any progress on making GDB and friends a generic target
since?

There were a couple of issues, OTOH with Kconfig and multiple selections in different places which was solved with Yann's help later on.
And a couple of build issues, nothing big that i recall.
I can give it a respin if no one else is interested in doing so. Regards.

#13 lore raw

PATCH 4/6 oprofile: use new libbfd option

In reply to Gustavo Zacarias

Convert the oprofile target to select the new libbfd staging/target option to avoid a huge target binutils for a simple task.

---
 package/oprofile/Config.in   |    1 +
 package/oprofile/oprofile.mk |    5 +----
 2 files changed, 2 insertions(+), 4 deletions(-)
package/oprofile/Config.in +1 -0
index c877dae..0e3652d 100644
@@ -5,6 +5,7 @@ config BR2_PACKAGE_OPROFILE
 	# choosen in the config. This will have to be fixed later.
 	depends on !BR2_TOOLCHAIN_EXTERNAL
 	select BR2_PACKAGE_POPT
+	select BR2_PACKAGE_BINUTILS
 	depends on BR2_INSTALL_LIBSTDCPP
 	help
 	  OProfile is a system-wide profiler for Linux systems,
package/oprofile/oprofile.mk +1 -4
index 3be50f2..42bf0e2 100644
@@ -5,9 +5,6 @@
 #############################################################
 OPROFILE_VERSION := 0.9.4
 OPROFILE_CONF_OPT :=	--localstatedir=/var \
-			--with-extra-includes="$(BUILD_DIR)/binutils-$(BR2_BINUTILS_VERSION)-target/bfd \
-			-I$(TOOLCHAIN_DIR)/binutils-$(BR2_BINUTILS_VERSION)/include" \
-			--with-extra-libs=$(BUILD_DIR)/binutils-$(BR2_BINUTILS_VERSION)-target/bfd \
 			--with-kernel-support
 
 OPROFILE_BINARIES := utils/ophelp
@@ -24,7 +21,7 @@ ifeq ($(OPROFILE_ARCH),)
 OPROFILE_ARCH := $(BR2_ARCH)
 endif
 
-OPROFILE_DEPENDENCIES := popt binutils_target
+OPROFILE_DEPENDENCIES := popt binutils
 
 define OPROFILE_INSTALL_TARGET_CMDS
 	$(INSTALL) -d -m 755 $(TARGET_DIR)/usr/bin
Signature · 1 line
1.7.2.2
#14 lore raw

PATCH 4/6 oprofile: use new libbfd option

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Gustavo" == Gustavo Zacarias <[email protected]> writes:

Gustavo> Convert the oprofile target to select the new libbfd staging/target Gustavo> option to avoid a huge target binutils for a simple task.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#15 lore raw

PATCH 5/6 toolchain: do staging symlink

In reply to Gustavo Zacarias

Make an output/staging -> sysroot symlink just for compatibility purposes.
This may be gone in the future so don't count on it, use $(STAGING_DIR) instead.

---
 Makefile |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
Makefile +3 -1
index f2f0dd0..5c6ed14 100644
@@ -394,6 +394,7 @@ $(STAGING_DIR):
 	@mkdir -p $(STAGING_DIR)/usr/lib
 	@mkdir -p $(STAGING_DIR)/usr/include
 	@mkdir -p $(STAGING_DIR)/usr/bin
+	@ln -snf $(STAGING_DIR) $(BASE_DIR)/staging
 
 ifeq ($(BR2_ROOTFS_SKELETON_CUSTOM),y)
 TARGET_SKELETON=$(BR2_ROOTFS_SKELETON_CUSTOM_PATH)
@@ -605,7 +606,8 @@ endif
 
 clean:
 	rm -rf $(STAGING_DIR) $(TARGET_DIR) $(BINARIES_DIR) $(HOST_DIR) \
-		$(STAMP_DIR) $(BUILD_DIR) $(TOOLCHAIN_DIR) $(TOOLCHAIN_EXTERNAL_DIR)
+		$(STAMP_DIR) $(BUILD_DIR) $(TOOLCHAIN_DIR) $(BASE_DIR)/staging \
+		$(TOOLCHAIN_EXTERNAL_DIR)
 
 distclean: clean
 ifeq ($(DL_DIR),$(TOPDIR)/dl)
Signature · 1 line
1.7.2.2
#16 lore raw

PATCH 5/6 toolchain: do staging symlink

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Gustavo" == Gustavo Zacarias <[email protected]> writes:

Gustavo> Make an output/staging -> sysroot symlink just for Gustavo> compatibility purposes. This may be gone in the future so Gustavo> don't count on it, use $(STAGING_DIR) instead.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#17 lore raw

PATCH 6/6 target gcc: cleanup

In reply to Gustavo Zacarias

WITH_TARGET_{GMP/MPC/MPFR} is unneeded since we are providing a sysroot.

It also breaks build-gcc under certain conditions.

---
 toolchain/gcc/gcc-uclibc-4.x.mk |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)
toolchain/gcc/gcc-uclibc-4.x.mk +0 -6
index 633b8aa..80bed5e 100644
@@ -119,11 +119,8 @@ GCC_HOST_PREREQ += host-mpc
 endif
 
 GCC_TARGET_PREREQ += mpfr gmp
-GCC_WITH_TARGET_GMP = --with-gmp=$(STAGING_DIR)/usr
-GCC_WITH_TARGET_MPFR = --with-mpfr=$(STAGING_DIR)/usr
 ifeq ($(findstring x4.5.,x$(GCC_VERSION)),x4.5.)
 GCC_TARGET_PREREQ += mpc
-GCC_WITH_TARGET_MPC = --with-mpc=$(STAGING_DIR)/usr
 endif
 
 ifeq ($(BR2_GCC_SHARED_LIBGCC),y)
@@ -506,9 +503,6 @@ $(GCC_BUILD_DIR4)/.configured: $(GCC_BUILD_DIR4)/.prepared
 		--disable-multilib \
 		$(GCC_TLS) \
 		$(GCC_SHARED_LIBGCC) \
-		$(GCC_WITH_TARGET_GMP) \
-		$(GCC_WITH_TARGET_MPFR) \
-		$(GCC_WITH_TARGET_MPC) \
 		$(DISABLE_NLS) \
 		$(THREADS) \
 		$(GCC_DECIMAL_FLOAT) \
Signature · 1 line
1.7.2.2
#18 lore raw

PATCH 6/6 target gcc: cleanup

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Gustavo" == Gustavo Zacarias <[email protected]> writes:

Gustavo> WITH_TARGET_{GMP/MPC/MPFR} is unneeded since we are providing a sysroot. Gustavo> It also breaks build-gcc under certain conditions.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard