diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2016-03-18 22:08:09 +0100 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2016-03-30 00:15:48 +0200 |
commit | 8c2170c76a27297868b36868bbcf190862a2e817 (patch) | |
tree | f8593e5d18177d6d1d5fea3931cb6a60ad6c2299 /package/uclibc | |
parent | 45d7f014517ef7c71b180f5d726d06517d6658c1 (diff) | |
download | buildroot-8c2170c76a27297868b36868bbcf190862a2e817.tar.gz buildroot-8c2170c76a27297868b36868bbcf190862a2e817.zip |
uclibc: disable DOPIC on ARM FLAT
As explained by Waldemar, enabling DOPIC in uClibc will lead to the
creation of a Position Independent library. In turn, this will cause
elf2flt to generate a "Has-PIC-GOT" flat binary, which doesn't work on
ARM. In fact, elf2flt on ARM really expect to have non-PIC code as
input, so we must disable DOPIC in the uClibc configuration.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/uclibc')
-rw-r--r-- | package/uclibc/uclibc.mk | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/package/uclibc/uclibc.mk b/package/uclibc/uclibc.mk index ad94494bcc..e3e45f7bcd 100644 --- a/package/uclibc/uclibc.mk +++ b/package/uclibc/uclibc.mk @@ -82,6 +82,12 @@ ifeq ($(BR2_GCC_VERSION_4_7_X)$(BR2_GCC_VERSION_4_8_X):$(BR2_ARM_INSTRUCTIONS_TH UCLIBC_EXTRA_CFLAGS += -marm endif +ifeq ($(BR2_BINFMT_FLAT),y) +define UCLIBC_ARM_BINFMT_FLAT + $(call KCONFIG_DISABLE_OPT,DOPIC,$(@D)/.config) +endef +endif + endif # arm # @@ -354,6 +360,7 @@ define UCLIBC_KCONFIG_FIXUP_CMDS $(UCLIBC_ARC_TYPE_CONFIG) $(UCLIBC_ARC_PAGE_SIZE_CONFIG) $(UCLIBC_ARM_ABI_CONFIG) + $(UCLIBC_ARM_BINFMT_FLAT) $(UCLIBC_MIPS_ABI_CONFIG) $(UCLIBC_MIPS_ISA_CONFIG) $(UCLIBC_SH_TYPE_CONFIG) |