Skip to contentSkip to conversation

Add ILP32 support in aarch64

PATCH RESEND Superseded Bamvor Jian Zhang 4 participants 18 messages Aug 13, 2015 – Mar 20, 2016 Kbuild

lore
Share & tools
lore
#0 lore raw

v3 cover Add ILP32 support in aarch64

This is third version of my patches. This previous versions are here[1][2]. The previous discussion, Gustavo agree that only external toolchain is in consideration at this time. I will try to work on the buildroot toolchain after current series patch is upstreamed.

ILP32 is very useful when the user want to migrate from arm 32bit to 64bit with minimal risk. There is almost no code changes after migration. ILP32 could get the better performance compare with arm 32bit (use 64bit register and instruction instead of 32bit one) and aarch64 LP64 (the default ABI in aarch64).

Our test show that the performance of ILP32 is roughly 10% better than arm64 LP64 while the footprint is 86% of LP64. Because of these, It is useful for both embedded and enterprise system.

Here is the details definition of ILP32:
ILP32 is elf32 with aarch64 assembly and is compiled by 64bit compiler. Refer the following table:

  \-            |  arm 32bit  | arm64 ILP32 | arm64 LP64
----------------|-------------|-------------|-------------
instruction set |   armv7-a   |   armv8-a   |   armv8-a
int             |   32bit     |   32bit     |   32bit
long            |   32bit     | **32bit**   |   64bit
pointer         |   32bit     | **32bit**   |   64bit

LP64 is the default ABI on arm64(Implies -mabi=lp64 while compiling), and the kernel remains in LP64 no matter ILP32 enables or not.

These series patches introduce the big endian support in aarch64 and then add ILP32 special filename and menuconfig step by step.

The test of build is based on linaro kernel[3] and toolchain built by linaro ABE environment[4], anyone could built this toolchain through the simpile abe script.

This is my first time I try to contribute the buildroot, feedback is very appreciated. Sorry if there are some coding style issues.

changes since v2
1. rebase on the patch have been .

    "827ba46 aarch64: add big endian(aarch64_be) support"

2. Add "!BR2_aarch64_be" along with "!BR2_aarch64" in patch 1/5 according to the suggestion from Thomas.
3. Improve the ifeq in patch 2/5 according to Gustavo.
4. Do not pass invalid "-mabi" option to ld in patch 3/5 according to Gustavo.

changes since v1

1.  Avoid mabi issue in gcc 4.8 while build aarch64 lp64.
2.  Change default libc, toolchain for ilp32 build.
3.  Others changes suggested by Gustavo.

[1] http://lists.busybox.net/pipermail/buildroot/2015-March/122115.html
[2] http://lists.busybox.net/pipermail/buildroot/2015-March/122424.html
[3] https://git.linaro.org/kernel/linux-linaro-tracking.git
[4] https://wiki.linaro.org/ABE

Bamvor Jian Zhang (5):
aarch64: align aarch64_be config with aarch64s'
aarch64: ilp32: handle special file name
aarch64: ilp32: add ilp32 compiler and linker flags
aarch64: ilp32: add ilp32 build config
aarch64: ilp32 defconfig examples

 Makefile                                           |  6 +++
 arch/Config.in.aarch64                             | 36 ++++++++++++++++++
 configs/aarch64_be_defconfig                       |  2 +
 configs/aarch64_be_ilp32_defconfig                 |  8 ++++
 configs/aarch64_ilp32_defconfig                    |  8 ++++
 package/Makefile.in                                | 13 ++++++-
 package/binutils/Config.in                         |  4 +-
 package/binutils/Config.in.host                    |  5 ++-
 package/dropwatch/Config.in                        |  5 ++-
 package/gcc/Config.in.host                         | 11 +++---
 package/gdb/Config.in.host                         |  2 +-
 package/gpsd/Config.in                             |  2 +-
 package/lightning/Config.in                        |  5 ++-
 package/nginx/Config.in                            |  3 +-
 package/oprofile/Config.in                         |  6 ++-
 toolchain/Config.in                                |  2 +
 toolchain/helpers.mk                               |  5 ++-
 toolchain/toolchain-buildroot/Config.in            |  7 ++--
 toolchain/toolchain-external/Config.in             | 22 +++++++++++
 toolchain/toolchain-external/toolchain-external.mk | 44 +++++++++++++++++++++-
 20 files changed, 169 insertions(+), 27 deletions(-)
 create mode 100644 configs/aarch64_be_defconfig
 create mode 100644 configs/aarch64_be_ilp32_defconfig
 create mode 100644 configs/aarch64_ilp32_defconfig
Signature · 1 line
2.1.4
#1 lore raw

PATCH RESEND v3 1/5 aarch64: align aarch64_be config with aarch64s'

From: Bamvor Jian Zhang <[email protected]>

---
 package/binutils/Config.in              | 4 ++--
 package/binutils/Config.in.host         | 5 +++--
 package/dropwatch/Config.in             | 5 +++--
 package/gcc/Config.in.host              | 8 ++++----
 package/gdb/Config.in.host              | 2 +-
 package/gpsd/Config.in                  | 2 +-
 package/lightning/Config.in             | 5 +++--
 package/nginx/Config.in                 | 3 +--
 package/oprofile/Config.in              | 6 ++++--
 toolchain/toolchain-buildroot/Config.in | 7 ++++---
 10 files changed, 26 insertions(+), 21 deletions(-)
package/binutils/Config.in +2 -2
index 64d0a09..f9e0f16 100644
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_BINUTILS
 	bool "binutils"
 	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
-	depends on !BR2_aarch64 && !BR2_nios2
+	depends on !BR2_aarch64 && !BR2_aarch64_be && !BR2_nios2
 	depends on BR2_USE_WCHAR
 	help
 	  Install binutils on the target
@@ -22,5 +22,5 @@ config BR2_PACKAGE_BINUTILS_TARGET
 endif
 
 comment "binutils needs a toolchain w/ wchar"
-	depends on !BR2_aarch64 && !BR2_nios2
+	depends on !BR2_aarch64 && !BR2_aarch64_be && !BR2_nios2
 	depends on !BR2_USE_WCHAR
package/binutils/Config.in.host +3 -2
index 40619ab..0ead1ff 100644
@@ -8,8 +8,9 @@ choice
 	  Select the version of binutils you wish to use.
 
 	config BR2_BINUTILS_VERSION_2_23_X
-		depends on !BR2_aarch64 && !BR2_microblaze && \
-			   !BR2_powerpc64le && !BR2_nios2
+		depends on !BR2_aarch64 && !BR2_aarch64_be && \
+			   !BR2_microblaze && !BR2_powerpc64le && \
+			   !BR2_nios2
 		bool "binutils 2.23.2"
 
 	config BR2_BINUTILS_VERSION_2_24_X
package/dropwatch/Config.in +3 -2
index d331e5e..e109242 100644
@@ -1,7 +1,8 @@
 config BR2_PACKAGE_DROPWATCH
 	bool "dropwatch"
 	select BR2_PACKAGE_BINUTILS
-	depends on !BR2_aarch64 && !BR2_nios2 # binutils
+	# binutils
+	depends on !BR2_aarch64 && !BR2_aarch64_be && !BR2_nios2
 	depends on BR2_USE_WCHAR # binutils
 	select BR2_PACKAGE_READLINE
 	select BR2_PACKAGE_LIBNL
@@ -13,5 +14,5 @@ config BR2_PACKAGE_DROPWATCH
 	  https://fedorahosted.org/dropwatch/
 
 comment "dropwatch needs a toolchain w/ threads, wchar"
-	depends on !BR2_aarch64 && !BR2_nios2
+	depends on !BR2_aarch64 && !BR2_aarch64_be && !BR2_nios2
 	depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR
package/gcc/Config.in.host +4 -4
index baa7956..7014e7f 100644
@@ -17,8 +17,8 @@ choice
 		bool "gcc 4.5.x"
 		depends on BR2_DEPRECATED_SINCE_2015_05
 		# Broken or unsupported architectures
-		depends on !BR2_microblaze && !BR2_aarch64 && !BR2_arc \
-			&& !BR2_powerpc64le && !BR2_nios2
+		depends on !BR2_microblaze && !BR2_aarch64 && !BR2_aarch64_be && \
+			   !BR2_arc && !BR2_powerpc64le && !BR2_nios2
 		# Broken or unsupported ARM cores
 		depends on !BR2_cortex_a7 && !BR2_cortex_a12 && \
 			!BR2_cortex_a15 && !BR2_fa526 && !BR2_pj4
@@ -39,8 +39,8 @@ choice
 	config BR2_GCC_VERSION_4_7_X
 		bool "gcc 4.7.x"
 		# Broken or unsupported architectures
-		depends on !BR2_microblaze && !BR2_aarch64 && !BR2_arc \
-			&& !BR2_powerpc64le && !BR2_nios2
+		depends on !BR2_microblaze && !BR2_aarch64 && !BR2_aarch64_be && \
+			   !BR2_arc && !BR2_powerpc64le && !BR2_nios2
 		# Broken or unsupported ARM cores
 		depends on !BR2_cortex_a12 && !BR2_pj4
 		# Broken or unsupported PPC cores
package/gdb/Config.in.host +1 -1
index 3207794..d736f25 100644
@@ -4,7 +4,7 @@ config BR2_PACKAGE_HOST_GDB
 	# allow to build a cross-gdb, as the one of the external
 	# toolchain should be used.
 	depends on !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY
-	depends on !BR2_aarch64 && !BR2_nios2
+	depends on !BR2_aarch64 && !BR2_aarch64_be && !BR2_nios2
 	help
 	  Build a cross gdb that runs on the host machine and debugs
 	  programs running on the target. It requires 'gdbserver'
package/gpsd/Config.in +1 -1
index fa8b8f6..36813ab 100644
@@ -39,7 +39,7 @@ config BR2_PACKAGE_GPSD_OLDSTYLE
 config BR2_PACKAGE_GPSD_PROFILING
 	bool "profiling support"
 	depends on BR2_TOOLCHAIN_USES_GLIBC
-	depends on !BR2_aarch64
+	depends on !BR2_aarch64 && !BR2_aarch64_be
 
 comment "profiling support not available with uClibc-based toolchain"
 	depends on !BR2_TOOLCHAIN_USES_GLIBC
package/lightning/Config.in +3 -2
index 8caf39f..3ca477a 100644
@@ -14,13 +14,14 @@ config BR2_PACKAGE_LIGHTNING_DISASSEMBLER
 	bool "enable disassembler"
 	select BR2_PACKAGE_BINUTILS
 	select BR2_PACKAGE_ZLIB
-	depends on !BR2_aarch64 && !BR2_nios2 # binutils
+	# binutils
+	depends on !BR2_aarch64 && !BR2_aarch64_be && !BR2_nios2
 	depends on BR2_USE_WCHAR # binutils
 	help
 	  Enable the GNU lightning disassembler.
 
 comment "lightning disassembler needs a toolchain w/ wchar"
-	depends on !BR2_aarch64 && !BR2_nios2
+	depends on !BR2_aarch64 && !BR2_aarch64_be && !BR2_nios2
 	depends on !BR2_USE_WCHAR
 
 endif
package/nginx/Config.in +1 -2
index be445f4..ef0266e 100644
@@ -15,8 +15,7 @@ config BR2_PACKAGE_NGINX_FILE_AIO
 	# but it's available on neither AArch64 nor ARC where only
 	# eventfd() is available. See
 	# https://bugs.launchpad.net/linaro-aarch64/+bug/1160013
-	depends on !BR2_aarch64
-	depends on !BR2_arc
+	depends on !BR2_aarch64 && !BR2_aarch64_be && !BR2_arc
 
 config BR2_PACKAGE_NGINX_HTTP
 	bool "http server"
package/oprofile/Config.in +4 -2
index 9cf5693..b5d0bb6 100644
@@ -5,7 +5,8 @@ config BR2_PACKAGE_OPROFILE
 	select BR2_PACKAGE_BINUTILS
 	select BR2_PACKAGE_LIBPFM4 if BR2_powerpc
 	depends on BR2_INSTALL_LIBSTDCPP
-	depends on !BR2_aarch64 && !BR2_nios2 # binutils
+	# binutils
+	depends on !BR2_aarch64 && !BR2_aarch64_be && !BR2_nios2
 	depends on BR2_USE_WCHAR # binutils
 	depends on !BR2_xtensa
 	# libpfm4 is needed on PowerPC, and requires thread support
@@ -28,7 +29,8 @@ config BR2_PACKAGE_OPROFILE
 
 comment "oprofile needs a toolchain w/ C++, wchar"
 	depends on BR2_USE_MMU
-	depends on !BR2_aarch64 && !BR2_nios2 && !BR2_xtensa
+	depends on !BR2_aarch64 && !BR2_aarch64_be && !BR2_nios2 && \
+		   !BR2_xtensa
 	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR
 
 comment "oprofile needs a toolchain w/ NPTL on PPC"
toolchain/toolchain-buildroot/Config.in +4 -3
index 13e2b15..0869243 100644
@@ -85,9 +85,10 @@ comment "(e)glibc only available with shared lib support"
 
 config BR2_TOOLCHAIN_BUILDROOT_MUSL
 	bool "musl (experimental)"
-	depends on BR2_aarch64 || BR2_arm || BR2_armeb || BR2_i386 || \
-		BR2_microblaze || BR2_mips || BR2_mipsel || BR2_powerpc || \
-		BR2_sh || BR2_x86_64
+	depends on BR2_arm         || BR2_armeb      || BR2_aarch64 || \
+		   BR2_aarch64_be  || BR2_i386       || BR2_microblaze || \
+		   BR2_mips        || BR2_mipsel     || BR2_powerpc || \
+		   BR2_sh          || BR2_x86_64
 	depends on !BR2_powerpc_SPE # not supported, build breaks
 	select BR2_TOOLCHAIN_USES_MUSL
 	help
Signature · 1 line
2.1.4
#2 lore raw

PATCH RESEND v3 2/5 aarch64: ilp32: handle special file name

In reply to Bamvor Jian Zhang

From: Bamvor Jian Zhang <[email protected]>

In aarch64 ilp32, the directory of library is libilp32. And the linker is ld-linux-aarch64_ilp32.so.1 or ld-linux-aarch64_be_ilp32.so.1 which is linked to libilp32/ld-VERSION.so(ld-2.20.so in my system).

---
 Makefile                                           |  6 +++
 toolchain/helpers.mk                               |  5 ++-
 toolchain/toolchain-external/toolchain-external.mk | 44 +++++++++++++++++++++-
 3 files changed, 51 insertions(+), 4 deletions(-)
Makefile +6 -0
index b4cef3f..df9a289 100644
@@ -452,6 +452,12 @@ LIB_SYMLINK = lib64
 else
 LIB_SYMLINK = lib32
 endif
+ifeq ($(BR2_GCC_TARGET_ABI), "ilp32")
+# On X86_64, ilp32 library will be located in libx32 directory.
+ifeq ($(BR2_aarch64)$(BR2_aarch64_be),y)
+LIB_SYMLINK = libilp32
+endif
+endif
 
 $(STAGING_DIR):
 	@mkdir -p $(STAGING_DIR)/bin
toolchain/helpers.mk +3 -2
index 7c70d35..32f1587 100644
@@ -38,7 +38,7 @@
 #
 # $1: arch specific sysroot directory
 # $2: support libraries directory (can be empty)
-# $3: library directory ('lib' or 'lib64') from which libraries must be copied
+# $3: library directory ('lib', 'lib64' or 'libilp32') from which libraries must be copied
 # $4: library name
 # $5: destination directory of the libary, relative to $(TARGET_DIR)
 #
@@ -141,7 +141,8 @@ copy_toolchain_sysroot = \
 		if [ -d $${ARCH_SYSROOT_DIR}/$$i ] ; then \
 			rsync -au --chmod=u=rwX,go=rX --exclude 'usr/lib/locale' \
 				--exclude lib --exclude lib32 --exclude lib64 \
-				$${ARCH_SYSROOT_DIR}/$$i/ $(STAGING_DIR)/$$i/ ; \
+				--exclude libilp32 $${ARCH_SYSROOT_DIR}/$$i/ \
+				$(STAGING_DIR)/$$i/ ; \
 		fi ; \
 	done ; \
 	if [ `readlink -f $${SYSROOT_DIR}` != `readlink -f $${ARCH_SYSROOT_DIR}` ] ; then \
toolchain/toolchain-external/toolchain-external.mk +42 -2

93 lines not on this page · raw message

Signature · 1 line
2.1.4
#3 lore raw

PATCH RESEND v3 3/5 aarch64: ilp32: add ilp32 compiler and linker flags

In reply to Bamvor Jian Zhang

From: Bamvor Jian Zhang <[email protected]>

In aarch64, lp64 is the default ABI. Need pass the special flags if the user want to compile and link ilp32 application. Pass the special flags to linker to ensure that linker see the same abi with compiler.

---
 package/Makefile.in | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
package/Makefile.in +12 -1
index 545694f..fa81b44 100644
@@ -107,6 +107,17 @@ ifeq ($(BR2_arc)$(BR2_ARC_ATOMIC_EXT),yy)
 TARGET_ABI += -matomic
 endif
 
+ifeq ($(BR2_GCC_TARGET_ABI), "ilp32")
+ifeq ($(BR2_aarch64)$(BR2_aarch64_be),y)
+ifeq ($(BR2_ENDIAN), "BIG")
+TARGET_ABI_LDFLAGS += -Xlinker -EB -Xlinker -maarch64linux32b
+else
+TARGET_ABI_LDFLAGS += -Xlinker -maarch64linux32
+endif
+TARGET_ABI += -mabi=ilp32 $(TARGET_ABI_LDFLAGS)
+endif
+endif
+
 STAGING_SUBDIR = usr/$(GNU_TARGET_NAME)/sysroot
 STAGING_DIR    = $(HOST_DIR)/$(STAGING_SUBDIR)
 
@@ -140,7 +151,7 @@ endif
 TARGET_CPPFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
 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_LDFLAGS)
 
 ifeq ($(BR2_BINFMT_FLAT),y)
 TARGET_CFLAGS += $(if $($(PKG)_FLAT_STACKSIZE),-Wl$(comma)-elf2flt=-s$($(PKG)_FLAT_STACKSIZE),\
Signature · 1 line
2.1.4
#4 lore raw

PATCH RESEND v3 4/5 aarch64: ilp32: add ilp32 build config

In reply to Bamvor Jian Zhang

From: Bamvor Jian Zhang <[email protected]>

Add ILP32 in menuconfig. And disable the libc and toolchain which does not support ILP32.

---
 arch/Config.in.aarch64                 | 36 ++++++++++++++++++++++++++++++++++
 package/gcc/Config.in.host             |  3 ++-
 toolchain/Config.in                    |  2 ++
 toolchain/toolchain-external/Config.in | 22 +++++++++++++++++++++
 4 files changed, 62 insertions(+), 1 deletion(-)
arch/Config.in.aarch64 +36 -0
index 325bccc..b4e3e43 100644
@@ -8,3 +8,39 @@ config BR2_ENDIAN
 
 config BR2_ARCH_HAS_ATOMICS
 	default y
+
+config BR2_GCC_TARGET_ABI
+	default "" if BR2_AARCH64_LP64
+	default "ilp32" if BR2_AARCH64_ILP32
+
+choice
+	prompt "Target ABI"
+	depends on BR2_aarch64 || BR2_aarch64_be
+	default BR2_AARCH64_LP64
+	help
+	  Application Binary Interface to use. The Application Binary
+	  Interface describes the calling conventions (how arguments
+	  are passed to functions, how the return value is passed, how
+	  system calls are made, etc.).
+
+config BR2_AARCH64_LP64
+	bool "LP64"
+	help
+	  The LP64 is the default ABI in aarch64. It means that
+	  long and pointer is 64bit.
+
+config BR2_AARCH64_ILP32
+	bool "ILP32"
+	help
+	  ILP32 is a method for running 32bit application on 64bit platform, such
+	  binary is elf32 with aarch64 assembly and is compiled by 64bit compiler.
+	  Refer the following table:
+
+	    \-            |  arm 32bit  | arm64 ILP32 | arm64 LP64
+	  ----------------|-------------|-------------|-------------
+	  instruction set |   armv7-a   |   armv8-a   |   armv8-a
+	  int             |   32bit     |   32bit     |   32bit
+	  long            |   32bit     | **32bit**   |   64bit
+	  pointer         |   32bit     | **32bit**   |   64bit
+
+endchoice
package/gcc/Config.in.host +2 -1
index 7014e7f..7546953 100644
@@ -57,7 +57,8 @@ choice
 		bool "gcc 4.8.x"
 		# Broken or unsupported architectures
 		depends on !BR2_microblaze && !BR2_arc \
-			&& !BR2_powerpc64le && !BR2_nios2
+			&& !BR2_powerpc64le && !BR2_nios2 \
+			&& !BR2_AARCH64_ILP32
 		# Broken or unsupported ARM cores
 		depends on !BR2_cortex_a12
 		# Broken or unsupported PPC cores
toolchain/Config.in +2 -0
index a851ce4..794bf8b 100644
@@ -27,6 +27,7 @@ config BR2_TOOLCHAIN_USES_MUSL
 	select BR2_TOOLCHAIN_HAS_THREADS
 	select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
 	select BR2_TOOLCHAIN_HAS_THREADS_NPTL
+	depends on !BR2_AARCH64_ILP32
 
 choice
 	prompt "Toolchain type"
@@ -40,6 +41,7 @@ choice
 config BR2_TOOLCHAIN_BUILDROOT
 	bool "Buildroot toolchain"
 	depends on !BR2_bfin
+	depends on !BR2_AARCH64_ILP32
 	select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
 
 config BR2_TOOLCHAIN_EXTERNAL
toolchain/toolchain-external/Config.in +22 -0
index 0b45e12..7c58bf9 100644
@@ -604,6 +604,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201203
 	depends on BR2_sh4a || BR2_sh4aeb
 	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
 	depends on !BR2_STATIC_LIBS
+	depends on !BR2_AARCH64_ILP32
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
 	select BR2_INSTALL_LIBSTDCPP
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
@@ -628,6 +629,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201103
 	depends on BR2_sh4a || BR2_sh4aeb
 	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
 	depends on !BR2_STATIC_LIBS
+	depends on !BR2_AARCH64_ILP32
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
 	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_INSTALL_LIBSTDCPP
@@ -814,6 +816,7 @@ config BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64
 	depends on BR2_aarch64
 	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
 	depends on !BR2_STATIC_LIBS
+	depends on !BR2_AARCH64_ILP32
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
 	select BR2_INSTALL_LIBSTDCPP
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
@@ -829,6 +832,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64
 	depends on BR2_aarch64
 	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
 	depends on !BR2_STATIC_LIBS
+	depends on !BR2_AARCH64_ILP32
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
 	select BR2_INSTALL_LIBSTDCPP
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
@@ -1078,69 +1082,86 @@ config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_16
 config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_15
 	bool "3.15.x"
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
+	depends on !BR2_AARCH64_ILP32
 
 config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_14
 	bool "3.14.x"
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
+	depends on !BR2_AARCH64_ILP32
 
 config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_13
 	bool "3.13.x"
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
+	depends on !BR2_AARCH64_ILP32
 
 config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_12
 	bool "3.12.x"
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
+	depends on !BR2_AARCH64_ILP32
 
 config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_11
 	bool "3.11.x"
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
+	depends on !BR2_AARCH64_ILP32
 
 config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_10
 	bool "3.10.x"
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
+	depends on !BR2_AARCH64_ILP32
 
 config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_9
 	bool "3.9.x"
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
+	depends on !BR2_AARCH64_ILP32
 
 config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_8
 	bool "3.8.x"
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
+	depends on !BR2_AARCH64_ILP32
 
 config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_7
 	bool "3.7.x"
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
+	depends on !BR2_AARCH64_ILP32
 
 config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_6
 	bool "3.6.x"
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
+	depends on !BR2_AARCH64_ILP32
 
 config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_5
 	bool "3.5.x"
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
+	depends on !BR2_AARCH64_ILP32
 
 config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_4
 	bool "3.4.x"
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
+	depends on !BR2_AARCH64_ILP32
 
 config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_3
 	bool "3.3.x"
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
+	depends on !BR2_AARCH64_ILP32
 
 config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_2
 	bool "3.2.x"
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
+	depends on !BR2_AARCH64_ILP32
 
 config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_1
 	bool "3.1.x"
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
+	depends on !BR2_AARCH64_ILP32
 
 config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_0
 	bool "3.0.x"
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
+	depends on !BR2_AARCH64_ILP32
 
 config BR2_TOOLCHAIN_EXTERNAL_HEADERS_REALLY_OLD
 	bool "2.6.x"
+	depends on !BR2_AARCH64_ILP32
 
 endchoice
 
@@ -1151,6 +1172,7 @@ choice
 config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC
 	bool "uClibc"
 	select BR2_TOOLCHAIN_EXTERNAL_UCLIBC
+	depends on !BR2_AARCH64_ILP32
 	# For the time being, we assume that all custom external
 	# toolchains have shadow password support.
 	select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
Signature · 1 line
2.1.4
#5 lore raw

PATCH RESEND v3 5/5 aarch64: ilp32 defconfig examples

In reply to Bamvor Jian Zhang

From: Bamvor Jian Zhang <[email protected]>

DO NOT APPLY.

Test aarch64 lp64 through qemu_aarch64_virt_defconfig. Test aarch64 ilp32, aarch64_be lp64, aarch64_be ilp32 through the following config.

---
 configs/aarch64_be_defconfig       | 2 ++
 configs/aarch64_be_ilp32_defconfig | 8 ++++++++
 configs/aarch64_ilp32_defconfig    | 8 ++++++++
 3 files changed, 18 insertions(+)
 create mode 100644 configs/aarch64_be_defconfig
 create mode 100644 configs/aarch64_be_ilp32_defconfig
 create mode 100644 configs/aarch64_ilp32_defconfig
configs/aarch64_be_defconfig new file +2 -0
new file mode 100644
index 0000000..6995953
@@ -0,0 +1,2 @@
+# Architecture
+BR2_aarch64_be=y
configs/aarch64_be_ilp32_defconfig new file +8 -0
new file mode 100644
index 0000000..6a2848a
@@ -0,0 +1,8 @@
+# Architecture
+BR2_aarch64_be=y
+BR2_AARCH64_ILP32=y
+BR2_TOOLCHAIN_EXTERNAL_PATH="/path/to/your/toolchain"
+BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="$(ARCH)-linux-gnu"
+BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_16=y
+BR2_TOOLCHAIN_EXTERNAL_INET_RPC=y
+BR2_TOOLCHAIN_EXTERNAL_CXX=y
configs/aarch64_ilp32_defconfig new file +8 -0
new file mode 100644
index 0000000..2b59806
@@ -0,0 +1,8 @@
+# Architecture
+BR2_aarch64=y
+BR2_AARCH64_ILP32=y
+BR2_TOOLCHAIN_EXTERNAL_PATH="/home/bamvor/works/software/toolchain/gcc-linaro-4.9~git82c1251-aarch64_aarch64-ilp32-linux-gnu-20150310"
+BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="$(ARCH)-ilp32-linux-gnu"
+BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_16=y
+BR2_TOOLCHAIN_EXTERNAL_INET_RPC=y
+BR2_TOOLCHAIN_EXTERNAL_CXX=y
Signature · 1 line
2.1.4
#6 lore raw

v3 cover Add ILP32 support in aarch64

In reply to Bamvor Jian Zhang

Hello Bamvor,

Le 13/08/2015 03:16, Bamvor Jian Zhang a ?crit :

Quoted 32 lines

This is third version of my patches. This previous versions are here[1][2]. The previous discussion, Gustavo agree that only external toolchain is in consideration at this time. I will try to work on the buildroot toolchain after current series patch is upstreamed.

ILP32 is very useful when the user want to migrate from arm 32bit to 64bit with minimal risk. There is almost no code changes after migration. ILP32 could get the better performance compare with arm 32bit (use 64bit register and instruction instead of 32bit one) and aarch64 LP64 (the default ABI in aarch64).

Our test show that the performance of ILP32 is roughly 10% better than arm64 LP64 while the footprint is 86% of LP64. Because of these, It is useful for both embedded and enterprise system.

Here is the details definition of ILP32:
ILP32 is elf32 with aarch64 assembly and is compiled by 64bit compiler. Refer the following table:

  \-            |  arm 32bit  | arm64 ILP32 | arm64 LP64
----------------|-------------|-------------|-------------
instruction set |   armv7-a   |   armv8-a   |   armv8-a
int             |   32bit     |   32bit     |   32bit
long            |   32bit     | **32bit**   |   64bit
pointer         |   32bit     | **32bit**   |   64bit

LP64 is the default ABI on arm64(Implies -mabi=lp64 while compiling), and the kernel remains in LP64 no matter ILP32 enables or not.

These series patches introduce the big endian support in aarch64 and then add ILP32 special filename and menuconfig step by step.

Quoted 6 lines

The test of build is based on linaro kernel[3] and toolchain built by linaro ABE environment[4], anyone could built this toolchain through the simpile abe script.

This is my first time I try to contribute the buildroot, feedback is very appreciated. Sorry if there are some coding style issues.

Thanks for this series and sorry for the long delay to reply...

I tried to build a aarch64 ilp32 toolchain using the current abe master but it seems that ilp32 support is not mainline yet.
I'm not sure we want to modify the Buildroot external toolchain code to use an "experimental" toolchain (origin/will/ilp32 branch).

Can you provide the command lines you used to build the toolchain ? on which abe branch ? Otherwise we can't test your series.

Do you know if Linaro plans to release a ipl32 toolchain ?

Best regards,
Romain Naour

Quoted 52 lines

changes since v2
1. rebase on the patch have been .

    "827ba46 aarch64: add big endian(aarch64_be) support"

2. Add "!BR2_aarch64_be" along with "!BR2_aarch64" in patch 1/5 according to the suggestion from Thomas.
3. Improve the ifeq in patch 2/5 according to Gustavo.
4. Do not pass invalid "-mabi" option to ld in patch 3/5 according to Gustavo.

changes since v1

1.  Avoid mabi issue in gcc 4.8 while build aarch64 lp64.
2.  Change default libc, toolchain for ilp32 build.
3.  Others changes suggested by Gustavo.

[1] http://lists.busybox.net/pipermail/buildroot/2015-March/122115.html
[2] http://lists.busybox.net/pipermail/buildroot/2015-March/122424.html
[3] https://git.linaro.org/kernel/linux-linaro-tracking.git
[4] https://wiki.linaro.org/ABE

Bamvor Jian Zhang (5):
aarch64: align aarch64_be config with aarch64s'
aarch64: ilp32: handle special file name
aarch64: ilp32: add ilp32 compiler and linker flags
aarch64: ilp32: add ilp32 build config
aarch64: ilp32 defconfig examples

 Makefile                                           |  6 +++
 arch/Config.in.aarch64                             | 36 ++++++++++++++++++
 configs/aarch64_be_defconfig                       |  2 +
 configs/aarch64_be_ilp32_defconfig                 |  8 ++++
 configs/aarch64_ilp32_defconfig                    |  8 ++++
 package/Makefile.in                                | 13 ++++++-
 package/binutils/Config.in                         |  4 +-
 package/binutils/Config.in.host                    |  5 ++-
 package/dropwatch/Config.in                        |  5 ++-
 package/gcc/Config.in.host                         | 11 +++---
 package/gdb/Config.in.host                         |  2 +-
 package/gpsd/Config.in                             |  2 +-
 package/lightning/Config.in                        |  5 ++-
 package/nginx/Config.in                            |  3 +-
 package/oprofile/Config.in                         |  6 ++-
 toolchain/Config.in                                |  2 +
 toolchain/helpers.mk                               |  5 ++-
 toolchain/toolchain-buildroot/Config.in            |  7 ++--
 toolchain/toolchain-external/Config.in             | 22 +++++++++++
 toolchain/toolchain-external/toolchain-external.mk | 44 +++++++++++++++++++++-
 20 files changed, 169 insertions(+), 27 deletions(-)
 create mode 100644 configs/aarch64_be_defconfig
 create mode 100644 configs/aarch64_be_ilp32_defconfig
 create mode 100644 configs/aarch64_ilp32_defconfig
#7 lore raw

v3 cover Add ILP32 support in aarch64

Hi, Romain

Quoted 44 lines · Romain Naour

Hello Bamvor,

Le 13/08/2015 03:16, Bamvor Jian Zhang a ?crit :

Quoted 32 lines

This is third version of my patches. This previous versions are here[1][2]. The previous discussion, Gustavo agree that only external toolchain is in consideration at this time. I will try to work on the buildroot toolchain after current series patch is upstreamed.

ILP32 is very useful when the user want to migrate from arm 32bit to 64bit with minimal risk. There is almost no code changes after migration. ILP32 could get the better performance compare with arm 32bit (use 64bit register and instruction instead of 32bit one) and aarch64 LP64 (the default ABI in aarch64).

Our test show that the performance of ILP32 is roughly 10% better than arm64 LP64 while the footprint is 86% of LP64. Because of these, It is useful for both embedded and enterprise system.

Here is the details definition of ILP32:
ILP32 is elf32 with aarch64 assembly and is compiled by 64bit compiler. Refer the following table:

  \-            |  arm 32bit  | arm64 ILP32 | arm64 LP64
----------------|-------------|-------------|-------------
instruction set |   armv7-a   |   armv8-a   |   armv8-a
int             |   32bit     |   32bit     |   32bit
long            |   32bit     | **32bit**   |   64bit
pointer         |   32bit     | **32bit**   |   64bit

LP64 is the default ABI on arm64(Implies -mabi=lp64 while compiling), and the kernel remains in LP64 no matter ILP32 enables or not.

These series patches introduce the big endian support in aarch64 and then add ILP32 special filename and menuconfig step by step.

Quoted 6 lines

The test of build is based on linaro kernel[3] and toolchain built by linaro ABE environment[4], anyone could built this toolchain through the simpile abe script.

This is my first time I try to contribute the buildroot, feedback is very appreciated. Sorry if there are some coding style issues.

Thanks for this series and sorry for the long delay to reply...

Quoted 7 lines

I tried to build a aarch64 ilp32 toolchain using the current abe master but it seems that ilp32 support is not mainline yet.
I'm not sure we want to modify the Buildroot external toolchain code to use an "experimental" toolchain (origin/will/ilp32 branch).

Can you provide the command lines you used to build the toolchain ? on which abe branch ? Otherwise we can't test your series.

You could find the toolchain here[1]

Quoted 2 lines

Do you know if Linaro plans to release a ipl32 toolchain ?

It seems that linaro will not release it before patches for ilp32 of kernel and glibc upstreamed.
Here[2] is a status for ilp32 in linaro.

Regards

Bamvor

[1] http://people.linaro.org/~maxim.kuvyrkov/bench-ilp32/
[2] https://wiki.linaro.org/Platform/arm64-ilp32

Quoted 56 lines

Best regards,
Romain Naour

Quoted 52 lines

changes since v2
1. rebase on the patch have been .

    "827ba46 aarch64: add big endian(aarch64_be) support"

2. Add "!BR2_aarch64_be" along with "!BR2_aarch64" in patch 1/5 according to the suggestion from Thomas.
3. Improve the ifeq in patch 2/5 according to Gustavo.
4. Do not pass invalid "-mabi" option to ld in patch 3/5 according to Gustavo.

changes since v1

1.  Avoid mabi issue in gcc 4.8 while build aarch64 lp64.
2.  Change default libc, toolchain for ilp32 build.
3.  Others changes suggested by Gustavo.

[1] http://lists.busybox.net/pipermail/buildroot/2015-March/122115.html
[2] http://lists.busybox.net/pipermail/buildroot/2015-March/122424.html
[3] https://git.linaro.org/kernel/linux-linaro-tracking.git
[4] https://wiki.linaro.org/ABE

Bamvor Jian Zhang (5):
aarch64: align aarch64_be config with aarch64s'
aarch64: ilp32: handle special file name
aarch64: ilp32: add ilp32 compiler and linker flags
aarch64: ilp32: add ilp32 build config
aarch64: ilp32 defconfig examples

 Makefile                                           |  6 +++
 arch/Config.in.aarch64                             | 36 ++++++++++++++++++
 configs/aarch64_be_defconfig                       |  2 +
 configs/aarch64_be_ilp32_defconfig                 |  8 ++++
 configs/aarch64_ilp32_defconfig                    |  8 ++++
 package/Makefile.in                                | 13 ++++++-
 package/binutils/Config.in                         |  4 +-
 package/binutils/Config.in.host                    |  5 ++-
 package/dropwatch/Config.in                        |  5 ++-
 package/gcc/Config.in.host                         | 11 +++---
 package/gdb/Config.in.host                         |  2 +-
 package/gpsd/Config.in                             |  2 +-
 package/lightning/Config.in                        |  5 ++-
 package/nginx/Config.in                            |  3 +-
 package/oprofile/Config.in                         |  6 ++-
 toolchain/Config.in                                |  2 +
 toolchain/helpers.mk                               |  5 ++-
 toolchain/toolchain-buildroot/Config.in            |  7 ++--
 toolchain/toolchain-external/Config.in             | 22 +++++++++++
 toolchain/toolchain-external/toolchain-external.mk | 44 +++++++++++++++++++++-
 20 files changed, 169 insertions(+), 27 deletions(-)
 create mode 100644 configs/aarch64_be_defconfig
 create mode 100644 configs/aarch64_be_ilp32_defconfig
 create mode 100644 configs/aarch64_ilp32_defconfig
Signature · 3 lines
-----------------------------
   blog: http://aarch64.me
-----------------------------
#8 lore raw

v3 cover Add ILP32 support in aarch64

Hi Bamvor,

Le 19/01/2016 05:00, Bamvor Zhang Jian a ?crit :

Quoted 47 lines

Hi, Romain

Quoted 44 lines · Romain Naour

Hello Bamvor,

Le 13/08/2015 03:16, Bamvor Jian Zhang a ?crit :

Quoted 32 lines

This is third version of my patches. This previous versions are here[1][2]. The previous discussion, Gustavo agree that only external toolchain is in consideration at this time. I will try to work on the buildroot toolchain after current series patch is upstreamed.

ILP32 is very useful when the user want to migrate from arm 32bit to 64bit with minimal risk. There is almost no code changes after migration. ILP32 could get the better performance compare with arm 32bit (use 64bit register and instruction instead of 32bit one) and aarch64 LP64 (the default ABI in aarch64).

Our test show that the performance of ILP32 is roughly 10% better than arm64 LP64 while the footprint is 86% of LP64. Because of these, It is useful for both embedded and enterprise system.

Here is the details definition of ILP32:
ILP32 is elf32 with aarch64 assembly and is compiled by 64bit compiler. Refer the following table:

  \-            |  arm 32bit  | arm64 ILP32 | arm64 LP64
----------------|-------------|-------------|-------------
instruction set |   armv7-a   |   armv8-a   |   armv8-a
int             |   32bit     |   32bit     |   32bit
long            |   32bit     | **32bit**   |   64bit
pointer         |   32bit     | **32bit**   |   64bit

LP64 is the default ABI on arm64(Implies -mabi=lp64 while compiling), and the kernel remains in LP64 no matter ILP32 enables or not.

These series patches introduce the big endian support in aarch64 and then add ILP32 special filename and menuconfig step by step.

Quoted 6 lines

The test of build is based on linaro kernel[3] and toolchain built by linaro ABE environment[4], anyone could built this toolchain through the simpile abe script.

This is my first time I try to contribute the buildroot, feedback is very appreciated. Sorry if there are some coding style issues.

Thanks for this series and sorry for the long delay to reply...

Quoted 8 lines
Quoted 7 lines

I tried to build a aarch64 ilp32 toolchain using the current abe master but it seems that ilp32 support is not mainline yet.
I'm not sure we want to modify the Buildroot external toolchain code to use an "experimental" toolchain (origin/will/ilp32 branch).

Can you provide the command lines you used to build the toolchain ? on which abe branch ? Otherwise we can't test your series.

You could find the toolchain here[1]

Thanks but this is not a cross-toolchain:

file bin/aarch64-ilp32-linux-gnu-gcc bin/aarch64-ilp32-linux-gnu-gcc: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=0727b9d5c173c83568f5d19cfc87a05540ec8b77, not stripped

It seems that's a native toolchain.

It should be something like (from aarch64-linaro 2015.08)
file bin/aarch64-linux-gnu-gcc
bin/aarch64-linux-gnu-gcc: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=91a19539d0f6b0f38d599db648b4b5760000666a, not stripped

Can you provide a pre-build toolchain or a recipe to rebuild a aarch64 ipl32 toolchain ?

Quoted 5 lines
Quoted 2 lines

Do you know if Linaro plans to release a ipl32 toolchain ?

It seems that linaro will not release it before patches for ilp32 of kernel and glibc upstreamed.
Here[2] is a status for ilp32 in linaro.

Thanks for the link.

Best regards,
Romain

Quoted 65 lines

Regards

Bamvor

[1] http://people.linaro.org/~maxim.kuvyrkov/bench-ilp32/
[2] https://wiki.linaro.org/Platform/arm64-ilp32

Quoted 56 lines

Best regards,
Romain Naour

Quoted 52 lines

changes since v2
1. rebase on the patch have been .

    "827ba46 aarch64: add big endian(aarch64_be) support"

2. Add "!BR2_aarch64_be" along with "!BR2_aarch64" in patch 1/5 according to the suggestion from Thomas.
3. Improve the ifeq in patch 2/5 according to Gustavo.
4. Do not pass invalid "-mabi" option to ld in patch 3/5 according to Gustavo.

changes since v1

1.  Avoid mabi issue in gcc 4.8 while build aarch64 lp64.
2.  Change default libc, toolchain for ilp32 build.
3.  Others changes suggested by Gustavo.

[1] http://lists.busybox.net/pipermail/buildroot/2015-March/122115.html
[2] http://lists.busybox.net/pipermail/buildroot/2015-March/122424.html
[3] https://git.linaro.org/kernel/linux-linaro-tracking.git
[4] https://wiki.linaro.org/ABE

Bamvor Jian Zhang (5):
aarch64: align aarch64_be config with aarch64s'
aarch64: ilp32: handle special file name
aarch64: ilp32: add ilp32 compiler and linker flags
aarch64: ilp32: add ilp32 build config
aarch64: ilp32 defconfig examples

 Makefile                                           |  6 +++
 arch/Config.in.aarch64                             | 36 ++++++++++++++++++
 configs/aarch64_be_defconfig                       |  2 +
 configs/aarch64_be_ilp32_defconfig                 |  8 ++++
 configs/aarch64_ilp32_defconfig                    |  8 ++++
 package/Makefile.in                                | 13 ++++++-
 package/binutils/Config.in                         |  4 +-
 package/binutils/Config.in.host                    |  5 ++-
 package/dropwatch/Config.in                        |  5 ++-
 package/gcc/Config.in.host                         | 11 +++---
 package/gdb/Config.in.host                         |  2 +-
 package/gpsd/Config.in                             |  2 +-
 package/lightning/Config.in                        |  5 ++-
 package/nginx/Config.in                            |  3 +-
 package/oprofile/Config.in                         |  6 ++-
 toolchain/Config.in                                |  2 +
 toolchain/helpers.mk                               |  5 ++-
 toolchain/toolchain-buildroot/Config.in            |  7 ++--
 toolchain/toolchain-external/Config.in             | 22 +++++++++++
 toolchain/toolchain-external/toolchain-external.mk | 44 +++++++++++++++++++++-
 20 files changed, 169 insertions(+), 27 deletions(-)
 create mode 100644 configs/aarch64_be_defconfig
 create mode 100644 configs/aarch64_be_ilp32_defconfig
 create mode 100644 configs/aarch64_ilp32_defconfig
#9 lore raw

v3 cover Add ILP32 support in aarch64

Hi, Romain

Quoted 7 lines · Romain Naour

Hi Bamvor,

Le 19/01/2016 05:00, Bamvor Zhang Jian a ?crit :

Quoted 4 lines

Hi, Romain

Quoted 1 line · Romain Naour

Hello Bamvor,

[...]

Quoted 12 lines
Quoted 3 lines
Quoted 2 lines

Can you provide the command lines you used to build the toolchain ? on which abe branch ? Otherwise we can't test your series.

You could find the toolchain here[1]

Thanks but this is not a cross-toolchain:

file bin/aarch64-ilp32-linux-gnu-gcc bin/aarch64-ilp32-linux-gnu-gcc: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=0727b9d5c173c83568f5d19cfc87a05540ec8b77, not stripped

Quoted 8 lines

It seems that's a native toolchain.

It should be something like (from aarch64-linaro 2015.08)
file bin/aarch64-linux-gnu-gcc
bin/aarch64-linux-gnu-gcc: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=91a19539d0f6b0f38d599db648b4b5760000666a, not stripped

Yeap, it is not a cross compile. I use it in an aarch64 chroot environment in x86. I feel it is enough to test these patches.

Quoted 2 lines

Can you provide a pre-build toolchain or a recipe to rebuild a aarch64 ipl32 toolchain ?

Linaro provide abe[1] to build toochain. You could follow this script[2] to know how to use it. It seems that the server in tcwg is down. Hope, you could make use of the method used by abe system.

Regards

Bamvor

[1] https://git.linaro.org/toolchain/abe.git/blob/refs/heads/benchmarking:/abe.sh
[2] https://git.linaro.org/toolchain/spec2xxx-utils.git/blob/refs/heads/test:/bench-ilp32.sh

Quoted 76 lines
Quoted 5 lines
Quoted 2 lines

Do you know if Linaro plans to release a ipl32 toolchain ?

It seems that linaro will not release it before patches for ilp32 of kernel and glibc upstreamed.
Here[2] is a status for ilp32 in linaro.

Thanks for the link.

Best regards,
Romain

Quoted 65 lines

Regards

Bamvor

[1] http://people.linaro.org/~maxim.kuvyrkov/bench-ilp32/
[2] https://wiki.linaro.org/Platform/arm64-ilp32

Quoted 56 lines

Best regards,
Romain Naour

Quoted 52 lines

changes since v2
1. rebase on the patch have been .

    "827ba46 aarch64: add big endian(aarch64_be) support"

2. Add "!BR2_aarch64_be" along with "!BR2_aarch64" in patch 1/5 according to the suggestion from Thomas.
3. Improve the ifeq in patch 2/5 according to Gustavo.
4. Do not pass invalid "-mabi" option to ld in patch 3/5 according to Gustavo.

changes since v1

1.  Avoid mabi issue in gcc 4.8 while build aarch64 lp64.
2.  Change default libc, toolchain for ilp32 build.
3.  Others changes suggested by Gustavo.

[1] http://lists.busybox.net/pipermail/buildroot/2015-March/122115.html
[2] http://lists.busybox.net/pipermail/buildroot/2015-March/122424.html
[3] https://git.linaro.org/kernel/linux-linaro-tracking.git
[4] https://wiki.linaro.org/ABE

Bamvor Jian Zhang (5):
aarch64: align aarch64_be config with aarch64s'
aarch64: ilp32: handle special file name
aarch64: ilp32: add ilp32 compiler and linker flags
aarch64: ilp32: add ilp32 build config
aarch64: ilp32 defconfig examples

 Makefile                                           |  6 +++
 arch/Config.in.aarch64                             | 36 ++++++++++++++++++
 configs/aarch64_be_defconfig                       |  2 +
 configs/aarch64_be_ilp32_defconfig                 |  8 ++++
 configs/aarch64_ilp32_defconfig                    |  8 ++++
 package/Makefile.in                                | 13 ++++++-
 package/binutils/Config.in                         |  4 +-
 package/binutils/Config.in.host                    |  5 ++-
 package/dropwatch/Config.in                        |  5 ++-
 package/gcc/Config.in.host                         | 11 +++---
 package/gdb/Config.in.host                         |  2 +-
 package/gpsd/Config.in                             |  2 +-
 package/lightning/Config.in                        |  5 ++-
 package/nginx/Config.in                            |  3 +-
 package/oprofile/Config.in                         |  6 ++-
 toolchain/Config.in                                |  2 +
 toolchain/helpers.mk                               |  5 ++-
 toolchain/toolchain-buildroot/Config.in            |  7 ++--
 toolchain/toolchain-external/Config.in             | 22 +++++++++++
 toolchain/toolchain-external/toolchain-external.mk | 44 +++++++++++++++++++++-
 20 files changed, 169 insertions(+), 27 deletions(-)
 create mode 100644 configs/aarch64_be_defconfig
 create mode 100644 configs/aarch64_be_ilp32_defconfig
 create mode 100644 configs/aarch64_ilp32_defconfig
Signature · 3 lines
-----------------------------
   blog: http://aarch64.me
-----------------------------
#10 lore raw

v3 cover Add ILP32 support in aarch64

Hi Bamvor,

Le 21/01/2016 10:03, Bamvor Zhang Jian a ?crit :

Quoted 25 lines

Hi, Romain

Quoted 7 lines · Romain Naour

Hi Bamvor,

Le 19/01/2016 05:00, Bamvor Zhang Jian a ?crit :

Quoted 4 lines

Hi, Romain

Quoted 1 line · Romain Naour

Hello Bamvor,

[...]

Quoted 14 lines
Quoted 3 lines
Quoted 2 lines

Can you provide the command lines you used to build the toolchain ? on which abe branch ? Otherwise we can't test your series.

You could find the toolchain here[1]

Thanks but this is not a cross-toolchain:

file bin/aarch64-ilp32-linux-gnu-gcc bin/aarch64-ilp32-linux-gnu-gcc: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=0727b9d5c173c83568f5d19cfc87a05540ec8b77, not stripped

It seems that's a native toolchain.

Quoted 8 lines
Quoted 6 lines

It should be something like (from aarch64-linaro 2015.08)
file bin/aarch64-linux-gnu-gcc
bin/aarch64-linux-gnu-gcc: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=91a19539d0f6b0f38d599db648b4b5760000666a, not stripped

Yeap, it is not a cross compile. I use it in an aarch64 chroot environment in x86. I feel it is enough to test these patches.

Buildroot is a tool for cross-compiling, you know it ;-) Honestly I'm not very interested to test the toolchain by itself, only your patches for the external toolchain infra.

Quoted 5 lines
Quoted 2 lines

Can you provide a pre-build toolchain or a recipe to rebuild a aarch64 ipl32 toolchain ?

Linaro provide abe[1] to build toochain. You could follow this script[2] to know how to use it. It seems that the server in tcwg is down. Hope, you could make use of the method used by abe system.

I really tried to build a aarch64 ipl32 cross-toolchain with abe but I'm stuck with glibc build. I don't know what's the glibc branch I should use. By default I used the release/2.20/master branch

aarch64-ilp32-linux-gnu-gcc -mabi=ilp32 -nostdlib -nostartfiles -r -o /home/naourr/linaro-toolchain/builds/x86_64-unknown-linux-gnu/aarch64-ilp32-linux-gnu/glibc.git~linaro-2.20-ilp32-ilp32/csu/Scrt1.o /home/naourr/linaro-toolchain/builds/x86_64-unknown-linux-gnu/aarch64-ilp32-linux-gnu/glibc.git~linaro-2.20-ilp32-ilp32/csu/start.os /home/naourr/linaro-toolchain/builds/x86_64-unknown-linux-gnu/aarch64-ilp32-linux-gnu/glibc.git~linaro-2.20-ilp32-ilp32/csu/abi-note.o /home/naourr/linaro-toolchain/builds/x86_64-unknown-linux-gnu/aarch64-ilp32-linux-gnu/glibc.git~linaro-2.20-ilp32-ilp32/csu/init.o ../sysdeps/aarch64/start.S: Assembler messages:
../sysdeps/aarch64/start.S:92: Error: cannot represent BFD_RELOC_64 relocation
in this object file format
../sysdeps/aarch64/start.S:92: Error: cannot represent BFD_RELOC_64 relocation
in this object file format
../sysdeps/aarch64/start.S:92: Error: cannot represent BFD_RELOC_64 relocation
in this object file format /home/naourr/linaro-toolchain/builds/x86_64-unknown-linux-gnu/aarch64-ilp32-linux-gnu/glibc.git~linaro-2.20-ilp32-ilp32/sysd-rules:1345:
recipe for target '/home/naourr/linaro-toolchain/builds/x86_64-unknown-linux-gnu/aarch64-ilp32-linux-gnu/glibc.git~linaro-2.20-ilp32-ilp32/csu/start.o' failed
make[2]: *** [/home/naourr/linaro-toolchain/builds/x86_64-unknown-linux-gnu/aarch64-ilp32-linux-gnu/glibc.git~linaro-2.20-ilp32-ilp32/csu/start.o] Error 1

Also I had several issue with the abe script on my system (Fedora) and I had to modify some part of the script to be able to continue the build.

So, It would be great if you can provide a precompiled cross-toolchain.

Best regards,
Romain

Quoted 85 lines

Regards

Bamvor

[1] https://git.linaro.org/toolchain/abe.git/blob/refs/heads/benchmarking:/abe.sh
[2] https://git.linaro.org/toolchain/spec2xxx-utils.git/blob/refs/heads/test:/bench-ilp32.sh

Quoted 76 lines
Quoted 5 lines
Quoted 2 lines

Do you know if Linaro plans to release a ipl32 toolchain ?

It seems that linaro will not release it before patches for ilp32 of kernel and glibc upstreamed.
Here[2] is a status for ilp32 in linaro.

Thanks for the link.

Best regards,
Romain

Quoted 65 lines

Regards

Bamvor

[1] http://people.linaro.org/~maxim.kuvyrkov/bench-ilp32/
[2] https://wiki.linaro.org/Platform/arm64-ilp32

Quoted 56 lines

Best regards,
Romain Naour

Quoted 52 lines

changes since v2
1. rebase on the patch have been .

    "827ba46 aarch64: add big endian(aarch64_be) support"

2. Add "!BR2_aarch64_be" along with "!BR2_aarch64" in patch 1/5 according to the suggestion from Thomas.
3. Improve the ifeq in patch 2/5 according to Gustavo.
4. Do not pass invalid "-mabi" option to ld in patch 3/5 according to Gustavo.

changes since v1

1.  Avoid mabi issue in gcc 4.8 while build aarch64 lp64.
2.  Change default libc, toolchain for ilp32 build.
3.  Others changes suggested by Gustavo.

[1] http://lists.busybox.net/pipermail/buildroot/2015-March/122115.html
[2] http://lists.busybox.net/pipermail/buildroot/2015-March/122424.html
[3] https://git.linaro.org/kernel/linux-linaro-tracking.git
[4] https://wiki.linaro.org/ABE

Bamvor Jian Zhang (5):
aarch64: align aarch64_be config with aarch64s'
aarch64: ilp32: handle special file name
aarch64: ilp32: add ilp32 compiler and linker flags
aarch64: ilp32: add ilp32 build config
aarch64: ilp32 defconfig examples

 Makefile                                           |  6 +++
 arch/Config.in.aarch64                             | 36 ++++++++++++++++++
 configs/aarch64_be_defconfig                       |  2 +
 configs/aarch64_be_ilp32_defconfig                 |  8 ++++
 configs/aarch64_ilp32_defconfig                    |  8 ++++
 package/Makefile.in                                | 13 ++++++-
 package/binutils/Config.in                         |  4 +-
 package/binutils/Config.in.host                    |  5 ++-
 package/dropwatch/Config.in                        |  5 ++-
 package/gcc/Config.in.host                         | 11 +++---
 package/gdb/Config.in.host                         |  2 +-
 package/gpsd/Config.in                             |  2 +-
 package/lightning/Config.in                        |  5 ++-
 package/nginx/Config.in                            |  3 +-
 package/oprofile/Config.in                         |  6 ++-
 toolchain/Config.in                                |  2 +
 toolchain/helpers.mk                               |  5 ++-
 toolchain/toolchain-buildroot/Config.in            |  7 ++--
 toolchain/toolchain-external/Config.in             | 22 +++++++++++
 toolchain/toolchain-external/toolchain-external.mk | 44 +++++++++++++++++++++-
 20 files changed, 169 insertions(+), 27 deletions(-)
 create mode 100644 configs/aarch64_be_defconfig
 create mode 100644 configs/aarch64_be_ilp32_defconfig
 create mode 100644 configs/aarch64_ilp32_defconfig
#11 lore raw

v3 cover Add ILP32 support in aarch64

Hi, Romain

Quoted 62 lines · Romain Naour

Hi Bamvor,

Le 21/01/2016 10:03, Bamvor Zhang Jian a ?crit :

Quoted 25 lines

Hi, Romain

Quoted 7 lines · Romain Naour

Hi Bamvor,

Le 19/01/2016 05:00, Bamvor Zhang Jian a ?crit :

Quoted 4 lines

Hi, Romain

Quoted 1 line · Romain Naour

Hello Bamvor,

[...]

Quoted 14 lines
Quoted 3 lines
Quoted 2 lines

Can you provide the command lines you used to build the toolchain ? on which abe branch ? Otherwise we can't test your series.

You could find the toolchain here[1]

Thanks but this is not a cross-toolchain:

file bin/aarch64-ilp32-linux-gnu-gcc bin/aarch64-ilp32-linux-gnu-gcc: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=0727b9d5c173c83568f5d19cfc87a05540ec8b77, not stripped

It seems that's a native toolchain.

Quoted 8 lines
Quoted 6 lines

It should be something like (from aarch64-linaro 2015.08)
file bin/aarch64-linux-gnu-gcc
bin/aarch64-linux-gnu-gcc: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=91a19539d0f6b0f38d599db648b4b5760000666a, not stripped

Yeap, it is not a cross compile. I use it in an aarch64 chroot environment in x86. I feel it is enough to test these patches.

Buildroot is a tool for cross-compiling, you know it ;-) Honestly I'm not very interested to test the toolchain by itself, only your patches for the external toolchain infra.

Quoted 5 lines
Quoted 2 lines

Can you provide a pre-build toolchain or a recipe to rebuild a aarch64 ipl32 toolchain ?

Linaro provide abe[1] to build toochain. You could follow this script[2] to know how to use it. It seems that the server in tcwg is down. Hope, you could make use of the method used by abe system.

I really tried to build a aarch64 ipl32 cross-toolchain with abe but I'm stuck with glibc build. I don't know what's the glibc branch I should use. By default I used the release/2.20/master branch

aarch64-ilp32-linux-gnu-gcc -mabi=ilp32 -nostdlib -nostartfiles -r -o /home/naourr/linaro-toolchain/builds/x86_64-unknown-linux-gnu/aarch64-ilp32-linux-gnu/glibc.git~linaro-2.20-ilp32-ilp32/csu/Scrt1.o /home/naourr/linaro-toolchain/builds/x86_64-unknown-linux-gnu/aarch64-ilp32-linux-gnu/glibc.git~linaro-2.20-ilp32-ilp32/csu/start.os /home/naourr/linaro-toolchain/builds/x86_64-unknown-linux-gnu/aarch64-ilp32-linux-gnu/glibc.git~linaro-2.20-ilp32-ilp32/csu/abi-note.o /home/naourr/linaro-toolchain/builds/x86_64-unknown-linux-gnu/aarch64-ilp32-linux-gnu/glibc.git~linaro-2.20-ilp32-ilp32/csu/init.o ../sysdeps/aarch64/start.S: Assembler messages:
../sysdeps/aarch64/start.S:92: Error: cannot represent BFD_RELOC_64 relocation
in this object file format
../sysdeps/aarch64/start.S:92: Error: cannot represent BFD_RELOC_64 relocation
in this object file format
../sysdeps/aarch64/start.S:92: Error: cannot represent BFD_RELOC_64 relocation

Quoted 8 lines

in this object file format /home/naourr/linaro-toolchain/builds/x86_64-unknown-linux-gnu/aarch64-ilp32-linux-gnu/glibc.git~linaro-2.20-ilp32-ilp32/sysd-rules:1345:
recipe for target '/home/naourr/linaro-toolchain/builds/x86_64-unknown-linux-gnu/aarch64-ilp32-linux-gnu/glibc.git~linaro-2.20-ilp32-ilp32/csu/start.o' failed
make[2]: *** [/home/naourr/linaro-toolchain/builds/x86_64-unknown-linux-gnu/aarch64-ilp32-linux-gnu/glibc.git~linaro-2.20-ilp32-ilp32/csu/start.o] Error 1

You could this glibc[1]. IIRC, It is for patch v6 rfc2. We are planning to update it for patch v6 rfc5.

Regards

Bamvor

[1] https://github.com/norov/glibc/tree/thunderx-ilp32-32time_toff_t

Quoted 99 lines

Also I had several issue with the abe script on my system (Fedora) and I had to modify some part of the script to be able to continue the build.

So, It would be great if you can provide a precompiled cross-toolchain.

Best regards,
Romain

Quoted 85 lines

Regards

Bamvor

[1] https://git.linaro.org/toolchain/abe.git/blob/refs/heads/benchmarking:/abe.sh
[2] https://git.linaro.org/toolchain/spec2xxx-utils.git/blob/refs/heads/test:/bench-ilp32.sh

Quoted 76 lines
Quoted 5 lines
Quoted 2 lines

Do you know if Linaro plans to release a ipl32 toolchain ?

It seems that linaro will not release it before patches for ilp32 of kernel and glibc upstreamed.
Here[2] is a status for ilp32 in linaro.

Thanks for the link.

Best regards,
Romain

Quoted 65 lines

Regards

Bamvor

[1] http://people.linaro.org/~maxim.kuvyrkov/bench-ilp32/
[2] https://wiki.linaro.org/Platform/arm64-ilp32

Quoted 56 lines

Best regards,
Romain Naour

Quoted 52 lines

changes since v2
1. rebase on the patch have been .

     "827ba46 aarch64: add big endian(aarch64_be) support"

2. Add "!BR2_aarch64_be" along with "!BR2_aarch64" in patch 1/5 according to the suggestion from Thomas.
3. Improve the ifeq in patch 2/5 according to Gustavo.
4. Do not pass invalid "-mabi" option to ld in patch 3/5 according to Gustavo.

changes since v1

1.  Avoid mabi issue in gcc 4.8 while build aarch64 lp64.
2.  Change default libc, toolchain for ilp32 build.
3.  Others changes suggested by Gustavo.

[1] http://lists.busybox.net/pipermail/buildroot/2015-March/122115.html
[2] http://lists.busybox.net/pipermail/buildroot/2015-March/122424.html
[3] https://git.linaro.org/kernel/linux-linaro-tracking.git
[4] https://wiki.linaro.org/ABE

Bamvor Jian Zhang (5):
aarch64: align aarch64_be config with aarch64s'
aarch64: ilp32: handle special file name
aarch64: ilp32: add ilp32 compiler and linker flags
aarch64: ilp32: add ilp32 build config
aarch64: ilp32 defconfig examples

  Makefile                                           |  6 +++
  arch/Config.in.aarch64                             | 36 ++++++++++++++++++
  configs/aarch64_be_defconfig                       |  2 +
  configs/aarch64_be_ilp32_defconfig                 |  8 ++++
  configs/aarch64_ilp32_defconfig                    |  8 ++++
  package/Makefile.in                                | 13 ++++++-
  package/binutils/Config.in                         |  4 +-
  package/binutils/Config.in.host                    |  5 ++-
  package/dropwatch/Config.in                        |  5 ++-
  package/gcc/Config.in.host                         | 11 +++---
  package/gdb/Config.in.host                         |  2 +-
  package/gpsd/Config.in                             |  2 +-
  package/lightning/Config.in                        |  5 ++-
  package/nginx/Config.in                            |  3 +-
  package/oprofile/Config.in                         |  6 ++-
  toolchain/Config.in                                |  2 +
  toolchain/helpers.mk                               |  5 ++-
  toolchain/toolchain-buildroot/Config.in            |  7 ++--
  toolchain/toolchain-external/Config.in             | 22 +++++++++++
  toolchain/toolchain-external/toolchain-external.mk | 44 +++++++++++++++++++++-
  20 files changed, 169 insertions(+), 27 deletions(-)

create mode 100644 configs/aarch64_be_defconfig create mode 100644 configs/aarch64_be_ilp32_defconfig create mode 100644 configs/aarch64_ilp32_defconfig

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#12 lore raw

v3 cover Add ILP32 support in aarch64

Hi Bamvor,

Le 02/02/2016 03:29, Zhangjian (Bamvor) a ?crit :

Quoted 78 lines

Hi, Romain

Quoted 74 lines · Romain Naour

Hi Bamvor,

Le 21/01/2016 10:03, Bamvor Zhang Jian a ?crit :

Quoted 27 lines

Hi, Romain

Quoted 7 lines · Romain Naour

Hi Bamvor,

Le 19/01/2016 05:00, Bamvor Zhang Jian a ?crit :

Quoted 4 lines

Hi, Romain

Quoted 1 line · Romain Naour

Hello Bamvor,

[...]

Quoted 16 lines
Quoted 4 lines
Quoted 3 lines

Can you provide the command lines you used to build the toolchain ? on which abe
branch ? Otherwise we can't test your series.

You could find the toolchain here[1]

Thanks but this is not a cross-toolchain:

file bin/aarch64-ilp32-linux-gnu-gcc bin/aarch64-ilp32-linux-gnu-gcc: ELF 64-bit LSB executable, ARM aarch64, version
1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=0727b9d5c173c83568f5d19cfc87a05540ec8b77, not stripped

It seems that's a native toolchain.

Quoted 8 lines
Quoted 6 lines

It should be something like (from aarch64-linaro 2015.08)
file bin/aarch64-linux-gnu-gcc
bin/aarch64-linux-gnu-gcc: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=91a19539d0f6b0f38d599db648b4b5760000666a, not stripped

Yeap, it is not a cross compile. I use it in an aarch64 chroot environment in x86. I feel it is enough to test these patches.

Buildroot is a tool for cross-compiling, you know it ;-) Honestly I'm not very interested to test the toolchain by itself, only your patches for the external toolchain infra.

Quoted 5 lines
Quoted 2 lines

Can you provide a pre-build toolchain or a recipe to rebuild a aarch64 ipl32 toolchain ?

Linaro provide abe[1] to build toochain. You could follow this script[2] to know how to use it. It seems that the server in tcwg is down. Hope, you could make use of the method used by abe system.

I really tried to build a aarch64 ipl32 cross-toolchain with abe but I'm stuck with glibc build. I don't know what's the glibc branch I should use. By default I used the release/2.20/master branch

aarch64-ilp32-linux-gnu-gcc -mabi=ilp32 -nostdlib -nostartfiles -r -o /home/naourr/linaro-toolchain/builds/x86_64-unknown-linux-gnu/aarch64-ilp32-linux-gnu/glibc.git~linaro-2.20-ilp32-ilp32/csu/Scrt1.o

/home/naourr/linaro-toolchain/builds/x86_64-unknown-linux-gnu/aarch64-ilp32-linux-gnu/glibc.git~linaro-2.20-ilp32-ilp32/csu/start.os

/home/naourr/linaro-toolchain/builds/x86_64-unknown-linux-gnu/aarch64-ilp32-linux-gnu/glibc.git~linaro-2.20-ilp32-ilp32/csu/abi-note.o

/home/naourr/linaro-toolchain/builds/x86_64-unknown-linux-gnu/aarch64-ilp32-linux-gnu/glibc.git~linaro-2.20-ilp32-ilp32/csu/init.o

../sysdeps/aarch64/start.S: Assembler messages:
../sysdeps/aarch64/start.S:92: Error: cannot represent BFD_RELOC_64 relocation
in this object file format
../sysdeps/aarch64/start.S:92: Error: cannot represent BFD_RELOC_64 relocation
in this object file format
../sysdeps/aarch64/start.S:92: Error: cannot represent BFD_RELOC_64 relocation
in this object file format /home/naourr/linaro-toolchain/builds/x86_64-unknown-linux-gnu/aarch64-ilp32-linux-gnu/glibc.git~linaro-2.20-ilp32-ilp32/sysd-rules:1345:

recipe for target '/home/naourr/linaro-toolchain/builds/x86_64-unknown-linux-gnu/aarch64-ilp32-linux-gnu/glibc.git~linaro-2.20-ilp32-ilp32/csu/start.o'

Quoted 7 lines
Quoted 5 lines

failed
make[2]: *** [/home/naourr/linaro-toolchain/builds/x86_64-unknown-linux-gnu/aarch64-ilp32-linux-gnu/glibc.git~linaro-2.20-ilp32-ilp32/csu/start.o]

Error 1

You could this glibc[1]. IIRC, It is for patch v6 rfc2. We are planning to update it for patch v6 rfc5.

Thanks for this link.

To be honest, I don't think this series will be merged as is until a stable toolchain release is made. When it's done, can you respin your series on top of master since the toolchain-external code has been updated recently ?

Best regards,
Romain

Quoted 114 lines

Regards

Bamvor

[1] https://github.com/norov/glibc/tree/thunderx-ilp32-32time_toff_t

Quoted 106 lines

Also I had several issue with the abe script on my system (Fedora) and I had to modify some part of the script to be able to continue the build.

So, It would be great if you can provide a precompiled cross-toolchain.

Best regards,
Romain

Quoted 92 lines

Regards

Bamvor

[1]
https://git.linaro.org/toolchain/abe.git/blob/refs/heads/benchmarking:/abe.sh
[2]
https://git.linaro.org/toolchain/spec2xxx-utils.git/blob/refs/heads/test:/bench-ilp32.sh

Quoted 80 lines
Quoted 6 lines
Quoted 2 lines

Do you know if Linaro plans to release a ipl32 toolchain ?

It seems that linaro will not release it before patches for ilp32 of kernel and
glibc upstreamed.
Here[2] is a status for ilp32 in linaro.

Thanks for the link.

Best regards,
Romain

Quoted 68 lines

Regards

Bamvor

[1] http://people.linaro.org/~maxim.kuvyrkov/bench-ilp32/
[2] https://wiki.linaro.org/Platform/arm64-ilp32

Quoted 59 lines

Best regards,
Romain Naour

Quoted 55 lines

changes since v2
1. rebase on the patch have been .

     "827ba46 aarch64: add big endian(aarch64_be) support"

2. Add "!BR2_aarch64_be" along with "!BR2_aarch64" in patch 1/5 according to
the suggestion from Thomas.
3. Improve the ifeq in patch 2/5 according to Gustavo.
4. Do not pass invalid "-mabi" option to ld in patch 3/5 according to Gustavo.

changes since v1

1.  Avoid mabi issue in gcc 4.8 while build aarch64 lp64.
2.  Change default libc, toolchain for ilp32 build.
3.  Others changes suggested by Gustavo.

[1] http://lists.busybox.net/pipermail/buildroot/2015-March/122115.html
[2] http://lists.busybox.net/pipermail/buildroot/2015-March/122424.html
[3] https://git.linaro.org/kernel/linux-linaro-tracking.git
[4] https://wiki.linaro.org/ABE

Bamvor Jian Zhang (5):
aarch64: align aarch64_be config with aarch64s'
aarch64: ilp32: handle special file name
aarch64: ilp32: add ilp32 compiler and linker flags
aarch64: ilp32: add ilp32 build config
aarch64: ilp32 defconfig examples

  Makefile                                           |  6 +++
  arch/Config.in.aarch64                             | 36 ++++++++++++++++++
  configs/aarch64_be_defconfig                       |  2 +
  configs/aarch64_be_ilp32_defconfig                 |  8 ++++
  configs/aarch64_ilp32_defconfig                    |  8 ++++
  package/Makefile.in                                | 13 ++++++-
  package/binutils/Config.in                         |  4 +-
  package/binutils/Config.in.host                    |  5 ++-
  package/dropwatch/Config.in                        |  5 ++-
  package/gcc/Config.in.host                         | 11 +++---
  package/gdb/Config.in.host                         |  2 +-
  package/gpsd/Config.in                             |  2 +-
  package/lightning/Config.in                        |  5 ++-
  package/nginx/Config.in                            |  3 +-
  package/oprofile/Config.in                         |  6 ++-
  toolchain/Config.in                                |  2 +
  toolchain/helpers.mk                               |  5 ++-
  toolchain/toolchain-buildroot/Config.in            |  7 ++--
  toolchain/toolchain-external/Config.in             | 22 +++++++++++
  toolchain/toolchain-external/toolchain-external.mk | 44
+++++++++++++++++++++-
  20 files changed, 169 insertions(+), 27 deletions(-)

create mode 100644 configs/aarch64_be_defconfig create mode 100644 configs/aarch64_be_ilp32_defconfig create mode 100644 configs/aarch64_ilp32_defconfig

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#13 lore raw

v3 cover Add ILP32 support in aarch64

Hi, Romain

Quoted 85 lines · Romain Naour

Hi Bamvor,

Le 02/02/2016 03:29, Zhangjian (Bamvor) a ?crit :

Quoted 82 lines

Hi, Romain

Quoted 78 lines · Romain Naour

Hi Bamvor,

Le 21/01/2016 10:03, Bamvor Zhang Jian a ?crit :

Quoted 27 lines

Hi, Romain

Quoted 7 lines · Romain Naour

Hi Bamvor,

Le 19/01/2016 05:00, Bamvor Zhang Jian a ?crit :

Quoted 4 lines

Hi, Romain

Quoted 1 line · Romain Naour

Hello Bamvor,

[...]

Quoted 16 lines
Quoted 4 lines
Quoted 3 lines

Can you provide the command lines you used to build the toolchain ? on which abe
branch ? Otherwise we can't test your series.

You could find the toolchain here[1]

Thanks but this is not a cross-toolchain:

file bin/aarch64-ilp32-linux-gnu-gcc bin/aarch64-ilp32-linux-gnu-gcc: ELF 64-bit LSB executable, ARM aarch64, version
1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=0727b9d5c173c83568f5d19cfc87a05540ec8b77, not stripped

It seems that's a native toolchain.

Quoted 8 lines
Quoted 6 lines

It should be something like (from aarch64-linaro 2015.08)
file bin/aarch64-linux-gnu-gcc
bin/aarch64-linux-gnu-gcc: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=91a19539d0f6b0f38d599db648b4b5760000666a, not stripped

Yeap, it is not a cross compile. I use it in an aarch64 chroot environment in x86. I feel it is enough to test these patches.

Buildroot is a tool for cross-compiling, you know it ;-) Honestly I'm not very interested to test the toolchain by itself, only your patches for the external toolchain infra.

Quoted 5 lines
Quoted 2 lines

Can you provide a pre-build toolchain or a recipe to rebuild a aarch64 ipl32 toolchain ?

Linaro provide abe[1] to build toochain. You could follow this script[2] to know how to use it. It seems that the server in tcwg is down. Hope, you could make use of the method used by abe system.

I really tried to build a aarch64 ipl32 cross-toolchain with abe but I'm stuck with glibc build. I don't know what's the glibc branch I should use. By default I used the release/2.20/master branch

aarch64-ilp32-linux-gnu-gcc -mabi=ilp32 -nostdlib -nostartfiles -r -o /home/naourr/linaro-toolchain/builds/x86_64-unknown-linux-gnu/aarch64-ilp32-linux-gnu/glibc.git~linaro-2.20-ilp32-ilp32/csu/Scrt1.o

/home/naourr/linaro-toolchain/builds/x86_64-unknown-linux-gnu/aarch64-ilp32-linux-gnu/glibc.git~linaro-2.20-ilp32-ilp32/csu/start.os

/home/naourr/linaro-toolchain/builds/x86_64-unknown-linux-gnu/aarch64-ilp32-linux-gnu/glibc.git~linaro-2.20-ilp32-ilp32/csu/abi-note.o

/home/naourr/linaro-toolchain/builds/x86_64-unknown-linux-gnu/aarch64-ilp32-linux-gnu/glibc.git~linaro-2.20-ilp32-ilp32/csu/init.o

../sysdeps/aarch64/start.S: Assembler messages:
../sysdeps/aarch64/start.S:92: Error: cannot represent BFD_RELOC_64 relocation
in this object file format
../sysdeps/aarch64/start.S:92: Error: cannot represent BFD_RELOC_64 relocation
in this object file format
../sysdeps/aarch64/start.S:92: Error: cannot represent BFD_RELOC_64 relocation
in this object file format /home/naourr/linaro-toolchain/builds/x86_64-unknown-linux-gnu/aarch64-ilp32-linux-gnu/glibc.git~linaro-2.20-ilp32-ilp32/sysd-rules:1345:

recipe for target '/home/naourr/linaro-toolchain/builds/x86_64-unknown-linux-gnu/aarch64-ilp32-linux-gnu/glibc.git~linaro-2.20-ilp32-ilp32/csu/start.o'

failed
make[2]: *** [/home/naourr/linaro-toolchain/builds/x86_64-unknown-linux-gnu/aarch64-ilp32-linux-gnu/glibc.git~linaro-2.20-ilp32-ilp32/csu/start.o]

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

Error 1

You could this glibc[1]. IIRC, It is for patch v6 rfc2. We are planning to update it for patch v6 rfc5.

Thanks for this link.

To be honest, I don't think this series will be merged as is until a stable toolchain release is made.

What's your mean stable toolchain? A toolchain release from a organization or company?
Do you think it will be accepted after patch of ilp32 of kernel and glibc upstream?
I am trying to improve the glibc support for ilp32 base on the exist one

Quoted 2 lines

When it's done, can you respin your series on top of master since the toolchain-external code has been updated recently ?

Yes, of course.

Regards

Bamvor

Quoted 119 lines

Best regards,
Romain

Quoted 114 lines

Regards

Bamvor

[1] https://github.com/norov/glibc/tree/thunderx-ilp32-32time_toff_t

Quoted 106 lines

Also I had several issue with the abe script on my system (Fedora) and I had to modify some part of the script to be able to continue the build.

So, It would be great if you can provide a precompiled cross-toolchain.

Best regards,
Romain

Quoted 92 lines

Regards

Bamvor

[1]
https://git.linaro.org/toolchain/abe.git/blob/refs/heads/benchmarking:/abe.sh
[2]
https://git.linaro.org/toolchain/spec2xxx-utils.git/blob/refs/heads/test:/bench-ilp32.sh

Quoted 80 lines
Quoted 6 lines
Quoted 2 lines

Do you know if Linaro plans to release a ipl32 toolchain ?

It seems that linaro will not release it before patches for ilp32 of kernel and
glibc upstreamed.
Here[2] is a status for ilp32 in linaro.

Thanks for the link.

Best regards,
Romain

Quoted 68 lines

Regards

Bamvor

[1] http://people.linaro.org/~maxim.kuvyrkov/bench-ilp32/
[2] https://wiki.linaro.org/Platform/arm64-ilp32

Quoted 59 lines

Best regards,
Romain Naour

Quoted 55 lines

changes since v2
1. rebase on the patch have been .

      "827ba46 aarch64: add big endian(aarch64_be) support"

2. Add "!BR2_aarch64_be" along with "!BR2_aarch64" in patch 1/5 according to
the suggestion from Thomas.
3. Improve the ifeq in patch 2/5 according to Gustavo.
4. Do not pass invalid "-mabi" option to ld in patch 3/5 according to Gustavo.

changes since v1

1.  Avoid mabi issue in gcc 4.8 while build aarch64 lp64.
2.  Change default libc, toolchain for ilp32 build.
3.  Others changes suggested by Gustavo.

[1] http://lists.busybox.net/pipermail/buildroot/2015-March/122115.html
[2] http://lists.busybox.net/pipermail/buildroot/2015-March/122424.html
[3] https://git.linaro.org/kernel/linux-linaro-tracking.git
[4] https://wiki.linaro.org/ABE

Bamvor Jian Zhang (5):
aarch64: align aarch64_be config with aarch64s'
aarch64: ilp32: handle special file name
aarch64: ilp32: add ilp32 compiler and linker flags
aarch64: ilp32: add ilp32 build config
aarch64: ilp32 defconfig examples

   Makefile                                           |  6 +++
   arch/Config.in.aarch64                             | 36 ++++++++++++++++++
   configs/aarch64_be_defconfig                       |  2 +
   configs/aarch64_be_ilp32_defconfig                 |  8 ++++
   configs/aarch64_ilp32_defconfig                    |  8 ++++
   package/Makefile.in                                | 13 ++++++-
   package/binutils/Config.in                         |  4 +-
   package/binutils/Config.in.host                    |  5 ++-
   package/dropwatch/Config.in                        |  5 ++-
   package/gcc/Config.in.host                         | 11 +++---
   package/gdb/Config.in.host                         |  2 +-
   package/gpsd/Config.in                             |  2 +-
   package/lightning/Config.in                        |  5 ++-
   package/nginx/Config.in                            |  3 +-
   package/oprofile/Config.in                         |  6 ++-
   toolchain/Config.in                                |  2 +
   toolchain/helpers.mk                               |  5 ++-
   toolchain/toolchain-buildroot/Config.in            |  7 ++--
   toolchain/toolchain-external/Config.in             | 22 +++++++++++
   toolchain/toolchain-external/toolchain-external.mk | 44
+++++++++++++++++++++-
   20 files changed, 169 insertions(+), 27 deletions(-)

create mode 100644 configs/aarch64_be_defconfig create mode 100644 configs/aarch64_be_ilp32_defconfig create mode 100644 configs/aarch64_ilp32_defconfig

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#14 lore raw

v3 cover Add ILP32 support in aarch64

Quoted 6 lines · Zhangjian (Bamvor)

Hi, Romain

Quoted 3 lines · Romain Naour

Hi Bamvor,

Le 02/02/2016 03:29, Zhangjian (Bamvor) a ?crit :

[snip]

Quoted 9 lines
Quoted 7 lines
Quoted 2 lines

You could this glibc[1]. IIRC, It is for patch v6 rfc2. We are planning to update it for patch v6 rfc5.

Thanks for this link.

To be honest, I don't think this series will be merged as is until a stable toolchain release is made.

What's your mean stable toolchain? A toolchain release from a organization or company?

It means a release made by someone, not a random version from a git tree
somewhere. Basically something where people know where to send bug reports to. This indeed usually means it's done by an organisation.

Quoted 2 lines

Do you think it will be accepted after patch of ilp32 of kernel and glibc upstream?

It doesn't necessarily mean that upstream has to have accepted it already. We
just prefer to have a release tarball.

Regards,
Arnout

Quoted 6 lines

I am trying to improve the glibc support for ilp32 base on the exist one

Quoted 2 lines

When it's done, can you respin your series on top of master since the toolchain-external code has been updated recently ?

Yes, of course.

[snip]

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#15 lore raw

v3 cover Add ILP32 support in aarch64

Hello Bamvor, All,

Le 02/02/2016 12:16, Arnout Vandecappelle a ?crit :

Quoted 12 lines · Zhangjian (Bamvor)
Quoted 6 lines

Hi, Romain

Quoted 3 lines · Romain Naour

Hi Bamvor,

Le 02/02/2016 03:29, Zhangjian (Bamvor) a ?crit :

[snip]

Quoted 4 lines
Quoted 4 lines
Quoted 2 lines

You could this glibc[1]. IIRC, It is for patch v6 rfc2. We are planning to update it for patch v6 rfc5.

Thanks for this link.

The git tree from github doesn't build:

../sysdeps/aarch64/multiarch/memset.c: In function '__libc_memset_ifunc':
../sysdeps/aarch64/multiarch/memset.c:35:1: error: implicit declaration of function '__getauxval' [-Werror=implicit-function-declaration] libc_ifunc (__libc_memset,

Quoted 9 lines
Quoted 5 lines
Quoted 3 lines

To be honest, I don't think this series will be merged as is until a stable toolchain release is made.

What's your mean stable toolchain? A toolchain release from a organization or company?

It means a release made by someone, not a random version from a git tree
somewhere. Basically something where people know where to send bug reports to. This indeed usually means it's done by an organisation.

At the beginning of this review I expected that it was easy to rebuild an IPL32 toolchain using the abe script, but it's not the case.

Quoted 7 lines
Quoted 4 lines

Do you think it will be accepted after patch of ilp32 of kernel and glibc upstream?

It doesn't necessarily mean that upstream has to have accepted it already. We
just prefer to have a release tarball.

See as example the toolchains provided by Imagination Technologies [1] or Synopsys [2]. All their patches they are using may not upstream yet, but they provide a working toolchain which is pretty well tested.

[1] http://codescape-mips-sdk.imgtec.com/components/toolchain/2015.06-05/
[2] https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/

Quoted 5 lines

Regards,
Arnout

Quoted 1 line

I am trying to improve the glibc support for ilp32 base on the exist one

I understand, that's great.

Best regards,
Romain

Quoted 9 lines
Quoted 5 lines
Quoted 3 lines

When it's done, can you respin your series on top of master since the toolchain-external code has been updated recently ?

Yes, of course.

[snip]

#16 lore raw

v3 cover Add ILP32 support in aarch64

Hi, Romain, Arnout, all

Quoted 44 lines · Romain Naour

Hello Bamvor, All,

Le 02/02/2016 12:16, Arnout Vandecappelle a ?crit :

Quoted 12 lines · Zhangjian (Bamvor)
Quoted 6 lines

Hi, Romain

Quoted 3 lines · Romain Naour

Hi Bamvor,

Le 02/02/2016 03:29, Zhangjian (Bamvor) a ?crit :

[snip]

Quoted 4 lines
Quoted 4 lines
Quoted 2 lines

You could this glibc[1]. IIRC, It is for patch v6 rfc2. We are planning to update it for patch v6 rfc5.

Thanks for this link.

The git tree from github doesn't build:

../sysdeps/aarch64/multiarch/memset.c: In function '__libc_memset_ifunc':
../sysdeps/aarch64/multiarch/memset.c:35:1: error: implicit declaration of function '__getauxval' [-Werror=implicit-function-declaration] libc_ifunc (__libc_memset,

Quoted 9 lines
Quoted 5 lines
Quoted 3 lines

To be honest, I don't think this series will be merged as is until a stable toolchain release is made.

What's your mean stable toolchain? A toolchain release from a organization or company?

It means a release made by someone, not a random version from a git tree
somewhere. Basically something where people know where to send bug reports to. This indeed usually means it's done by an organisation.

At the beginning of this review I expected that it was easy to rebuild an IPL32 toolchain using the abe script, but it's not the case.

Quoted 7 lines
Quoted 4 lines

Do you think it will be accepted after patch of ilp32 of kernel and glibc upstream?

It doesn't necessarily mean that upstream has to have accepted it already. We
just prefer to have a release tarball.

Quoted 6 lines

See as example the toolchains provided by Imagination Technologies [1] or Synopsys [2]. All their patches they are using may not upstream yet, but they provide a working toolchain which is pretty well tested.

[1] http://codescape-mips-sdk.imgtec.com/components/toolchain/2015.06-05/
[2] https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/

In recent linaro connect, there is a presentation[1] about the performance of ilp32. And in its homepage[2], there is a script[3] for building the ilp32 compiler. At this pointer, are you intertested in review the patches of ilp32 if I send a new series?

Regards

Bamvor

[1] http://connect.linaro.org/resource/bkk16/bkk16-305b/
[2] https://wiki.leapproject.ca/index.php?title=AArch64_ILP32_Toolchain
[3] https://github.com/leapproject/ilp32-toolchain/blob/master/build_ilp32_toolchain.sh

Quoted 21 lines
Quoted 6 lines

Regards,
Arnout

Quoted 1 line

I am trying to improve the glibc support for ilp32 base on the exist one

I understand, that's great.

Best regards,
Romain

Quoted 9 lines
Quoted 5 lines
Quoted 3 lines

When it's done, can you respin your series on top of master since the toolchain-external code has been updated recently ?

Yes, of course.

[snip]

#17 lore raw

v3 cover Add ILP32 support in aarch64

Hi Bamvor, All,

Le 20/03/2016 14:10, Zhangjian (Bamvor) a ?crit :

Quoted 2 lines

Hi, Romain, Arnout, all

[snip]

Quoted 11 lines
Quoted 11 lines
Quoted 6 lines
Quoted 3 lines

Do you think it will be accepted after patch of ilp32 of kernel and glibc upstream?

It doesn't necessarily mean that upstream has to have accepted it already. We
just prefer to have a release tarball.

See as example the toolchains provided by Imagination Technologies [1] or Synopsys [2]. All their patches they are using may not upstream yet, but they provide a working toolchain which is pretty well tested.

Quoted 7 lines
Quoted 2 lines

[1] http://codescape-mips-sdk.imgtec.com/components/toolchain/2015.06-05/
[2] https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/

In recent linaro connect, there is a presentation[1] about the performance of ilp32.
And in its homepage[2], there is a script[3] for building the ilp32 compiler. At this pointer, are you intertested in review the patches of ilp32 if I send a new series?

Thanks for the news about ilp32 support in aarch64.

Since your previous patches doesn't apply anymore on the master branch we have marked them "Changes requested" in the patchwork. However, I added a new entry in our TODO list [1] in order to not forget them.

The first problem is: how to build a working ipl32 toolchain ?

* With the abe script I wasn't able to build one due to some build issue with glibc. Also the abe script was from an experimental/unstable branch.

* With build_ilp32_toolchain.sh script we need to build the toolchain as root
[2] which is not recommended. Also the kernel header is directly imported from the host machine (from /usr/include). I guess an ilp32 toolchain needs some specific or modified kernel header in order to support ilp32 based system.

* There is no aarch64 ilp32 prebuild toolchain available.

It seems that the number of patches is quite limited [4], so maybe you can use the Buildroot internal toolchain infra to build the toolchain, and use a specific source version for gcc, binutils and glibc and include all needed patches.

Do you know if each ilp32 patches can be easily applied on binutils and glibc official release ? Otherwise you can simply use the hashes provided by leapproject wiki [4].
For gcc it's a bit complicated since the patches are for the Linaro GCC 4.9.3, not sure it will apply/work with a vanilla gcc 4.9.3. Also gcc-prequisites-aarch64_ilp32-target-autoconf.patch is quite huge and need to be split into several patches...
But this require a lot of work.

So, in the end, it would be easier if you provide a prebuild ilp32 toolchain tarball (like Arnout suggest) with your new series.
To answer your question.
Yes, I'm interested in reviewing your ilp32 series but I need a toolchain to test it :)

Best regards,
Romain

[1] http://elinux.org/Buildroot#Toolchain
[2]
https://github.com/leapproject/ilp32-toolchain/blob/master/build_ilp32_toolchain.sh#L15
[3]
https://github.com/leapproject/ilp32-toolchain/blob/master/build_ilp32_toolchain.sh#L112
[4]
https://wiki.leapproject.ca/index.php?title=AArch64_ILP32_Toolchain#Sources_and_Patches

Quoted 10 lines

Regards

Bamvor

[1] http://connect.linaro.org/resource/bkk16/bkk16-305b/
[2] https://wiki.leapproject.ca/index.php?title=AArch64_ILP32_Toolchain
[3]
https://github.com/leapproject/ilp32-toolchain/blob/master/build_ilp32_toolchain.sh