* [Buildroot] [pull request] Pull request for branch avr32-toolchain-fix
@ 2010-07-27 21:02 Thomas Petazzoni
2010-07-27 21:02 ` [Buildroot] [PATCH 1/3] binutils,gcc: use correct --prefix Thomas Petazzoni
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2010-07-27 21:02 UTC (permalink / raw)
To: buildroot
Hello,
This is the fix for the AVR32 toolchain build problem, but it makes a
change that impacts all other architectures as well. Instead of using
an incorrect --prefix=/usr for binutils and gcc, we use the correct
--prefix=$(STAGING_DIR)/usr.
With this fix in place, I can build the AVR32 toolchain and an AVR32
system with Busybox and DirectFB. However, I couldn't test it as I
don't have ARV32 hardware and Qemu doesn't support AVR32.
I have also tested an ARM internal Buildroot toolchain + DirectFB, it
builds and runs in Qemu. I also tested an ARM external Buildroot
toolchain + DirectFB system, it builds and runs in Qemu as well.
Thanks,
Thomas
The following changes since commit f2860bbc8ea6ff959b91eaa8919177d273ee4497:
Peter Korsgaard (1):
Merge branch 'fix-gxx-on-target' of git://git.busybox.net/~tpetazzoni/git/buildroot
are available in the git repository at:
git://git.busybox.net/~tpetazzoni/git/buildroot avr32-toolchain-fix
Thomas Petazzoni (3):
binutils,gcc: use correct --prefix
toolchain: Remove now-unused variables
toolchain: remove redundant and incorrect --with-build-time-tools option
toolchain/Makefile.in | 2 --
toolchain/binutils/binutils.mk | 6 ++----
toolchain/gcc/Makefile.in | 2 --
toolchain/gcc/gcc-uclibc-4.x.mk | 4 ++--
4 files changed, 4 insertions(+), 10 deletions(-)
Thanks,
--
Thomas Petazzoni
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/3] binutils,gcc: use correct --prefix
2010-07-27 21:02 [Buildroot] [pull request] Pull request for branch avr32-toolchain-fix Thomas Petazzoni
@ 2010-07-27 21:02 ` Thomas Petazzoni
2010-07-27 21:02 ` [Buildroot] [PATCH 2/3] toolchain: Remove now-unused variables Thomas Petazzoni
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2010-07-27 21:02 UTC (permalink / raw)
To: buildroot
The cross binutils and cross gcc are actually going to be executed
from $(STAGING_DIR)/usr, so the correct prefix is $(STAGING_DIR)/usr
and not /usr.
This also fixes what is known as the "AVR32 toolchain build failure",
which was due to the fact that the prefix directory wasn't writable
(since it was /usr).
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
toolchain/binutils/binutils.mk | 6 ++----
toolchain/gcc/gcc-uclibc-4.x.mk | 4 ++--
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/toolchain/binutils/binutils.mk b/toolchain/binutils/binutils.mk
index 68ac3e9..93dbbb0 100644
--- a/toolchain/binutils/binutils.mk
+++ b/toolchain/binutils/binutils.mk
@@ -67,12 +67,10 @@ $(BINUTILS_DIR1)/.configured: $(BINUTILS_DIR)/.patched
(cd $(BINUTILS_DIR1); rm -rf config.cache; \
$(HOST_CONFIGURE_OPTS) \
$(BINUTILS_DIR)/configure $(QUIET) \
- --prefix=/usr \
+ --prefix=$(STAGING_DIR)/usr \
--build=$(GNU_HOST_NAME) \
--host=$(GNU_HOST_NAME) \
--target=$(REAL_GNU_TARGET_NAME) \
- --mandir=/usr/share/man \
- --infodir=/usr/share/info \
$(BR2_CONFIGURE_DEVEL_SYSROOT) \
$(BR2_CONFIGURE_STAGING_SYSROOT) \
$(DISABLE_NLS) \
@@ -90,7 +88,7 @@ $(BINUTILS_DIR1)/binutils/objdump: $(BINUTILS_DIR1)/.configured
# Make install will put gettext data in staging_dir/share/locale.
# Unfortunatey, it isn't configureable.
$(STAGING_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-ld: $(BINUTILS_DIR1)/binutils/objdump
- $(MAKE) -C $(BINUTILS_DIR1) $(BR2_SYSROOT_STAGING_DESTDIR) install
+ $(MAKE) -C $(BINUTILS_DIR1) install
# tooldir=/usr build_tooldir=/usr install
#rm -f $(STAGING_DIR)/usr/bin/{ar,as,ld,nm,objdump,ranlib,strip}
diff --git a/toolchain/gcc/gcc-uclibc-4.x.mk b/toolchain/gcc/gcc-uclibc-4.x.mk
index 6e767ac..0a538de 100644
--- a/toolchain/gcc/gcc-uclibc-4.x.mk
+++ b/toolchain/gcc/gcc-uclibc-4.x.mk
@@ -266,7 +266,7 @@ $(GCC_BUILD_DIR2)/.configured: $(GCC_SRC_DIR)/.patched $(GCC_STAGING_PREREQ)
(cd $(GCC_BUILD_DIR2); rm -rf config.cache; \
$(HOST_CONFIGURE_OPTS) \
$(GCC_SRC_DIR)/configure $(QUIET) \
- --prefix=/usr \
+ --prefix=$(STAGING_DIR)/usr \
--build=$(GNU_HOST_NAME) \
--host=$(GNU_HOST_NAME) \
--target=$(REAL_GNU_TARGET_NAME) \
@@ -299,7 +299,7 @@ $(GCC_BUILD_DIR2)/.compiled: $(GCC_BUILD_DIR2)/.configured
touch $@
$(GCC_BUILD_DIR2)/.installed: $(GCC_BUILD_DIR2)/.compiled
- PATH=$(TARGET_PATH) $(MAKE) $(BR2_SYSROOT_STAGING_DESTDIR) \
+ PATH=$(TARGET_PATH) $(MAKE) \
-C $(GCC_BUILD_DIR2) install
if [ -d "$(STAGING_DIR)/lib64" ]; then \
if [ ! -e "$(STAGING_DIR)/lib" ]; then \
--
1.7.0.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 2/3] toolchain: Remove now-unused variables
2010-07-27 21:02 [Buildroot] [pull request] Pull request for branch avr32-toolchain-fix Thomas Petazzoni
2010-07-27 21:02 ` [Buildroot] [PATCH 1/3] binutils,gcc: use correct --prefix Thomas Petazzoni
@ 2010-07-27 21:02 ` Thomas Petazzoni
2010-07-27 21:02 ` [Buildroot] [PATCH 3/3] toolchain: remove redundant and incorrect --with-build-time-tools option Thomas Petazzoni
2010-07-27 21:07 ` [Buildroot] [pull request] Pull request for branch avr32-toolchain-fix Peter Korsgaard
3 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2010-07-27 21:02 UTC (permalink / raw)
To: buildroot
The variable BR2_SYSROOT_STAGING_DESTDIR is no longer used, since now
the prefix for gcc is already set to the correct location.
The variable BR2_SYSROOT_TARGET_DESTDIR was already unused.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
toolchain/Makefile.in | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/toolchain/Makefile.in b/toolchain/Makefile.in
index e5fae1f..d1af877 100644
--- a/toolchain/Makefile.in
+++ b/toolchain/Makefile.in
@@ -10,8 +10,6 @@ else
MULTILIB:=--disable-multilib
endif
-BR2_SYSROOT_STAGING_DESTDIR=DESTDIR=$(STAGING_DIR)/
-BR2_SYSROOT_TARGET_DESTDIR=DESTDIR=$(TARGET_DIR)/
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
--
1.7.0.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 3/3] toolchain: remove redundant and incorrect --with-build-time-tools option
2010-07-27 21:02 [Buildroot] [pull request] Pull request for branch avr32-toolchain-fix Thomas Petazzoni
2010-07-27 21:02 ` [Buildroot] [PATCH 1/3] binutils,gcc: use correct --prefix Thomas Petazzoni
2010-07-27 21:02 ` [Buildroot] [PATCH 2/3] toolchain: Remove now-unused variables Thomas Petazzoni
@ 2010-07-27 21:02 ` Thomas Petazzoni
2010-07-27 21:07 ` [Buildroot] [pull request] Pull request for branch avr32-toolchain-fix Peter Korsgaard
3 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2010-07-27 21:02 UTC (permalink / raw)
To: buildroot
This option is already part of the gcc configure options through the
BR2_CONFIGURE_BUILD_TOOLS variable (in toolchain/Makefile.in).
Additionnally, the value that was passed in the AVR32 specific case
was incorrect: it was $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/bin
instead of $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/bin.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
toolchain/gcc/Makefile.in | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/toolchain/gcc/Makefile.in b/toolchain/gcc/Makefile.in
index 4278bdb..9537e9d 100644
--- a/toolchain/gcc/Makefile.in
+++ b/toolchain/gcc/Makefile.in
@@ -46,8 +46,6 @@ endif
ifeq ($(BR2_avr32),y)
EXTRA_GCC_CONFIG_OPTIONS+=--disable-libmudflap
SOFT_FLOAT_CONFIG_OPTION:=
-EXTRA_GCC_CONFIG_OPTIONS+=--with-build-time-tools=$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/bin \
-#EXTRA_GCC_CONFIG_OPTIONS+=--with-as=$(TARGET_CROSS)as
endif
ifeq ($(BR2_PACKAGE_GCC_TARGET),y)
--
1.7.0.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [pull request] Pull request for branch avr32-toolchain-fix
2010-07-27 21:02 [Buildroot] [pull request] Pull request for branch avr32-toolchain-fix Thomas Petazzoni
` (2 preceding siblings ...)
2010-07-27 21:02 ` [Buildroot] [PATCH 3/3] toolchain: remove redundant and incorrect --with-build-time-tools option Thomas Petazzoni
@ 2010-07-27 21:07 ` Peter Korsgaard
3 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2010-07-27 21:07 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Thomas> Hello,
Thomas> This is the fix for the AVR32 toolchain build problem, but it makes a
Thomas> change that impacts all other architectures as well. Instead of using
Thomas> an incorrect --prefix=/usr for binutils and gcc, we use the correct
Thomas> --prefix=$(STAGING_DIR)/usr.
Thomas> With this fix in place, I can build the AVR32 toolchain and an AVR32
Thomas> system with Busybox and DirectFB. However, I couldn't test it as I
Thomas> don't have ARV32 hardware and Qemu doesn't support AVR32.
Thomas> I have also tested an ARM internal Buildroot toolchain + DirectFB, it
Thomas> builds and runs in Qemu. I also tested an ARM external Buildroot
Thomas> toolchain + DirectFB system, it builds and runs in Qemu as well.
Pulled and pushed, thanks!
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-07-27 21:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-27 21:02 [Buildroot] [pull request] Pull request for branch avr32-toolchain-fix Thomas Petazzoni
2010-07-27 21:02 ` [Buildroot] [PATCH 1/3] binutils,gcc: use correct --prefix Thomas Petazzoni
2010-07-27 21:02 ` [Buildroot] [PATCH 2/3] toolchain: Remove now-unused variables Thomas Petazzoni
2010-07-27 21:02 ` [Buildroot] [PATCH 3/3] toolchain: remove redundant and incorrect --with-build-time-tools option Thomas Petazzoni
2010-07-27 21:07 ` [Buildroot] [pull request] Pull request for branch avr32-toolchain-fix Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox