This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Define -msoft-float on ppc when --without-fp specified



This patch makes the user's life easier by automatically passing the
appropriate flags to GCC to disable use of the FPU when --without-fp
is specified.

OK to commit?

-- 
- Geoffrey Keating <geoffk@geoffk.org> <geoffk@redhat.com>

===File ~/patches/cygnus/glibc-softfloat-submit.patch=======
2001-12-05  Geoff Keating  <geoffk@redhat.com>

	* config.make.in (with-fp): Define from configure.
	* configure.in: Substitute with_fp.
	* configure: Regenerate.
	* powerpc/Makefile: Set -msoft-float when --without-fp is specified,
	and don't change FPU environment.

Index: config.make.in
===================================================================
RCS file: /cvs/glibc/libc/config.make.in,v
retrieving revision 1.81
diff -p -u -u -p -r1.81 config.make.in
--- config.make.in	2001/11/16 01:03:15	1.81
+++ config.make.in	2001/12/06 00:03:06
@@ -44,6 +44,7 @@ have-z-combreloc = @libc_cv_z_combreloc@
 have-initfini = @libc_cv_have_initfini@
 have-Bgroup = @libc_cv_Bgroup@
 need-nopic-initfini = @nopic_initfini@
+with-fp = @with_fp@
 with-cvs = @with_cvs@
 old-glibc-headers = @old_glibc_headers@
 unwind-find-fde = @libc_cv_gcc_unwind_find_fde@
Index: configure.in
===================================================================
RCS file: /cvs/glibc/libc/configure.in,v
retrieving revision 1.327
diff -p -u -u -p -r1.327 configure.in
--- configure.in	2001/11/16 01:03:41	1.327
+++ configure.in	2001/12/06 00:03:13
@@ -59,6 +59,7 @@ dnl Arguments to specify presence of oth
 AC_ARG_WITH(fp, dnl
 [  --with-fp		  if using floating-point hardware [default=yes]],
 	    with_fp=$withval, with_fp=yes)
+AC_SUBST(with_fp)
 AC_ARG_WITH(binutils, dnl
   --with-binutils=PATH	  specify location of binutils (as and ld),
 	    path_binutils=$withval, path_binutils='')
Index: sysdeps/powerpc/Makefile
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/powerpc/Makefile,v
retrieving revision 1.13
diff -p -u -u -p -r1.13 Makefile
--- Makefile	2000/11/27 23:32:47	1.13
+++ Makefile	2001/12/06 00:03:13
@@ -3,8 +3,13 @@
 +cflags += -mnew-mnemonics -Wa,-mppc -mpowerpc
 asm-CPPFLAGS += -Wa,-mppc
 
+ifeq ($(with-fp),no)
++cflags += -msoft-float
+sysdep-LDFLAGS += -msoft-float
+else
 ifeq ($(subdir),math)
 libm-support += fenv_const fe_nomask
+endif
 endif
 
 ifeq ($(subdir),gmon)
============================================================


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]