diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2015-07-24 12:30:31 +0300 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2015-07-24 11:32:39 +0200 |
commit | c44cf2cc97df1729577263d2b0cb5263e8cdc4c1 (patch) | |
tree | 1c0f918496406c8196c9c1086f455c77419e0e6f /package/gcc | |
parent | 89d21ce29b5be996d130f7944095918b3e8dd613 (diff) | |
download | buildroot-c44cf2cc97df1729577263d2b0cb5263e8cdc4c1.tar.gz buildroot-c44cf2cc97df1729577263d2b0cb5263e8cdc4c1.zip |
package/gcc: fix libgcc build for xtensa
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>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/gcc')
-rw-r--r-- | 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 accb429391..501fcea50f 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_CFLAGS)" HOST_GCC_COMMON_CONF_ENV += CXXFLAGS_FOR_TARGET="$(GCC_COMMON_TARGET_CXXFLAGS)" |