From patchwork Mon Dec 12 22:02:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Ellcey X-Patchwork-Id: 18416 Received: (qmail 100538 invoked by alias); 12 Dec 2016 22:02:38 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 100439 invoked by uid 89); 12 Dec 2016 22:02:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.0 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=lp64, ellcey, Ellcey, 1269 X-HELO: camailhost.cavium.com Date: Mon, 12 Dec 2016 14:02:19 -0800 From: Steve Ellcey Message-Id: <201612122202.uBCM2JuU006047@sellcey-lt.caveonetworks.com> To: libc-alpha@sourceware.org Subject: build-many-glibcs.py question (updating for multilibs on aarch64) Reply-To: sellcey@cavium.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: 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 ^ 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 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',