Skip to contentSkip to conversation

Toolchain rework, take 3

PATCH New Gustavo Zacarias 3 participants 22 messages Dec 28, 2010 – Jan 3, 2011 Kbuild

lore
Share & tools
lore
#0 lore raw

cover Toolchain rework, take 3

This is the third batch of patches for the internal toolchain rework. Peter merged some of the work so this is a rebase with a few fixes and additions related to oprofile and removing
the BR2_CROSS_TOOLCHAIN_TARGET_UTILS option.

#1 lore raw

PATCH 1/10 sstrip: make it a proper package

* Convert sstrip to a proper gentargets package
* Use openwrt svn version, it's basically the same one we used
* Change the hooks from old toolchain/sstrip to new package/sstrip
* Drop the old toolchain/sstrip directory
* sstrip for the target is now in Package -> Development

---
 package/Config.in                         |    3 +
 package/Makefile.in                       |    2 +-
 package/sstrip/Config.in                  |    7 +
 package/sstrip/sstrip.mk                  |   45 +++
 toolchain/dependencies/dependencies.mk    |    2 +-
 toolchain/sstrip/Config.in                |    9 -
 toolchain/sstrip/sstrip.c                 |  467 -----------------------------
 toolchain/sstrip/sstrip.mk                |   70 -----
 toolchain/toolchain-buildroot.mk          |    1 -
 toolchain/toolchain-buildroot/Config.in.2 |    1 -
 toolchain/toolchain-crosstool-ng.mk       |    1 -
 toolchain/toolchain-external.mk           |    1 -
 12 files changed, 57 insertions(+), 552 deletions(-)
 create mode 100644 package/sstrip/Config.in
 create mode 100644 package/sstrip/sstrip.mk
 delete mode 100644 toolchain/sstrip/Config.in
 delete mode 100644 toolchain/sstrip/sstrip.c
 delete mode 100644 toolchain/sstrip/sstrip.mk
package/Config.in +3 -0
index 225d873..27d8023 100644
@@ -73,6 +73,9 @@ endif
 source "package/pkg-config/Config.in"
 if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 source "package/sed/Config.in"
+endif
+source "package/sstrip/Config.in"
+if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 source "package/tar/Config.in"
 endif
 endmenu
package/Makefile.in +1 -1
index 71c8dbc..3fa98fe 100644
@@ -162,7 +162,7 @@ ifeq ($(BR2_STRIP_sstrip),y)
 STRIP_DISCARD_ALL:=
 STRIP_STRIP_UNNEEDED:=
 STRIP_STRIP_ALL:=
-TARGET_STRIP=$(STAGING_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-sstrip
+TARGET_STRIP=$(HOST_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-sstrip
 STRIPCMD=$(TARGET_STRIP)
 KSTRIPCMD=$(TARGET_CROSS)strip --remove-section=.comment --remove-section=.note --strip-unneeded
 endif
package/sstrip/Config.in new file +7 -0
new file mode 100644
index 0000000..12a5941
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_SSTRIP
+	bool "sstrip"
+	help
+	  Small utility that removes a few bytes from an executable that
+	  strip leaves behind.
+
+	  http://www.muppetlabs.com/~breadbox/software/elfkickers.html
package/sstrip/sstrip.mk new file +45 -0

45 lines not on this page · raw message

toolchain/dependencies/dependencies.mk +1 -1
index 13604f0..6eac05d 100644
@@ -7,7 +7,7 @@
 
 DEPENDENCIES_HOST_PREREQ:=
 ifeq ($(BR2_STRIP_sstrip),y)
-DEPENDENCIES_HOST_PREREQ+=sstrip_host
+DEPENDENCIES_HOST_PREREQ+=host-sstrip
 endif
 
 # Remove duplicate entries from $(DL_TOOLS_DEPENDENCIES)
toolchain/sstrip/Config.in deleted +0 -9
deleted file mode 100644
index be4fa28..0000000
@@ -1,9 +0,0 @@
-config BR2_PACKAGE_SSTRIP_TARGET
-	bool "Install sstrip for the target system"
-	help
-	  Maximal 'strip'ing utility.
-
-config BR2_PACKAGE_SSTRIP_HOST
-	bool "Install sstrip for the host/build system"
-	help
-	  Maximal 'strip'ing utility.
toolchain/sstrip/sstrip.c deleted +0 -467

467 lines not on this page · raw message

toolchain/sstrip/sstrip.mk deleted +0 -70

70 lines not on this page · raw message

toolchain/toolchain-buildroot.mk +0 -1
index 44044d7..f12a480 100644
@@ -7,5 +7,4 @@ 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/sstrip/sstrip.mk
 include toolchain/uClibc/uclibc.mk
toolchain/toolchain-buildroot/Config.in.2 +0 -1
index d76aa7a..6a383f6 100644
@@ -105,7 +105,6 @@ endchoice
 
 source "toolchain/elf2flt/Config.in"
 source "toolchain/mklibs/Config.in"
-source "toolchain/sstrip/Config.in"
 
 config BR2_VFP_FLOAT
 	bool "Use ARM Vector Floating Point unit"
toolchain/toolchain-crosstool-ng.mk +0 -1
index 1c80300..1befff2 100644
@@ -9,5 +9,4 @@ 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/sstrip/sstrip.mk
 include toolchain/uClibc/uclibc.mk
toolchain/toolchain-external.mk +0 -1
index f90b6f1..c43618b 100644
@@ -8,6 +8,5 @@ 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/sstrip/sstrip.mk
 include toolchain/toolchain-external/ext-tool.mk
 include toolchain/uClibc/uclibc.mk
Signature · 1 line
1.7.2.2
#2 lore raw

PATCH 2/10 toolchain: move sysroot to host dir

In reply to Gustavo Zacarias

* Drop the BR2_STAGING_DIR option
* Hardcode STAGING_DIR to $(HOST_DIR)/usr/TUPLE/sysroot

---
 Config.in           |   13 ------------
 Makefile            |    2 -
 package/Makefile.in |   54 ++++++++++++++++++++++++++------------------------
 3 files changed, 28 insertions(+), 41 deletions(-)
Config.in +0 -13
index ff77449..df0c7ce 100644
@@ -72,19 +72,6 @@ config BR2_DL_DIR
 
 	  The default is $(TOPDIR)/dl
 
-config BR2_STAGING_DIR
-	string "Toolchain and header file location?"
-	default "$(BASE_DIR)/staging"
-	help
-	  This is the location where the toolchain will be installed.  The
-	  toolchain will not work if it is moved from this location.
-	  Therefore, if you wish to package up a uClibc toolchain, it is
-	  important that is is set to the final location where the toolchain
-	  will be used.
-
-	  Most people will leave this set to the default value of
-	  "$(BASE_DIR)/staging".
-
 menu "Mirrors and Download locations"
 
 config BR2_PRIMARY_SITE
Makefile +0 -2
index f6ab07e..9ba80a6 100644
@@ -268,8 +268,6 @@ TAR_OPTIONS=$(call qstrip,$(BR2_TAR_OPTIONS)) -xf
 
 GNU_TARGET_SUFFIX:=-$(call qstrip,$(BR2_GNU_TARGET_SUFFIX))
 
-STAGING_DIR:=$(call qstrip,$(BR2_STAGING_DIR))
-
 # packages compiled for the host goes here
 HOST_DIR:=$(BASE_DIR)/host
 
package/Makefile.in +28 -26

66 lines not on this page · raw message

Signature · 1 line
1.7.2.2
#3 lore raw

PATCH 3/10 uclibc: move tools to host dir

In reply to Gustavo Zacarias

Move uclibc host tools (ldd/ldconfig) to host dir. They were previously installed in the staging dir.

---
 toolchain/uClibc/uclibc.mk |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
toolchain/uClibc/uclibc.mk +6 -6
index e05e16c..ec92824 100644
@@ -450,17 +450,17 @@ $(STAGING_DIR)/usr/lib/libc.a: $(UCLIBC_DIR)/lib/libc.a
 	fi
 	# Build the host utils. Need to add an install target...
 	$(MAKE1) -C $(UCLIBC_DIR)/utils \
-		PREFIX=$(STAGING_DIR) \
+		PREFIX=$(HOST_DIR) \
 		HOSTCC="$(HOSTCC)" \
 		hostutils
 	if [ -f $(UCLIBC_DIR)/utils/ldd.host ]; then \
-		install -c $(UCLIBC_DIR)/utils/ldd.host $(STAGING_DIR)/usr/bin/ldd; \
-		ln -sf ldd $(STAGING_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-ldd; \
+		install -D $(UCLIBC_DIR)/utils/ldd.host $(HOST_DIR)/usr/bin/ldd; \
+		ln -sf ldd $(HOST_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-ldd; \
 	fi
 	if [ -f $(UCLIBC_DIR)/utils/ldconfig.host ]; then \
-		install -c $(UCLIBC_DIR)/utils/ldconfig.host $(STAGING_DIR)/usr/bin/ldconfig; \
-		ln -sf ldconfig $(STAGING_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-ldconfig; \
-		ln -sf ldconfig $(STAGING_DIR)/usr/bin/$(GNU_TARGET_NAME)-ldconfig; \
+		install -D $(UCLIBC_DIR)/utils/ldconfig.host $(HOST_DIR)/usr/bin/ldconfig; \
+		ln -sf ldconfig $(HOST_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-ldconfig; \
+		ln -sf ldconfig $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-ldconfig; \
 	fi
 	touch -c $@
 
Signature · 1 line
1.7.2.2
#4 lore raw

PATCH 4/10 binutils: make it a proper package

In reply to Gustavo Zacarias

* Convert binutils to a proper autotargets package
* Add version 2.21
* Drop version 2.17
* Hook up packaged binutils for target gcc
* Build tools are on HOST_DIR now so change it
* TARGET_CROSS is now in 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                       |   68 ++++++++
 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                          |    1 +
 toolchain/gcc/gcc-uclibc-4.x.mk                    |   66 +++-----
 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(+), 586 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 9ba80a6..2325319 100644
@@ -239,7 +239,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
@@ -612,7 +612,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 27d8023..fb47e27 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 9765a1a..983f9f5 100644
@@ -114,7 +114,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..942562e
@@ -0,0 +1,22 @@
+config BR2_PACKAGE_BINUTILS
+	bool
+	depends on BR2_TOOLCHAIN_BUILDROOT
+	default y if BR2_PACKAGE_BINUTILS_TARGET || BR2_PACKAGE_BINUTILS_LIBBFD
+
+config BR2_PACKAGE_BINUTILS_TARGET
+	bool "binutils"
+	select BR2_PACKAGE_MPC if BR2_GCC_VERSION_4_5_X
+	select BR2_PACKAGE_MPFR
+	select BR2_PACKAGE_GMP
+	help
+	  The GNU Binutils are a collection of binary tools.
+
+	  http://www.gnu.org/software/binutils/
+
+config BR2_PACKAGE_BINUTILS_LIBBFD
+	bool
+	help
+	  Install libbfd from binutils in the target.
+	  
+	  This option is currently used by oprofile to just install
+	  the minimum libbfd needed instead of a full-blown 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 +68 -0

68 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 +1 -0
index d9ebfcd..9b500f2 100644
@@ -1,6 +1,7 @@
 config BR2_PACKAGE_GCC_TARGET
 	bool "native toolchain in the target filesystem"
 	depends on BR2_HAVE_DEVFILES
+	select BR2_PACKAGE_BINUTILS_TARGET
 	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 +23 -43

184 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
#5 lore raw

PATCH 4/10 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:

Hi,

Gustavo> * Convert binutils to a proper autotargets package Gustavo> * Add version 2.21
Gustavo> * Drop version 2.17
Gustavo> * Hook up packaged binutils for target gcc Gustavo> * Build tools are on HOST_DIR now so change it Gustavo> * TARGET_CROSS is now in HOST_DIR too

Gustavo> diff --git a/package/Config.in b/package/Config.in Gustavo> index 27d8023..fb47e27 100644
Gustavo> --- a/package/Config.in
Gustavo> +++ b/package/Config.in
Gustavo> @@ -35,6 +35,7 @@ endmenu

 Gustavo>  menu "Development tools"
 Gustavo>  source "package/autoconf/Config.in"
 Gustavo>  source "package/automake/Config.in"
 Gustavo> +source "package/binutils/Config.in"
 Gustavo>  source "package/bison/Config.in"
 Gustavo>  source "package/bsdiff/Config.in"
 Gustavo>  source "package/ccache/Config.in"

Gustavo> diff --git a/package/Makefile.in b/package/Makefile.in Gustavo> index 9765a1a..983f9f5 100644
Gustavo> --- a/package/Makefile.in
Gustavo> +++ b/package/Makefile.in
Gustavo> @@ -114,7 +114,7 @@ TARGET_CXXFLAGS=$(TARGET_CFLAGS) Gustavo> TARGET_SYSROOT_OPT=--sysroot=$(STAGING_DIR)

Gustavo> ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
Gustavo> -TARGET_CROSS=$(STAGING_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)- Gustavo> +TARGET_CROSS=$(HOST_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-

Seeing this I thought the build would be broken because GCC isn't moved yet, but I see you do move it later on in this patch, even if it isn't mentioned in the commit message.

Gustavo> +config BR2_PACKAGE_BINUTILS
Gustavo> + bool
Gustavo> + depends on BR2_TOOLCHAIN_BUILDROOT
Gustavo> + default y if BR2_PACKAGE_BINUTILS_TARGET || BR2_PACKAGE_BINUTILS_LIBBFD
Gustavo> +
Gustavo> +config BR2_PACKAGE_BINUTILS_TARGET
Gustavo> + bool "binutils"
Gustavo> + select BR2_PACKAGE_MPC if BR2_GCC_VERSION_4_5_X
Gustavo> + select BR2_PACKAGE_MPFR
Gustavo> + select BR2_PACKAGE_GMP
Gustavo> + help
Gustavo> + The GNU Binutils are a collection of binary tools.
Gustavo> +
Gustavo> + http://www.gnu.org/software/binutils/
Gustavo> +
Gustavo> +config BR2_PACKAGE_BINUTILS_LIBBFD
Gustavo> + bool
Gustavo> + help
Gustavo> + Install libbfd from binutils in the target.
Gustavo> +
Gustavo> + This option is currently used by oprofile to just install
Gustavo> + the minimum libbfd needed instead of a full-blown binutils.

I find this quite complicated. I would prefer something like:

config BR2_PACKAGE_BINUTILS
bool "binutils"
depends on BR2_TOOLCHAIN_BUILDROOT
help
..

config BR2_PACKAGE_BINUTILS_FULLINSTALL
bool "perform full installation"
depends on BR2_PACKAGE_BINUTILS
help
Select this to install all binary utilies and not just libbfd.

And then move the MPC/MPFR/GMP selects under BR2_PACKAGE_GCC_TARGET. Also add selects for BR2_PACKAGE_BINUTILS + FULLINSTALL.

Gustavo> +++ b/package/binutils/binutils.mk
Gustavo> @@ -0,0 +1,68 @@
Gustavo> +############################################################# Gustavo> +#
Gustavo> +# binutils
Gustavo> +#
Gustavo> +############################################################# Gustavo> +
Gustavo> +BINUTILS_VERSION = $(call qstrip,$(BR2_BINUTILS_VERSION))
Gustavo> +BINUTILS_SOURCE = binutils-$(BINUTILS_VERSION).tar.bz2
Gustavo> +BINUTILS_SITE = $(BR2_GNU_MIRROR)/binutils
Gustavo> +ifeq ($(ARCH),avr32)
Gustavo> +BINUTILS_SITE = ftp://www.at91.com/pub/buildroot
Gustavo> +endif
Gustavo> +BINUTILS_EXTRA_CONFIG_OPTIONS = $(call qstrip,$(BR2_BINUTILS_EXTRA_CONFIG_OPTIONS)) Gustavo> +BINUTILS_INSTALL_STAGING = YES
Gustavo> +
Gustavo> +# These aren't really needed, we just pull them until gcc is a proper package Gustavo> +ifeq ($(BR2_PACKAGE_BINUTILS_TARGET),y)
Gustavo> +BINUTILS_DEPENDENCIES = gmp mpfr
Gustavo> +ifeq ($(BR2_GCC_VERSION_4_5_X),y)

You have trailing spaces here and elsewhere.

Gustavo> +++ b/toolchain/gcc/gcc-uclibc-4.x.mk
Gustavo> @@ -53,9 +53,6 @@ else
Gustavo> GCC_OPTSPACE=--enable-target-optspace
Gustavo> endif

Gustavo> -GCC_TARGET_PREREQ=
Gustavo> -GCC_STAGING_PREREQ=
Gustavo> -

 Gustavo>  #############################################################
 Gustavo>  #
 Gustavo>  # Setup some initial stuff

Gustavo> @@ -203,17 +200,12 @@ endif
Gustavo> ############################################################# Gustavo> GCC_BUILD_DIR1:=$(TOOLCHAIN_DIR)/gcc-$(GCC_VERSION)-initial

Gustavo> -
Gustavo> -# The --without-headers option stopped working with gcc 3.0 and has never been Gustavo> -# fixed, so we need to actually have working C library header files prior to Gustavo> -# the step or libgcc will not build...
Gustavo> -

 Gustavo>  $(GCC_BUILD_DIR1)/.configured: $(GCC_DIR)/.patched
 Gustavo>  	mkdir -p $(GCC_BUILD_DIR1)
 Gustavo>  	(cd $(GCC_BUILD_DIR1); rm -rf config.cache; \
 Gustavo>  		$(HOST_CONFIGURE_OPTS) \
 Gustavo>  		$(GCC_DIR)/configure $(QUIET) \
 Gustavo> -		--prefix=$(STAGING_DIR)/usr \
 Gustavo> +		--prefix=$(HOST_DIR)/usr \
 Gustavo>  		--build=$(GNU_HOST_NAME) \
 Gustavo>  		--host=$(GNU_HOST_NAME) \
 Gustavo>  		--target=$(REAL_GNU_TARGET_NAME) \

Gustavo> @@ -243,7 +235,6 @@ $(GCC_BUILD_DIR1)/.configured: $(GCC_DIR)/.patched
Gustavo> touch $@

Gustavo> $(GCC_BUILD_DIR1)/.compiled: $(GCC_BUILD_DIR1)/.configured
Gustavo> - # gcc >= 4.3.0 have to also build all-target-libgcc

Why are you removing those comments? We still support gcc 4.2.x

 Gustavo>  ifeq ($(BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE),y)
 Gustavo>  	$(GCC_CONF_ENV) $(MAKE) -C $(GCC_BUILD_DIR1) all-gcc
 Gustavo>  else

Gustavo> @@ -276,22 +262,16 @@ gcc_initial-dirclean:
Gustavo> ############################################################# Gustavo> GCC_BUILD_DIR2:=$(TOOLCHAIN_DIR)/gcc-$(GCC_VERSION)-intermediate

Gustavo> -

 Gustavo>  # The --without-headers option stopped working with gcc 3.0 and has never been
 Gustavo>  # fixed, so we need to actually have working C library header files prior to
 Gustavo>  # the step or libgcc will not build...

Gustavo> $(GCC_BUILD_DIR2)/.configured: $(GCC_DIR)/.patched
Gustavo> mkdir -p $(GCC_BUILD_DIR2)
Gustavo> - -rmdir $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib
Gustavo> - mkdir -p $(STAGING_DIR)/lib
Gustavo> - ln -snf ../../lib $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib
Gustavo> - $(if $(BR2_ARCH_IS_64),mkdir -p $(STAGING_DIR)/lib64)
Gustavo> - $(if $(BR2_ARCH_IS_64),ln -snf ../../lib64 $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib64)

Why remove this ARCH_IS_64 stuff?

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

PATCH 4/10 binutils: make it a proper package

Quoted 3 lines · Peter Korsgaard

Seeing this I thought the build would be broken because GCC isn't moved yet, but I see you do move it later on in this patch, even if it isn't mentioned in the commit message.

Comment added.

Quoted 14 lines

I find this quite complicated. I would prefer something like:

config BR2_PACKAGE_BINUTILS
bool "binutils"
depends on BR2_TOOLCHAIN_BUILDROOT
help
..

config BR2_PACKAGE_BINUTILS_FULLINSTALL
bool "perform full installation"
depends on BR2_PACKAGE_BINUTILS
help
Select this to install all binary utilies and not just libbfd.

Quoted 3 lines

And then move the MPC/MPFR/GMP selects under BR2_PACKAGE_GCC_TARGET. Also add selects for BR2_PACKAGE_BINUTILS + FULLINSTALL.

Easier to define BR2_PACKAGE_BINUTILS that builds all
of binutils and only installs libbfd + BR2_PACKAGE_BINUTILS_TARGET to install the full version.

Quoted 1 line

You have trailing spaces here and elsewhere.

Hopefully fixed.

Quoted 9 lines

Gustavo> -
Gustavo> -# The --without-headers option stopped working with gcc 3.0 and has never been Gustavo> -# fixed, so we need to actually have working C library header files prior to Gustavo> -# the step or libgcc will not build...

Gustavo> $(GCC_BUILD_DIR1)/.compiled: $(GCC_BUILD_DIR1)/.configured
Gustavo> - # gcc >= 4.3.0 have to also build all-target-libgcc

Why are you removing those comments? We still support gcc 4.2.x

Because these are in STAGE1 (DIR1) where it's completely irrelevant / doesn't apply and just amounts to misinformation. gcc-initial doesn't use nor install headers since the extra gcc build stage was added. Same scenario for libgcc.
They're leftover comments. That's the reason i kept the ones in gcc-intermediate.

Quoted 20 lines
 Gustavo>  ifeq ($(BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE),y)
 Gustavo>  	$(GCC_CONF_ENV) $(MAKE) -C $(GCC_BUILD_DIR1) all-gcc
 Gustavo>  else

Gustavo> @@ -276,22 +262,16 @@ gcc_initial-dirclean:
Gustavo> ############################################################# Gustavo> GCC_BUILD_DIR2:=$(TOOLCHAIN_DIR)/gcc-$(GCC_VERSION)-intermediate

Gustavo> -

 Gustavo>  # The --without-headers option stopped working with gcc 3.0 and has never been
 Gustavo>  # fixed, so we need to actually have working C library header files prior to
 Gustavo>  # the step or libgcc will not build...

Gustavo> $(GCC_BUILD_DIR2)/.configured: $(GCC_DIR)/.patched
Gustavo> mkdir -p $(GCC_BUILD_DIR2)
Gustavo> - -rmdir $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib
Gustavo> - mkdir -p $(STAGING_DIR)/lib
Gustavo> - ln -snf ../../lib $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib
Gustavo> - $(if $(BR2_ARCH_IS_64),mkdir -p $(STAGING_DIR)/lib64)
Gustavo> - $(if $(BR2_ARCH_IS_64),ln -snf ../../lib64 $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib64)

Quoted 1 line

Why remove this ARCH_IS_64 stuff?

This is from commit 3c77bab2eeace3ee675bd745ca335fa3dd1630bb which does a symlink trick to make libstdc++ available. It's simpler to just copy libstdc++ (and libgcj/libgcc while at it) to the sysroot which is fixed in patch #5 from my series.

#7 lore raw

PATCH 4/10 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:

Quoted 3 lines · Peter Korsgaard
Quoted 3 lines

Seeing this I thought the build would be broken because GCC isn't moved yet, but I see you do move it later on in this patch, even if it isn't mentioned in the commit message.

Gustavo> Comment added.

Thanks.

Quoted 14 lines
Quoted 14 lines

I find this quite complicated. I would prefer something like:

config BR2_PACKAGE_BINUTILS
bool "binutils"
depends on BR2_TOOLCHAIN_BUILDROOT
help
..

config BR2_PACKAGE_BINUTILS_FULLINSTALL
bool "perform full installation"
depends on BR2_PACKAGE_BINUTILS
help
Select this to install all binary utilies and not just libbfd.

Quoted 3 lines
Quoted 3 lines

And then move the MPC/MPFR/GMP selects under BR2_PACKAGE_GCC_TARGET. Also add selects for BR2_PACKAGE_BINUTILS + FULLINSTALL.

Gustavo> Easier to define BR2_PACKAGE_BINUTILS that builds all Gustavo> of binutils and only installs libbfd + BR2_PACKAGE_BINUTILS_TARGET to Gustavo> install the full version.

Yes, that's what I meant about the _FULLINSTALL option.

Quoted 1 line
Quoted 1 line

You have trailing spaces here and elsewhere.

Gustavo> Hopefully fixed.

Thanks.

Gustavo> $(GCC_BUILD_DIR1)/.compiled: $(GCC_BUILD_DIR1)/.configured
Gustavo> - # gcc >= 4.3.0 have to also build all-target-libgcc

Quoted 2 lines
Quoted 2 lines

Why are you removing those comments? We still support gcc 4.2.x

Gustavo> Because these are in STAGE1 (DIR1) where it's completely irrelevant / Gustavo> doesn't apply and just amounts to misinformation. Gustavo> gcc-initial doesn't use nor install headers since the extra gcc build Gustavo> stage was added. Same scenario for libgcc.
Gustavo> They're leftover comments. That's the reason i kept the ones in Gustavo> gcc-intermediate.

Ahh ok, thanks.

Quoted 1 line
Quoted 1 line

Why remove this ARCH_IS_64 stuff?

Gustavo> This is from commit 3c77bab2eeace3ee675bd745ca335fa3dd1630bb Gustavo> which does a symlink trick to make libstdc++ available. It's Gustavo> simpler to just copy libstdc++ (and libgcj/libgcc while at it) Gustavo> to the sysroot which is fixed in patch #5 from my series.

Ok, good.

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

PATCH 4/10 binutils: make it a proper package

In reply to Gustavo Zacarias
Quoted 8 lines · On Wed, 29 Dec 2010 17:41:58 -0300 Gustavo Zacarias <[email protected]>…
Quoted 8 lines

Gustavo> $(GCC_BUILD_DIR2)/.configured: $(GCC_DIR)/.patched
Gustavo> mkdir -p $(GCC_BUILD_DIR2)
Gustavo> - -rmdir $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib
Gustavo> - mkdir -p $(STAGING_DIR)/lib
Gustavo> - ln -snf ../../lib $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib
Gustavo> - $(if $(BR2_ARCH_IS_64),mkdir -p $(STAGING_DIR)/lib64)
Gustavo> - $(if $(BR2_ARCH_IS_64),ln -snf ../../lib64 $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib64)

Quoted 6 lines
Quoted 1 line

Why remove this ARCH_IS_64 stuff?

This is from commit 3c77bab2eeace3ee675bd745ca335fa3dd1630bb which does a symlink trick to make libstdc++ available. It's simpler to just copy libstdc++ (and libgcj/libgcc while at it) to the sysroot which is fixed in patch #5 from my series.

I am not sure about this justification, since I don't see what change in the toolchain build procedure removes the need for this symbolic link. Have you actually tested building WebKit on x86_64 for example ?

Thanks,

Thomas

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

PATCH 4/10 binutils: make it a proper package

Quoted 7 lines · Thomas Petazzoni
Quoted 6 lines
Quoted 1 line

Why remove this ARCH_IS_64 stuff?

This is from commit 3c77bab2eeace3ee675bd745ca335fa3dd1630bb which does a symlink trick to make libstdc++ available. It's simpler to just copy libstdc++ (and libgcj/libgcc while at it) to the sysroot which is fixed in patch #5 from my series.

Quoted 7 lines

I am not sure about this justification, since I don't see what change in the toolchain build procedure removes the need for this symbolic link. Have you actually tested building WebKit on x86_64 for example ?

Thanks,

Thomas

Yes, tested on an x86_64 host building an x86_64 target (full midori). First test was removing all the symlink stuff which in fact broke webkit, then i added my lib* in staging patch. Everything was built from scratch.
To throw in some extra testing i did the same with an arm target for both runs with the same result.

#10 lore raw

PATCH 5/10 gcc: install copies of libgcc, libstdc++ and libgcj to the sysroot too

In reply to Gustavo Zacarias

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

---
 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 543454b..215915d 100644
@@ -421,6 +421,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
@@ -428,14 +430,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
#11 lore raw

PATCH 6/10 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 2325319..d0f9032 100644
@@ -612,7 +612,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 fb47e27..3b442da 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
#12 lore raw

PATCH 7/10 package: drop sparc64 bits

In reply to Gustavo Zacarias

Remove VIS optimization, it's for sparc64 and it's gone.

---
 package/Makefile.in |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)
package/Makefile.in +0 -5
index 983f9f5..a1e290f 100644
@@ -92,11 +92,6 @@ ifeq ($(BR2_VFP_FLOAT),y)
 TARGET_CFLAGS+=-mfpu=vfp
 endif
 
-# enable VIS for v9a and v9b
-ifeq ($(findstring y,$(BR2_sparc_v9a)$(BR2_sparc64_v9a)$(BR2_sparc_v9b)$(BR2_sparc64_v9b)),y)
-TARGET_CFLAGS+=-mvis
-endif
-
 ifeq ($(findstring yy,$(BR2_mips)$(BR2_MIPS_ABI64)),yy)
 TARGET_CFLAGS+=-fno-pic -mno-abicalls
 endif
Signature · 1 line
1.7.2.2
#13 lore raw

PATCH 7/10 package: drop sparc64 bits

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

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

Gustavo> Remove VIS optimization, it's for sparc64 and it's gone. Gustavo> Signed-off-by: Gustavo Zacarias <[email protected]>

Committed, thanks.

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

PATCH 8/10 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..15e8186 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_LIBBFD
 	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
#15 lore raw

PATCH 9/10 binutils: needs libintl when locales are enabled

In reply to Gustavo Zacarias
---
 package/binutils/Config.in   |    2 ++
 package/binutils/binutils.mk |    1 +
 2 files changed, 3 insertions(+), 0 deletions(-)
package/binutils/Config.in +2 -0
index 942562e..65b0f30 100644
@@ -2,6 +2,8 @@ config BR2_PACKAGE_BINUTILS
 	bool
 	depends on BR2_TOOLCHAIN_BUILDROOT
 	default y if BR2_PACKAGE_BINUTILS_TARGET || BR2_PACKAGE_BINUTILS_LIBBFD
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
+	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE
 
 config BR2_PACKAGE_BINUTILS_TARGET
 	bool "binutils"
package/binutils/binutils.mk +1 -0
index 634c7ae..62b8b89 100644
@@ -12,6 +12,7 @@ BINUTILS_SITE = ftp://www.at91.com/pub/buildroot
 endif
 BINUTILS_EXTRA_CONFIG_OPTIONS = $(call qstrip,$(BR2_BINUTILS_EXTRA_CONFIG_OPTIONS))
 BINUTILS_INSTALL_STAGING = YES
+BINUTILS_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext libintl)
 
 # These aren't really needed, we just pull them until gcc is a proper package
 ifeq ($(BR2_PACKAGE_BINUTILS_TARGET),y)
Signature · 1 line
1.7.2.2
#16 lore raw

PATCH 10/10 toolchain: drop BR2_CROSS_TOOLCHAIN_TARGET_UTILS option

In reply to Gustavo Zacarias

It's really not very useful, all it does is install a target strace and ldd in a target_utils directory in staging. While at it clean up the strace makefile a bit.

---
 configs/arm_nptl_toolchain_defconfig      |    1 -
 configs/arm_toolchain_defconfig           |    1 -
 package/strace/strace.mk                  |   22 +++++-----------------
 target/xtensa/defconfig                   |    1 -
 toolchain/toolchain-buildroot/Config.in.2 |   12 ------------
 toolchain/uClibc/uclibc.mk                |    5 -----
 6 files changed, 5 insertions(+), 37 deletions(-)
configs/arm_nptl_toolchain_defconfig +0 -1
index 99c526e..1bb1193 100644
@@ -10,7 +10,6 @@ BR2_ENABLE_LOCALE=y
 BR2_USE_WCHAR=y
 BR2_PTHREADS_NATIVE=y
 BR2_INSTALL_LIBSTDCPP=y
-BR2_CROSS_TOOLCHAIN_TARGET_UTILS=y
 
 # No package
 # BR2_PACKAGE_BUSYBOX is not set
configs/arm_toolchain_defconfig +0 -1
index 455564c..e46c5c9 100644
@@ -8,7 +8,6 @@ BR2_INET_RPC=y
 BR2_ENABLE_LOCALE=y
 BR2_USE_WCHAR=y
 BR2_INSTALL_LIBSTDCPP=y
-BR2_CROSS_TOOLCHAIN_TARGET_UTILS=y
 
 # No package
 # BR2_PACKAGE_BUSYBOX is not set
package/strace/strace.mk +5 -17
index f4a52bc..85e82c1 100644
@@ -3,14 +3,12 @@
 # strace
 #
 #############################################################
-STRACE_VERSION:=4.5.20
-STRACE_SOURCE:=strace-$(STRACE_VERSION).tar.bz2
-STRACE_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/strace
-STRACE_AUTORECONF:=NO
-STRACE_INSTALL_STAGING:=NO
-STRACE_INSTALL_TARGET:=YES
 
-STRACE_CONF_ENV:= ac_cv_header_linux_if_packet_h=yes \
+STRACE_VERSION = 4.5.20
+STRACE_SOURCE = strace-$(STRACE_VERSION).tar.bz2
+STRACE_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/strace
+
+STRACE_CONF_ENV = ac_cv_header_linux_if_packet_h=yes \
 		  ac_cv_header_linux_netlink_h=yes \
 	          $(if $(BR2_LARGEFILE),ac_cv_type_stat64=yes,ac_cv_type_stat64=no)
 
@@ -20,14 +18,4 @@ endef
 
 STRACE_POST_INSTALL_TARGET_HOOKS += STRACE_REMOVE_STRACE_GRAPH
 
-define STRACE_INSTALL_TOOLCHAIN_TARGET_UTILS
-	mkdir -p $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/target_utils
-	install -c $(TARGET_DIR)/usr/bin/strace \
-		$(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/target_utils/strace
-endef
-
-ifeq ($(BR2_CROSS_TOOLCHAIN_TARGET_UTILS),y)
-STRACE_POST_INSTALL_TARGET_HOOKS += STRACE_INSTALL_TOOLCHAIN_TARGET_UTILS
-endif
-
 $(eval $(call AUTOTARGETS,package,strace))
target/xtensa/defconfig +0 -1
index 200ff21..0eee5c0 100644
@@ -80,7 +80,6 @@ BR2_GDB_VERSION="6.8"
 BR2_LARGEFILE=y
 BR2_INET_RPC=y
 BR2_TARGET_OPTIMIZATION="-Os -pipe"
-BR2_CROSS_TOOLCHAIN_TARGET_UTILS=y
 
 
 ## Added by Maxim
toolchain/toolchain-buildroot/Config.in.2 +0 -12
index 6a383f6..3fd433a 100644
@@ -118,16 +118,4 @@ config BR2_VFP_FLOAT
 
 	  Most people will answer N.
 
-config BR2_CROSS_TOOLCHAIN_TARGET_UTILS
-	bool "Include target utils in cross toolchain"
-	default y
-	help
-	  When using buildroot to build a deployable cross toolchain,
-	  it is handy to include certain target apps with that toolchain
-	  as a convenience.
-	  Examples include ldd, gdbserver, and strace.
-
-	  Answer Y if you want these apps (if built) copied into the
-	  cross toolchain dir under <arch>-linux-uclibc/target_utils/.
-
 endif
toolchain/uClibc/uclibc.mk +0 -5
index ec92824..a677be7 100644
@@ -479,11 +479,6 @@ $(TARGET_DIR)/usr/bin/ldd: $(cross_compiler)
 		CPP=$(TARGET_CROSS)cpp LD=$(TARGET_CROSS)ld \
 		ARCH="$(UCLIBC_TARGET_ARCH)" \
 		PREFIX=$(TARGET_DIR) utils install_utils
-ifeq ($(BR2_CROSS_TOOLCHAIN_TARGET_UTILS),y)
-	mkdir -p $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/target_utils
-	install -c $(TARGET_DIR)/usr/bin/ldd \
-		$(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/target_utils/ldd
-endif
 	touch -c $@
 
 ifneq ($(BR2_PREFER_STATIC_LIB),y)
Signature · 1 line
1.7.2.2
#17 lore raw

PATCH 10/10 toolchain: drop BR2_CROSS_TOOLCHAIN_TARGET_UTILS option

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

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

Gustavo> It's really not very useful, all it does is install a target Gustavo> strace and ldd in a target_utils directory in staging. Gustavo> While at it clean up the strace makefile a bit.

Committed, thanks.

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

cover Toolchain rework, take 3

In reply to Gustavo Zacarias
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

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

Gustavo> This is the third batch of patches for the internal toolchain rework. Gustavo> Peter merged some of the work so this is a rebase with a few Gustavo> fixes and additions related to oprofile and removing Gustavo> the BR2_CROSS_TOOLCHAIN_TARGET_UTILS option.

Thanks. Committed first 3 (up to binutils). Care to respin the rest of the series? Maybe patch 9 should get merged with the main binutils patch as well.

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

cover Toolchain rework, take 3

Quoted 3 lines · Peter Korsgaard

Thanks. Committed first 3 (up to binutils). Care to respin the rest of the series? Maybe patch 9 should get merged with the main binutils patch as well.

Respined.
They're at the usual git://repo.or.cz/buildroot-gz.git toolchain-rework branch.
Give them a spin to see if there's anything big i missed before sending a ton of email again ;-)

#20 lore raw

cover Toolchain rework, take 3

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

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

Quoted 3 lines · Peter Korsgaard
Quoted 3 lines

Thanks. Committed first 3 (up to binutils). Care to respin the rest of the series? Maybe patch 9 should get merged with the main binutils patch as well.

Gustavo> Respined.
Gustavo> They're at the usual git://repo.or.cz/buildroot-gz.git toolchain-rework Gustavo> branch.
Gustavo> Give them a spin to see if there's anything big i missed before sending Gustavo> a ton of email again ;-)

Thanks, but we're down to 6 patches now so it's no loner a ton ;)

I see that you are still hiding the BR2_PACKAGE_BINUTILS option, why is that?

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

cover Toolchain rework, take 3

Quoted 3 lines · Peter Korsgaard

Thanks, but we're down to 6 patches now so it's no loner a ton ;)

I see that you are still hiding the BR2_PACKAGE_BINUTILS option, why is that?

Force and habit.
Users shouldn't need to select it by hand since it's just libbfd, on the other hand hiding it isn't so nice.
I'll unhide it.