From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29365 invoked by alias); 30 Jan 2006 16:53:10 -0000 Received: (qmail 29349 invoked by uid 22791); 30 Jan 2006 16:53:10 -0000 X-Spam-Check-By: sourceware.org Received: from sunsite.ms.mff.cuni.cz (HELO sunsite.mff.cuni.cz) (195.113.15.26) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 30 Jan 2006 16:53:08 +0000 Received: from sunsite.mff.cuni.cz (sunsite.mff.cuni.cz [127.0.0.1]) by sunsite.mff.cuni.cz (8.13.1/8.13.1) with ESMTP id k0UGqphE014691; Mon, 30 Jan 2006 17:52:51 +0100 Received: (from jj@localhost) by sunsite.mff.cuni.cz (8.13.1/8.13.1/Submit) id k0UGqo5o014690; Mon, 30 Jan 2006 17:52:50 +0100 Date: Mon, 30 Jan 2006 16:53:00 -0000 From: Jakub Jelinek To: Roland McGrath Cc: David Edelsohn , Glibc hackers Subject: [PATCH] Fix glibc build on ppc64 Message-ID: <20060130165250.GQ4625@sunsite.mff.cuni.cz> Reply-To: Jakub Jelinek Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Mailing-List: contact libc-hacker-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sourceware.org X-SW-Source: 2006-01/txt/msg00098.txt.bz2 Hi! The addition of if (TARGET_SOFT_FLOAT && TARGET_LONG_DOUBLE_128) \ { \ rs6000_long_double_type_size = 64; \ if (rs6000_explicit_options.long_double) \ warning (0, "soft-float and long-double-128 are incompatible"); \ } \ (well, not the warning, but the rs6000_long_double_type_size = 64; part) broke glibc build. A few files are built with -msoft-float to ensure that they don't touch floating point registers. They normally don't do any floating point arithmetics. find . -name Makefile | xargs grep msoft-float ./sysdeps/powerpc/powerpc64/Makefile:# Compiling with -msoft-float ensures that fp regs are not used ./sysdeps/powerpc/powerpc64/Makefile:CFLAGS-mcount.c += -msoft-float ./sysdeps/powerpc/powerpc64/elf/Makefile:CFLAGS-dl-runtime.os := -msoft-float ./sysdeps/powerpc/powerpc64/elf/Makefile:CFLAGS-dl-lookup.os := -msoft-float ./sysdeps/powerpc/powerpc64/elf/Makefile:CFLAGS-dl-misc.os := -msoft-float ./sysdeps/powerpc/powerpc64/elf/Makefile:CFLAGS-rtld-mempcpy.os := -msoft-float ./sysdeps/powerpc/powerpc64/elf/Makefile:CFLAGS-rtld-memmove.os := -msoft-float ./sysdeps/powerpc/powerpc64/elf/Makefile:CFLAGS-rtld-memchr.os := -msoft-float ./sysdeps/powerpc/powerpc64/elf/Makefile:CFLAGS-rtld-strnlen.os := -msoft-float ./sysdeps/powerpc/powerpc32/Makefile:+cflags += -msoft-float ./sysdeps/powerpc/powerpc32/Makefile:sysdep-LDFLAGS += -msoft-float The powerpc32 hunks are just for ifeq ($(with-fp),no) +cflags += -msoft-float sysdep-LDFLAGS += -msoft-float endif so in that case it is desirable to have -mlong-double-64 (though, we for --without-fp don't enable -mlong-double-128 in the Makefiles/configury). The following patch moves us back to building land, we'll get a warning and as we are lucky, even when the files are compiled with the implied -mlong-double-64 in the end, it works. But there could be potentially problems if ever in the future say ldsodefs.h uses long double in some structure and its layout changes because of that. Perhaps GCC could do instead: if (TARGET_SOFT_FLOAT && TARGET_LONG_DOUBLE_128) \ { \ if (rs6000_explicit_options.long_double) \ warning (0, "soft-float and long-double-128 are incompatible"); \ else \ rs6000_long_double_type_size = 64; \ } \ i.e. if -mlong-double{64,128} isn't used explicitely, -msoft-float silently defaults to -mlong-double-128, otherwise there is a warning but it is up to the user to know what he is doing (i.e. either not actually use floating point emulation functions, or supply the needed emulation functions). 2006-01-30 Jakub Jelinek * include/bits/stdlib-ldbl.h: New file. * include/bits/wchar-ldbl.h: New file. --- libc/include/bits/wchar-ldbl.h.jj 2006-01-30 12:26:46.000000000 +0100 +++ libc/include/bits/wchar-ldbl.h 2006-01-30 12:27:05.000000000 +0100 @@ -0,0 +1 @@ +#include --- libc/include/bits/stdlib-ldbl.h.jj 2006-01-30 12:26:46.000000000 +0100 +++ libc/include/bits/stdlib-ldbl.h 2006-01-30 12:26:39.000000000 +0100 @@ -0,0 +1 @@ +#include Jakub