From patchwork Fri Mar 6 20:37:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul E. Murphy" X-Patchwork-Id: 38483 X-Patchwork-Delegate: tuliom@linux.vnet.ibm.com Received: (qmail 36381 invoked by alias); 6 Mar 2020 21:08:51 -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 36373 invoked by uid 89); 6 Mar 2020 21:08:51 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 spammy=refuse, HX-Languages-Length:2506 X-HELO: mx0a-001b2d01.pphosted.com From: "Paul E. Murphy" To: libc-alpha@sourceware.org Subject: [PATCH 07/13] powerpc64: apply -mabi=ibmlongdouble to special files Date: Fri, 6 Mar 2020 14:37:15 -0600 Message-Id: <20200306203721.15886-8-murphyp@linux.vnet.ibm.com> In-Reply-To: <20200306203721.15886-1-murphyp@linux.vnet.ibm.com> References: <20200306203721.15886-1-murphyp@linux.vnet.ibm.com> MIME-Version: 1.0 Some of these files depend on the avoidance of using the various register sets of POWER. When enabling the IEEE 128 long double, we must be sure to disable this ABI as some compilers will refuse to compile if -mno-vsx and -mabi=ieeelongdouble are both present. Reviewed-by: Tulio Magno Quites Machado Filho --- sysdeps/powerpc/powerpc64/Makefile | 6 ++++++ sysdeps/powerpc/powerpc64/le/Makefile | 3 ++- sysdeps/powerpc/powerpc64/power7/Makefile | 6 +++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/sysdeps/powerpc/powerpc64/Makefile b/sysdeps/powerpc/powerpc64/Makefile index 6e88df1d69..dd49dbbce2 100644 --- a/sysdeps/powerpc/powerpc64/Makefile +++ b/sysdeps/powerpc/powerpc64/Makefile @@ -25,6 +25,12 @@ no-special-regs := $(sort $(foreach n,40 41 50 51 60 61 62 63 \ -ffixed-v$n)) \ -ffixed-vrsave -ffixed-vscr -mno-altivec -mno-vsx +# Likewise, we must disable IEEE long double support as some (all?) +# compilers will not accept the above options with IEEE long double. +ifeq ($(ibm128-fcts),yes) +no-special-regs += -mabi=ibmlongdouble +endif + # Need to prevent gcc from using fprs in code used during dynamic linking. CFLAGS-dl-runtime.os = $(no-special-regs) diff --git a/sysdeps/powerpc/powerpc64/le/Makefile b/sysdeps/powerpc/powerpc64/le/Makefile index f23e2782f0..f9dd44c1a2 100644 --- a/sysdeps/powerpc/powerpc64/le/Makefile +++ b/sysdeps/powerpc/powerpc64/le/Makefile @@ -11,7 +11,8 @@ f128-loader-link = -Wl,--as-needed $(elf-objpfx)ld.so -Wl,--no-as-needed type-ldouble-CFLAGS = no-gnu-attribute-CFLAGS = ifeq ($(ibm128-fcts),yes) -type-ldouble-CFLAGS += -mabi=ibmlongdouble +ibm128-abi-CFLAGS := -mabi=ibmlongdouble +type-ldouble-CFLAGS += $(ibm128-abi-CFLAGS) no-gnu-attribute-CFLAGS = -mno-gnu-attribute endif diff --git a/sysdeps/powerpc/powerpc64/power7/Makefile b/sysdeps/powerpc/powerpc64/power7/Makefile index 89a2296085..9a0e7474bb 100644 --- a/sysdeps/powerpc/powerpc64/power7/Makefile +++ b/sysdeps/powerpc/powerpc64/power7/Makefile @@ -1,7 +1,11 @@ ifeq ($(subdir),elf) # Prevent the use of VSX registers and insns in _dl_start, which under -O3 # optimization may require a TOC reference before relocations are resolved. -CFLAGS-rtld.c += -mno-vsx +CFLAGS-rtld.c += $(ibm128-abi-CFLAGS) -mno-vsx + +# Likewise, remove options to build IEEE long double +$(foreach suf,$(all-object-suffixes),$(objpfx)rtld$(suf)): \ + sysdep-CFLAGS := $(filter-out -mabi=ieeelongdouble,$(sysdep-CFLAGS)) endif ifeq ($(subdir),string)