From: Zhang Jian(Bamvor) <bamvor.zhangjian@huawei.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 3/5] aarch64: ilp32: add ilp32 compiler and linker flags
Date: Mon, 16 Mar 2015 18:00:11 +0800 [thread overview]
Message-ID: <1426500013-1276-4-git-send-email-bamvor.zhangjian@huawei.com> (raw)
In-Reply-To: <1426500013-1276-1-git-send-email-bamvor.zhangjian@huawei.com>
In aarch64, lp64 is the default ABI. Need pass the special flags if
the user want to compile and link ilp32 application.
Signed-off-by: Zhang Jian(Bamvor) <bamvor.zhangjian@huawei.com>
---
package/Makefile.in | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/package/Makefile.in b/package/Makefile.in
index 803b162..23f376f 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -106,6 +106,14 @@ ifeq ($(BR2_arc)$(BR2_ARC_ATOMIC_EXT),yy)
TARGET_ABI += -matomic
endif
+ifeq ($(BR2_AARCH64_ILP32)$(BR2_aarch64),yy)
+TARGET_ABI += -mabi=ilp32 -Xlinker -maarch64linux32
+endif
+
+ifeq ($(BR2_AARCH64_ILP32)$(BR2_aarch64_be),yy)
+TARGET_ABI += -mabi=ilp32 -Xlinker -EB -Xlinker -maarch64linux32b
+endif
+
STAGING_SUBDIR = usr/$(GNU_TARGET_NAME)/sysroot
STAGING_DIR = $(HOST_DIR)/$(STAGING_SUBDIR)
@@ -142,7 +150,7 @@ endif
TARGET_CFLAGS = $(TARGET_CPPFLAGS) $(TARGET_ABI) $(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING)
TARGET_CXXFLAGS = $(TARGET_CFLAGS)
-TARGET_LDFLAGS = $(call qstrip,$(BR2_TARGET_LDFLAGS))
+TARGET_LDFLAGS = $(call qstrip,$(BR2_TARGET_LDFLAGS)) $(TARGET_ABI)
ifeq ($(BR2_BINFMT_FLAT),y)
TARGET_CFLAGS += $(if $($(PKG)_FLAT_STACKSIZE),-Wl$(comma)-elf2flt=-s$($(PKG)_FLAT_STACKSIZE),\
--
1.8.4.5
next prev parent reply other threads:[~2015-03-16 10:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-16 10:00 [Buildroot] [PATCH 0/5] Add ILP32 support in aarch64 Zhang Jian
2015-03-16 10:00 ` [Buildroot] [PATCH 1/5] aarch64: add big endian(aarch64_be) support Zhang Jian
2015-03-16 10:00 ` [Buildroot] [PATCH 2/5] aarch64: ilp32: handle special file name Zhang Jian
2015-03-17 10:27 ` Steven Noonan
2015-03-17 14:31 ` Bamvor Zhang
2015-03-16 10:00 ` Zhang Jian [this message]
2015-03-16 10:00 ` [Buildroot] [PATCH 4/5] aarch64: ilp32: add ilp32 menuconfig Zhang Jian
2015-03-16 10:00 ` [Buildroot] [PATCH 5/5] aarch64: ilp32 defconfig examples Zhang Jian
2015-03-17 13:30 ` [Buildroot] [PATCH 0/5] Add ILP32 support in aarch64 Gustavo Zacarias
2015-03-17 14:44 ` Bamvor Zhang
2015-03-17 17:49 ` Gustavo Zacarias
2015-07-20 11:25 Zhang Jian
2015-07-20 11:25 ` [Buildroot] [PATCH 3/5] aarch64: ilp32: add ilp32 compiler and linker flags Zhang Jian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1426500013-1276-4-git-send-email-bamvor.zhangjian@huawei.com \
--to=bamvor.zhangjian@huawei.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.