* [Buildroot] [PATCH 1/4] target-gcc: Get rid of TARGET_GCC_FLAGS
2010-07-27 18:18 [Buildroot] [pull request] Pull request for branch fix-gcc-on-target Thomas Petazzoni
@ 2010-07-27 18:18 ` Thomas Petazzoni
2010-07-27 18:18 ` [Buildroot] [PATCH 2/4] target-gcc: fix build Thomas Petazzoni
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2010-07-27 18:18 UTC (permalink / raw)
To: buildroot
This variable is used only once, so let's just hardcode its value at
its call site.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
toolchain/gcc/Makefile.in | 5 -----
toolchain/gcc/gcc-uclibc-4.x.mk | 5 ++++-
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/toolchain/gcc/Makefile.in b/toolchain/gcc/Makefile.in
index 0dcd803..4278bdb 100644
--- a/toolchain/gcc/Makefile.in
+++ b/toolchain/gcc/Makefile.in
@@ -50,11 +50,6 @@ EXTRA_GCC_CONFIG_OPTIONS+=--with-build-time-tools=$(STAGING_DIR)/$(REAL_GNU_TARG
#EXTRA_GCC_CONFIG_OPTIONS+=--with-as=$(TARGET_CROSS)as
endif
-TARGET_GCC_FLAGS= CFLAGS_FOR_TARGET="$(TARGET_CFLAGS) $(TARGET_SOFT_FLOAT)" \
- CXXFLAGS_FOR_TARGET="$(TARGET_CFLAGS) $(TARGET_SOFT_FLOAT)" \
- CFLAGS="$(TARGET_CFLAGS) $(TARGET_SOFT_FLOAT)" \
- BOOT_CFLAGS="$(TARGET_CFLAGS) $(TARGET_SOFT_FLOAT)"
-
ifeq ($(BR2_PACKAGE_GCC_TARGET),y)
EXTRA_TARGET_GCC_CONFIG_OPTIONS:=
diff --git a/toolchain/gcc/gcc-uclibc-4.x.mk b/toolchain/gcc/gcc-uclibc-4.x.mk
index 081e906..cfbe616 100644
--- a/toolchain/gcc/gcc-uclibc-4.x.mk
+++ b/toolchain/gcc/gcc-uclibc-4.x.mk
@@ -393,7 +393,10 @@ $(GCC_BUILD_DIR3)/.configured: $(GCC_BUILD_DIR3)/.prepared
(cd $(GCC_BUILD_DIR3); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
$(TARGET_CONFIGURE_ARGS) \
- $(TARGET_GCC_FLAGS) \
+ CFLAGS_FOR_TARGET="$(TARGET_CFLAGS) $(TARGET_SOFT_FLOAT)" \
+ CXXFLAGS_FOR_TARGET="$(TARGET_CFLAGS) $(TARGET_SOFT_FLOAT)" \
+ CFLAGS="$(TARGET_CFLAGS) $(TARGET_SOFT_FLOAT)" \
+ BOOT_CFLAGS="$(TARGET_CFLAGS) $(TARGET_SOFT_FLOAT)" \
$(GCC_SRC_DIR)/configure $(QUIET) \
--prefix=/usr \
--build=$(GNU_HOST_NAME) \
--
1.7.0.4
^ permalink raw reply related [flat|nested] 7+ messages in thread* [Buildroot] [PATCH 2/4] target-gcc: fix build
2010-07-27 18:18 [Buildroot] [pull request] Pull request for branch fix-gcc-on-target Thomas Petazzoni
2010-07-27 18:18 ` [Buildroot] [PATCH 1/4] target-gcc: Get rid of TARGET_GCC_FLAGS Thomas Petazzoni
@ 2010-07-27 18:18 ` Thomas Petazzoni
2010-07-27 20:45 ` Yann E. MORIN
2010-07-27 18:19 ` [Buildroot] [PATCH 3/4] target-gcc: no need to strip binaries, remove .la files and doc Thomas Petazzoni
` (2 subsequent siblings)
4 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2010-07-27 18:18 UTC (permalink / raw)
To: buildroot
Now that $(STAGING_DIR)/usr/bin is no longer in the PATH, we need to
pass the absolute paths to $(TARGET_CC) when building the target gcc
compiler.
This commit fixes the target gcc build problem reported on the list. I
have successfully been able to build a target gcc for ARM, use it to
compile a hello world application on the target and run this
application.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
toolchain/gcc/gcc-uclibc-4.x.mk | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/toolchain/gcc/gcc-uclibc-4.x.mk b/toolchain/gcc/gcc-uclibc-4.x.mk
index cfbe616..52b20e9 100644
--- a/toolchain/gcc/gcc-uclibc-4.x.mk
+++ b/toolchain/gcc/gcc-uclibc-4.x.mk
@@ -397,6 +397,8 @@ $(GCC_BUILD_DIR3)/.configured: $(GCC_BUILD_DIR3)/.prepared
CXXFLAGS_FOR_TARGET="$(TARGET_CFLAGS) $(TARGET_SOFT_FLOAT)" \
CFLAGS="$(TARGET_CFLAGS) $(TARGET_SOFT_FLOAT)" \
BOOT_CFLAGS="$(TARGET_CFLAGS) $(TARGET_SOFT_FLOAT)" \
+ GCC_FOR_TARGET="$(TARGET_CC)" \
+ CC_FOR_TARGET="$(TARGET_CC)" \
$(GCC_SRC_DIR)/configure $(QUIET) \
--prefix=/usr \
--build=$(GNU_HOST_NAME) \
--
1.7.0.4
^ permalink raw reply related [flat|nested] 7+ messages in thread* [Buildroot] [PATCH 2/4] target-gcc: fix build
2010-07-27 18:18 ` [Buildroot] [PATCH 2/4] target-gcc: fix build Thomas Petazzoni
@ 2010-07-27 20:45 ` Yann E. MORIN
0 siblings, 0 replies; 7+ messages in thread
From: Yann E. MORIN @ 2010-07-27 20:45 UTC (permalink / raw)
To: buildroot
On Tuesday 27 July 2010 20:18:59 Thomas Petazzoni wrote:
>
> Now that $(STAGING_DIR)/usr/bin is no longer in the PATH, we need to
> pass the absolute paths to $(TARGET_CC) when building the target gcc
> compiler.
>
> This commit fixes the target gcc build problem reported on the list. I
> have successfully been able to build a target gcc for ARM, use it to
> compile a hello world application on the target and run this
> application.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
> ---
> toolchain/gcc/gcc-uclibc-4.x.mk | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/toolchain/gcc/gcc-uclibc-4.x.mk b/toolchain/gcc/gcc-uclibc-4.x.mk
> index cfbe616..52b20e9 100644
> --- a/toolchain/gcc/gcc-uclibc-4.x.mk
> +++ b/toolchain/gcc/gcc-uclibc-4.x.mk
> @@ -397,6 +397,8 @@ $(GCC_BUILD_DIR3)/.configured: $(GCC_BUILD_DIR3)/.prepared
> CXXFLAGS_FOR_TARGET="$(TARGET_CFLAGS) $(TARGET_SOFT_FLOAT)" \
> CFLAGS="$(TARGET_CFLAGS) $(TARGET_SOFT_FLOAT)" \
> BOOT_CFLAGS="$(TARGET_CFLAGS) $(TARGET_SOFT_FLOAT)" \
> + GCC_FOR_TARGET="$(TARGET_CC)" \
> + CC_FOR_TARGET="$(TARGET_CC)" \
> $(GCC_SRC_DIR)/configure $(QUIET) \
> --prefix=/usr \
> --build=$(GNU_HOST_NAME) \
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 3/4] target-gcc: no need to strip binaries, remove .la files and doc
2010-07-27 18:18 [Buildroot] [pull request] Pull request for branch fix-gcc-on-target Thomas Petazzoni
2010-07-27 18:18 ` [Buildroot] [PATCH 1/4] target-gcc: Get rid of TARGET_GCC_FLAGS Thomas Petazzoni
2010-07-27 18:18 ` [Buildroot] [PATCH 2/4] target-gcc: fix build Thomas Petazzoni
@ 2010-07-27 18:19 ` Thomas Petazzoni
2010-07-27 18:19 ` [Buildroot] [PATCH 4/4] target-gcc: remove useless copies of gcc Thomas Petazzoni
2010-07-27 20:43 ` [Buildroot] [pull request] Pull request for branch fix-gcc-on-target Peter Korsgaard
4 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2010-07-27 18:19 UTC (permalink / raw)
To: buildroot
This is done in a global way by the target-finalize target of the main
Makefile.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
toolchain/gcc/gcc-uclibc-4.x.mk | 9 ---------
1 files changed, 0 insertions(+), 9 deletions(-)
diff --git a/toolchain/gcc/gcc-uclibc-4.x.mk b/toolchain/gcc/gcc-uclibc-4.x.mk
index 52b20e9..5dec86c 100644
--- a/toolchain/gcc/gcc-uclibc-4.x.mk
+++ b/toolchain/gcc/gcc-uclibc-4.x.mk
@@ -445,15 +445,6 @@ $(TARGET_DIR)/usr/bin/gcc: $(GCC_BUILD_DIR3)/.compiled
# Remove broken specs file (cross compile flag is set).
rm -f $(TARGET_DIR)/usr/$(GCC_LIB_SUBDIR)/specs
- -(cd $(TARGET_DIR)/bin && find -type f | xargs $(STRIPCMD) > /dev/null 2>&1)
- -(cd $(TARGET_DIR)/usr/bin && find -type f | xargs $(STRIPCMD) > /dev/null 2>&1)
- -(cd $(TARGET_DIR)/usr/$(GCC_LIB_SUBDIR) && $(STRIPCMD) cc1 cc1plus collect2 > /dev/null 2>&1)
- -(cd $(TARGET_DIR)/usr/lib && $(STRIPCMD) libstdc++.so.*.*.* > /dev/null 2>&1)
- -(cd $(TARGET_DIR)/lib && $(STRIPCMD) libgcc_s*.so.*.*.* > /dev/null 2>&1)
- #
- rm -f $(TARGET_DIR)/usr/lib/*.la*
- #rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
- # $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
# Work around problem of missing syslimits.h
if [ ! -f $(TARGET_DIR)/usr/$(GCC_LIB_SUBDIR)/$(GCC_INCLUDE_DIR)/syslimits.h ]; then \
echo "warning: working around missing syslimits.h"; \
--
1.7.0.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 4/4] target-gcc: remove useless copies of gcc
2010-07-27 18:18 [Buildroot] [pull request] Pull request for branch fix-gcc-on-target Thomas Petazzoni
` (2 preceding siblings ...)
2010-07-27 18:19 ` [Buildroot] [PATCH 3/4] target-gcc: no need to strip binaries, remove .la files and doc Thomas Petazzoni
@ 2010-07-27 18:19 ` Thomas Petazzoni
2010-07-27 20:43 ` [Buildroot] [pull request] Pull request for branch fix-gcc-on-target Peter Korsgaard
4 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2010-07-27 18:19 UTC (permalink / raw)
To: buildroot
When doing the "make install" of target, three identical copies of gcc
are installed in $(TARGET_DIR)/usr/bin:
039adcc582c365f12ba6fc5f96098128 arm-unknown-linux-uclibcgnueabi-gcc
039adcc582c365f12ba6fc5f96098128 arm-unknown-linux-uclibcgnueabi-gcc-4.3.5
039adcc582c365f12ba6fc5f96098128 gcc
This patch removes the first two copies and keeps only the common "gcc" one.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
toolchain/gcc/gcc-uclibc-4.x.mk | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/toolchain/gcc/gcc-uclibc-4.x.mk b/toolchain/gcc/gcc-uclibc-4.x.mk
index 5dec86c..9720ed3 100644
--- a/toolchain/gcc/gcc-uclibc-4.x.mk
+++ b/toolchain/gcc/gcc-uclibc-4.x.mk
@@ -445,6 +445,9 @@ $(TARGET_DIR)/usr/bin/gcc: $(GCC_BUILD_DIR3)/.compiled
# Remove broken specs file (cross compile flag is set).
rm -f $(TARGET_DIR)/usr/$(GCC_LIB_SUBDIR)/specs
+ # Remove useless copies of gcc
+ rm -f $(TARGET_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-gcc*
+
# Work around problem of missing syslimits.h
if [ ! -f $(TARGET_DIR)/usr/$(GCC_LIB_SUBDIR)/$(GCC_INCLUDE_DIR)/syslimits.h ]; then \
echo "warning: working around missing syslimits.h"; \
--
1.7.0.4
^ permalink raw reply related [flat|nested] 7+ messages in thread* [Buildroot] [pull request] Pull request for branch fix-gcc-on-target
2010-07-27 18:18 [Buildroot] [pull request] Pull request for branch fix-gcc-on-target Thomas Petazzoni
` (3 preceding siblings ...)
2010-07-27 18:19 ` [Buildroot] [PATCH 4/4] target-gcc: remove useless copies of gcc Thomas Petazzoni
@ 2010-07-27 20:43 ` Peter Korsgaard
4 siblings, 0 replies; 7+ messages in thread
From: Peter Korsgaard @ 2010-07-27 20:43 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Thomas> Hello,
Thomas> Here are a few patches concerning target-gcc. One of them is a build
Thomas> fix (issue reported by rfs on IRC), the other ones are minor
Thomas> improvements.
Committed, thanks!
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 7+ messages in thread