* [Buildroot] [PATCH] package/gcc: fix libgcc build for xtensa
@ 2015-07-24 9:30 Max Filippov
2015-07-24 9:32 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Max Filippov @ 2015-07-24 9:30 UTC (permalink / raw)
To: buildroot
xtensa libgcc can't be built with -mtext-section-literals flag, now
coming from TARGET_CFLAGS, because it needs to emit literals to
.init/.fini sections, which is not currently supported.
Filter -mtext-section-literals flag out of GCC_COMMON_TARGET_CFLAGS.
Suggested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
package/gcc/gcc.mk | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
index aaeba7f..77866e2 100644
--- a/package/gcc/gcc.mk
+++ b/package/gcc/gcc.mk
@@ -112,6 +112,13 @@ GCC_COMMON_TARGET_CXXFLAGS = $(filter-out -Os,$(GCC_COMMON_TARGET_CXXFLAGS))
endif
endif
+# Xtensa libgcc can't be built with -mtext-section-literals
+# because of the trick used to generate .init/.fini sections.
+ifeq ($(BR2_xtensa),y)
+GCC_COMMON_TARGET_CFLAGS = $(filter-out -mtext-section-literals,$(TARGET_CFLAGS))
+GCC_COMMON_TARGET_CXXFLAGS = $(filter-out -mtext-section-literals,$(TARGET_CXXFLAGS))
+endif
+
# Propagate options used for target software building to GCC target libs
HOST_GCC_COMMON_CONF_ENV += CFLAGS_FOR_TARGET="$(GCC_COMMON_TARGET_CXXFLAGS)"
HOST_GCC_COMMON_CONF_ENV += CXXFLAGS_FOR_TARGET="$(GCC_COMMON_TARGET_CXXFLAGS)"
--
1.7.7.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH] package/gcc: fix libgcc build for xtensa
2015-07-24 9:30 [Buildroot] [PATCH] package/gcc: fix libgcc build for xtensa Max Filippov
@ 2015-07-24 9:32 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2015-07-24 9:32 UTC (permalink / raw)
To: buildroot
Dear Max Filippov,
On Fri, 24 Jul 2015 12:30:31 +0300, Max Filippov wrote:
> xtensa libgcc can't be built with -mtext-section-literals flag, now
> coming from TARGET_CFLAGS, because it needs to emit literals to
> .init/.fini sections, which is not currently supported.
>
> Filter -mtext-section-literals flag out of GCC_COMMON_TARGET_CFLAGS.
>
> Suggested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
> ---
> package/gcc/gcc.mk | 7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
Applied, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-07-24 9:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-24 9:30 [Buildroot] [PATCH] package/gcc: fix libgcc build for xtensa Max Filippov
2015-07-24 9:32 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox