From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9986 invoked by alias); 30 May 2012 18:58:39 -0000 Received: (qmail 9977 invoked by uid 22791); 30 May 2012 18:58:38 -0000 X-SWARE-Spam-Status: No, hits=-3.4 required=5.0 tests=AWL,BAYES_00,FROM_12LTRDOM,KHOP_RCVD_UNTRUST,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 30 May 2012 18:58:26 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=EU1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1SZo6D-0006Kl-Hh from joseph_myers@mentor.com for libc-ports@sourceware.org; Wed, 30 May 2012 11:58:25 -0700 Received: from digraph.polyomino.org.uk ([172.16.63.104]) by EU1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 30 May 2012 19:58:24 +0100 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.74) (envelope-from ) id 1SZo6A-0002Nw-S5 for libc-ports@sourceware.org; Wed, 30 May 2012 18:58:22 +0000 Date: Wed, 30 May 2012 18:58:00 -0000 From: "Joseph S. Myers" To: libc-ports@sourceware.org Subject: Support sharing ARM headers for hard and soft float Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org X-SW-Source: 2012-05/txt/msg00190.txt.bz2 Different dynamic linker names for ARM hard and soft float ABIs means different gnu/lib-names.h contents - but it is desirable for one compiler to be able to target multilibs with both ABIs using a single set of headers. I've applied this patch to use the new general biarch/triarch support for generated headers to build a gnu/lib-names.h supporting both ABIs. (syscall.h and stubs.h should always get identical contents for both ABIs, the issue is just for gnu/lib-names.h.) diff --git a/ChangeLog.arm b/ChangeLog.arm index 9a3962e..f57a2e1 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,5 +1,17 @@ 2012-05-30 Joseph Myers + * sysdeps/unix/sysv/linux/arm/Makefile (default-abi-prog): New + variable. + (default-abi): Likewise. + (abi-includes): Likewise. + (abi-variants): Likewise. + (abi-soft-options): Likewise. + (abi-soft-condition): Likewise. + (abi-soft-ld-soname): Likewise. + (abi-hard-options): Likewise. + (abi-hard-condition): Likewise. + (abi-hard-ld-soname): Likewise. + * sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_TRUNCATE64_SYSCALL): Remove. diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile index fb1e3a5..d9eb10c 100644 --- a/sysdeps/unix/sysv/linux/arm/Makefile +++ b/sysdeps/unix/sysv/linux/arm/Makefile @@ -65,3 +65,29 @@ LDFLAGS-tst-rfc3484 += $(common-objpfx)csu/libc-do-syscall.o LDFLAGS-tst-rfc3484-2 += $(common-objpfx)csu/libc-do-syscall.o LDFLAGS-tst-rfc3484-3 += $(common-objpfx)csu/libc-do-syscall.o endif + +define default-abi-prog +echo '#ifdef __ARM_PCS_VFP'; +echo 'hard'; +echo '#else'; +echo 'soft'; +echo '#endif' +endef +default-abi := $(strip $(shell \ + ($(default-abi-prog)) | $(CC) $(CFLAGS) $(CPPFLAGS) -E -P -)) +ifeq ($(default-abi),hard) +# OK. +else +ifneq ($(default-abi),soft) +Unknown ABI, must be "hard" or "soft". +endif +endif + +abi-includes := +abi-variants := soft hard +abi-soft-options := -U__ARM_PCS_VFP +abi-soft-condition := !defined __ARM_PCS_VFP +abi-soft-ld-soname := ld-linux.so.3 +abi-hard-options := -D__ARM_PCS_VFP +abi-hard-condition := defined __ARM_PCS_VFP +abi-hard-ld-soname := ld-linux-armhf.so.3 -- Joseph S. Myers joseph@codesourcery.com