This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
build-many-glibcs.py question (updating for multilibs on aarch64)
- From: Steve Ellcey <sellcey at cavium dot com>
- To: libc-alpha at sourceware dot org
- Date: Mon, 12 Dec 2016 14:02:19 -0800
- Subject: build-many-glibcs.py question (updating for multilibs on aarch64)
- Authentication-results: sourceware.org; auth=none
- Reply-to: sellcey at cavium dot com
I am trying to update build-many-glibcs.py to build ILP32 variations of
the aarch64 glibc library. I have my glibc patches applied and linux
sources with the ILP32 patches and I have added this patch to
build-many-glibcs.py:
diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py
index eb9b8cc..e083432 100755
--- a/scripts/build-many-glibcs.py
+++ b/scripts/build-many-glibcs.py
@@ -126,9 +126,15 @@ class Context(object):
no_isolate = ('-fno-isolate-erroneous-paths-dereference'
' -fno-isolate-erroneous-paths-attribute')
self.add_config(arch='aarch64',
- os_name='linux-gnu')
+ os_name='linux-gnu',
+ gcc_cfg=['--with-multilib-list=lp64,ilp32'],
+ glibcs=[{},
+ {'variant': 'ilp32', 'ccopts': '-mabi=ilp32'}])
self.add_config(arch='aarch64_be',
- os_name='linux-gnu')
+ os_name='linux-gnu',
+ gcc_cfg=['--with-multilib-list=lp64,ilp32'],
+ glibcs=[{},
+ {'variant': 'ilp32', 'ccopts': '-mabi=ilp32'}])
self.add_config(arch='alpha',
os_name='linux-gnu')
self.add_config(arch='arm',
Do those changes look right?
My ILP32 glibc build is failing because it is building lib-names-lp64.h instead
of lib-names-ilp32.h. I am having trouble figuring out why the glibc make is
building the LP64 header instead of the ILP32 one.
I looked at the initial compiler build and it seems fine, it supports
the ilp32 and lp64 abis. The glibc configure looks OK, with:
/home/ubuntu/sellcey/build-many/build/compilers/aarch64-linux-gnu/glibc-src/aarch64-linux-gnu-ilp32/configure '--prefix=/usr' --enable-add-ons '--build=aarch64-unknown-linux-gnu' '--host=aarch64-glibc-linux-gnu' 'CC=aarch64-glibc-linux-gnu-gcc -mabi=ilp32' 'CXX=aarch64-glibc-linux-gnu-g++ -mabi=ilp32' 'AR=aarch64-glibc-linux-gnu-ar' 'AS=aarch64-glibc-linux-gnu-as' 'LD=aarch64-glibc-linux-gnu-ld' 'NM=aarch64-glibc-linux-gnu-nm' 'OBJCOPY=aarch64-glibc-linux-gnu-objcopy' 'OBJDUMP=aarch64-glibc-linux-gnu-objdump' 'RANLIB=aarch64-glibc-linux-gnu-ranlib' 'READELF=aarch64-glibc-linux-gnu-readelf' 'STRIP=aarch64-glibc-linux-gnu-strip'
But the actual build dies with:
In file included from ../sysdeps/gnu/unwind-resume.c:22:0:
/home/ubuntu/sellcey/build-many/build/compilers/aarch64-linux-gnu/glibc/aarch64-linux-gnu-ilp32/gnu/lib-names.h:16:34: fatal error: gnu/lib-names-ilp32.h: No such file or directory
# include <gnu/lib-names-ilp32.h>
^
compilation terminated.
Because the build directory has lib-names-lp64.h instead of lib-names-ilp32.h
and unwind-resume.c is (properly) being compiled with -mabi=ilp32.
Any ideas on what to check? sysdeps/unix/sysv/linux/aarch64/Makefile does
have all the variants listed:
abi-variants := lp64
abi-variants += lp64_be
abi-variants += ilp32
abi-variants += ilp32_be
ifeq (,$(filter $(default-abi),$(abi-variants)))
Unknown ABI, must be one of $(abi-variants)
endif
abi-lp64-options := -U__AARCH64EB__ -D__LP64__ -U__ILP32__
abi-lp64-condition := __WORDSIZE == 64 && !defined __AARCH64EB__
abi-lp64_be-options := -D__AARCH64EB__ -D__LP64__ -U__ILP32__
abi-lp64_be-condition := __WORDSIZE == 64 && defined __AARCH64EB__
abi-ilp32-options := -U__AARCH64EB__ -U__LP64__ -D__ILP32__
abi-ilp32-condition := __WORDSIZE == 32 && !defined __AARCH64EB__
abi-ilp32_be-options := -D__AARCH64EB__ -U__LP64__ -D__ILP32__
abi-ilp32_be-condition := __WORDSIZE == 32 && defined __AARCH64EB__
Steve Ellcey
sellcey@caviumnetworks.com