From 8df5d34720dd71e934545bade879e04697830757 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 12 Dec 2017 13:56:47 +0000 Subject: Remove --with-fp / --without-fp. There is a configure option --without-fp that specifies that nofpu sysdeps directories should be used instead of fpu directories. For most glibc configurations, this option is of no use: either there is no valid nofpu variant of that configuration, or there are no fpu or nofpu sysdeps directories for that processor and so the option does nothing. For a few configurations, if you are using a soft-float compiler this option is required, and failing to use it generally results in compilation errors from inline asm using unavailable floating-point instructions. We're moving away from --with-cpu to configuring glibc based on how the compiler generates code, and it is natural to do so for --without-fp as well; in most cases the soft-float and hard-float ABIs are incompatible so you have no hope of building a working glibc with an inappropriately configured compiler or libgcc. This patch eliminates --without-fp, replacing it entirely by automatic configuration based on the compiler. Configurations for which this is relevant (coldfire / mips / powerpc32 / sh) define a variable with_fp_cond in their preconfigure fragments (under the same conditions under which those fragments do anything); this is a preprocessor conditional which the toplevel configure script then uses in a test to determine which sysdeps directories to use. The config.make with-fp variable remains. It's used only by powerpc (sysdeps/powerpc/powerpc32/Makefile) to add -mhard-float to various flags variables. For powerpc, -mcpu= options can imply use of soft-float. That could be an issue if you want to build for e.g. 476fp, but are using --with-cpu=476 because there isn't a 476fp sysdeps directory. If in future we eliminate --with-cpu and replace it entirely by testing the compiler, it would be natural at that point to eliminate that code as well (as the user should then just use a compiler defaulting to 476fp and the 476 sysdeps directory would be used automatically). Tested for x86_64, and tested with build-many-glibcs.py that installed shared libraries are unchanged by this patch. * configure.ac (--with-fp): Remove configure option. (with_fp_cond): New variable. (libc_cv_with_fp): New configure test. Use this variable instead of with_fp. * configure: Regenerated. * config.make.in (with-fp): Use @libc_cv_with_fp@. * manual/install.texi (Configuring and compiling): Remove --without-fp. * INSTALL: Regenerated. * sysdeps/m68k/preconfigure (with_fp_cond): Define for ColdFire. * sysdeps/mips/preconfigure (with_fp_cond): Define. * sysdeps/powerpc/preconfigure (with_fp_cond): Define for 32-bit. * sysdeps/sh/preconfigure (with_fp_cond): Define. * scripts/build-many-glibcs.py (Context.add_all_configs): Do not use --without-fp to configure glibc. --- scripts/build-many-glibcs.py | 51 +++++++++++++++----------------------------- 1 file changed, 17 insertions(+), 34 deletions(-) (limited to 'scripts') diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py index 59972a0..599e12e 100755 --- a/scripts/build-many-glibcs.py +++ b/scripts/build-many-glibcs.py @@ -216,15 +216,12 @@ class Context(object): os_name='linux-gnu', variant='soft', gcc_cfg=['--with-mips-plt', '--with-float=soft'], - glibcs=[{'variant': 'n32-soft', - 'cfg': ['--without-fp']}, + glibcs=[{'variant': 'n32-soft'}, {'variant': 'soft', 'arch': 'mips', - 'ccopts': '-mabi=32', - 'cfg': ['--without-fp']}, + 'ccopts': '-mabi=32'}, {'variant': 'n64-soft', - 'ccopts': '-mabi=64', - 'cfg': ['--without-fp']}]) + 'ccopts': '-mabi=64'}]) self.add_config(arch='mips64', os_name='linux-gnu', variant='nan2008', @@ -244,15 +241,12 @@ class Context(object): '--with-arch-64=mips64r2', '--with-arch-32=mips32r2', '--with-float=soft'], - glibcs=[{'variant': 'n32-nan2008-soft', - 'cfg': ['--without-fp']}, + glibcs=[{'variant': 'n32-nan2008-soft'}, {'variant': 'nan2008-soft', 'arch': 'mips', - 'ccopts': '-mabi=32', - 'cfg': ['--without-fp']}, + 'ccopts': '-mabi=32'}, {'variant': 'n64-nan2008-soft', - 'ccopts': '-mabi=64', - 'cfg': ['--without-fp']}]) + 'ccopts': '-mabi=64'}]) self.add_config(arch='mips64el', os_name='linux-gnu', gcc_cfg=['--with-mips-plt'], @@ -265,15 +259,12 @@ class Context(object): os_name='linux-gnu', variant='soft', gcc_cfg=['--with-mips-plt', '--with-float=soft'], - glibcs=[{'variant': 'n32-soft', - 'cfg': ['--without-fp']}, + glibcs=[{'variant': 'n32-soft'}, {'variant': 'soft', 'arch': 'mipsel', - 'ccopts': '-mabi=32', - 'cfg': ['--without-fp']}, + 'ccopts': '-mabi=32'}, {'variant': 'n64-soft', - 'ccopts': '-mabi=64', - 'cfg': ['--without-fp']}]) + 'ccopts': '-mabi=64'}]) self.add_config(arch='mips64el', os_name='linux-gnu', variant='nan2008', @@ -293,15 +284,12 @@ class Context(object): '--with-arch-64=mips64r2', '--with-arch-32=mips32r2', '--with-float=soft'], - glibcs=[{'variant': 'n32-nan2008-soft', - 'cfg': ['--without-fp']}, + glibcs=[{'variant': 'n32-nan2008-soft'}, {'variant': 'nan2008-soft', 'arch': 'mipsel', - 'ccopts': '-mabi=32', - 'cfg': ['--without-fp']}, + 'ccopts': '-mabi=32'}, {'variant': 'n64-nan2008-soft', - 'ccopts': '-mabi=64', - 'cfg': ['--without-fp']}]) + 'ccopts': '-mabi=64'}]) self.add_config(arch='nios2', os_name='linux-gnu') self.add_config(arch='powerpc', @@ -314,8 +302,7 @@ class Context(object): os_name='linux-gnu', variant='soft', gcc_cfg=['--disable-multilib', '--with-float=soft', - '--enable-secureplt'], - glibcs=[{'variant': 'soft', 'cfg': ['--without-fp']}]) + '--enable-secureplt']) self.add_config(arch='powerpc64', os_name='linux-gnu', gcc_cfg=['--disable-multilib', '--enable-secureplt']) @@ -325,13 +312,11 @@ class Context(object): self.add_config(arch='powerpc', os_name='linux-gnuspe', gcc_cfg=['--disable-multilib', '--enable-secureplt', - '--enable-e500-double'], - glibcs=[{'cfg': ['--without-fp']}]) + '--enable-e500-double']) self.add_config(arch='powerpc', os_name='linux-gnuspe', variant='e500v1', - gcc_cfg=['--disable-multilib', '--enable-secureplt'], - glibcs=[{'variant': 'e500v1', 'cfg': ['--without-fp']}]) + gcc_cfg=['--disable-multilib', '--enable-secureplt']) self.add_config(arch='s390x', os_name='linux-gnu', glibcs=[{}, @@ -347,13 +332,11 @@ class Context(object): self.add_config(arch='sh4', os_name='linux-gnu', variant='soft', - gcc_cfg=['--without-fp'], - glibcs=[{'variant': 'soft', 'cfg': ['--without-fp']}]) + gcc_cfg=['--without-fp']) self.add_config(arch='sh4eb', os_name='linux-gnu', variant='soft', - gcc_cfg=['--without-fp'], - glibcs=[{'variant': 'soft', 'cfg': ['--without-fp']}]) + gcc_cfg=['--without-fp']) self.add_config(arch='sparc64', os_name='linux-gnu', glibcs=[{}, -- cgit v1.1