From patchwork Mon May 28 22:00:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tulio Magno Quites Machado Filho X-Patchwork-Id: 27532 X-Patchwork-Delegate: joseph@codesourcery.com Received: (qmail 54501 invoked by alias); 28 May 2018 22:01:02 -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 54443 invoked by uid 89); 28 May 2018 22:00:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-27.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx0a-001b2d01.pphosted.com From: Tulio Magno Quites Machado Filho To: libc-alpha@sourceware.org Subject: [PATCH] Move -mlong-double-128 away from platform-agnostic files Date: Mon, 28 May 2018 19:00:27 -0300 X-TM-AS-GCONF: 00 x-cbid: 18052822-0056-0000-0000-000004586FC4 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009096; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000263; SDB=6.01039069; UDB=6.00530875; IPR=6.00818197; MB=3.00021346; MTD=3.00000008; XFM=3.00000015; UTC=2018-05-28 22:00:53 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18052822-0057-0000-0000-0000089C930F Message-Id: <20180528220027.30943-1-tuliom@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-05-28_13:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1805280261 The compiler flag -mlong-double-128 is platform-specific and shouldn't be used in platform-agnostic directories, such as ldbl-128ibm and ldbl-opt. This was not a problem because all the architectures implying these directories had to use -mlong-double-128 to set their long double type. As powerpc64le is changing its default long double type to be binary compatible with IEEE 128-bit floating point, this will have to change. Tested on powerpc, powerpc64 and powerpc64le. Tested with build-many-glibcs.py on alpha and s390x. 2018-05-28 Tulio Magno Quites Machado Filho * sysdeps/ieee754/ldbl-128ibm/Makefile: Move sysdeps-CFLAGS definition to... * sysdeps/powerpc/powerpc32/Makefile: ... here. * sysdeps/powerpc/powerpc64/be/Makefile: ... here. * sysdeps/powerpc/powerpc64/le/Makefile: ... and here. * sysdeps/ieee754/ldbl-opt/Makefile: Move sysdeps-CFLAGS definition to... * sysdeps/unix/sysv/linux/alpha/Makefile: ... here. * sysdeps/unix/sysv/linux/s390/Makefile: ... here. * sysdeps/unix/sysv/linux/sparc/sparc32/Makefile: ... and here. Signed-off-by: Tulio Magno Quites Machado Filho --- sysdeps/ieee754/ldbl-128ibm/Makefile | 1 - sysdeps/ieee754/ldbl-opt/Makefile | 3 --- sysdeps/powerpc/powerpc32/Makefile | 2 ++ sysdeps/powerpc/powerpc64/be/Makefile | 1 + sysdeps/powerpc/powerpc64/le/Makefile | 2 ++ sysdeps/unix/sysv/linux/alpha/Makefile | 4 ++++ sysdeps/unix/sysv/linux/s390/Makefile | 4 ++++ sysdeps/unix/sysv/linux/sparc/sparc32/Makefile | 4 ++++ 8 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 sysdeps/powerpc/powerpc64/be/Makefile diff --git a/sysdeps/ieee754/ldbl-128ibm/Makefile b/sysdeps/ieee754/ldbl-128ibm/Makefile index bdba6cc6b5..caf118566b 100644 --- a/sysdeps/ieee754/ldbl-128ibm/Makefile +++ b/sysdeps/ieee754/ldbl-128ibm/Makefile @@ -2,7 +2,6 @@ # -mlong-double-128 option is used (or when it becomes a default # when -mlong-double-64 is not used). long-double-fcts = yes -sysdep-CFLAGS += -mlong-double-128 ifeq ($(subdir),stdlib) tests += tst-strtold-ldbl-128ibm diff --git a/sysdeps/ieee754/ldbl-opt/Makefile b/sysdeps/ieee754/ldbl-opt/Makefile index ef790adc77..92828cac0b 100644 --- a/sysdeps/ieee754/ldbl-opt/Makefile +++ b/sysdeps/ieee754/ldbl-opt/Makefile @@ -2,9 +2,6 @@ # -mlong-double-128 option is used (or when it becomes a default # when -mlong-double-64 is not used). long-double-fcts = yes -ifeq (,$(filter -mlong-double-128,$(sysdep-CFLAGS))) -sysdep-CFLAGS += -mlong-double-128 -endif ifeq ($(subdir),math) libm-routines += s_nexttowardfd diff --git a/sysdeps/powerpc/powerpc32/Makefile b/sysdeps/powerpc/powerpc32/Makefile index cf620c8269..03c1be3e74 100644 --- a/sysdeps/powerpc/powerpc32/Makefile +++ b/sysdeps/powerpc/powerpc32/Makefile @@ -47,3 +47,5 @@ ifeq ($(subdir),elf) # extra shared linker files to link only into dl-allobjs.so sysdep-rtld-routines += dl-start endif + +sysdep-CFLAGS += -mlong-double-128 diff --git a/sysdeps/powerpc/powerpc64/be/Makefile b/sysdeps/powerpc/powerpc64/be/Makefile new file mode 100644 index 0000000000..0ecff70b8d --- /dev/null +++ b/sysdeps/powerpc/powerpc64/be/Makefile @@ -0,0 +1 @@ +sysdep-CFLAGS += -mlong-double-128 diff --git a/sysdeps/powerpc/powerpc64/le/Makefile b/sysdeps/powerpc/powerpc64/le/Makefile index 14d39e28b1..1be614008d 100644 --- a/sysdeps/powerpc/powerpc64/le/Makefile +++ b/sysdeps/powerpc/powerpc64/le/Makefile @@ -79,3 +79,5 @@ CFLAGS-printf_fp.c = -mfloat128 CFLAGS-printf_fphex.c = -mfloat128 CFLAGS-printf_size.c = -mfloat128 endif + +sysdep-CFLAGS += -mlong-double-128 diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile index 50f4fb1183..dd346002aa 100644 --- a/sysdeps/unix/sysv/linux/alpha/Makefile +++ b/sysdeps/unix/sysv/linux/alpha/Makefile @@ -1,3 +1,7 @@ +ifeq (,$(filter -mlong-double-128,$(sysdep-CFLAGS))) +sysdep-CFLAGS += -mlong-double-128 +endif + ifeq ($(subdir),stdlib) gen-as-const-headers += ucontext-offsets.sym endif diff --git a/sysdeps/unix/sysv/linux/s390/Makefile b/sysdeps/unix/sysv/linux/s390/Makefile index 77f38523b5..20ce8450e3 100644 --- a/sysdeps/unix/sysv/linux/s390/Makefile +++ b/sysdeps/unix/sysv/linux/s390/Makefile @@ -2,6 +2,10 @@ abi-variants := 32 64 abi-32-condition := __WORDSIZE == 32 abi-64-condition := __WORDSIZE == 64 +ifeq (,$(filter -mlong-double-128,$(sysdep-CFLAGS))) +sysdep-CFLAGS += -mlong-double-128 +endif + ifeq ($(subdir),rt) librt-routines += rt-sysdep librt-shared-only-routines += rt-sysdep diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/Makefile b/sysdeps/unix/sysv/linux/sparc/sparc32/Makefile index 21c7dc1680..0dba32b698 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/Makefile +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/Makefile @@ -5,6 +5,10 @@ asm-CPPFLAGS = -D__ASSEMBLY__ ASFLAGS-.os += -fPIC LD += -melf32_sparc +ifeq (,$(filter -mlong-double-128,$(sysdep-CFLAGS))) +sysdep-CFLAGS += -mlong-double-128 +endif + ifeq ($(subdir),stdlib) gen-as-const-headers += ucontext_i.sym endif