PATCH, libgcc: silence soft-fp warnings

Ben Elliston bje@au1.ibm.com
Tue Jan 13 05:47:00 GMT 2009


Late last year, I submitted a patch to silence warnings in the soft-fp
source files by using the warnings indiscriminately on all libgcc source
files.

As the soft-fp code is never modified locally, I don't think we should
worry much about warnings generated by this code.  Instead, this
approach only suppresses the two relevant warnings to the soft-fp source
files. 

The patch only applies these changes to the soft-fp builds on
powerpc*-linux.  With appropriate additions to config.host, this change
can be extended to other targets using soft-fp, such as a number of ARM
targets.  Should this be done with this patch?

Thanks to Paolo Bonzini for leading the way through the new libgcc maze.

Okay for mainline?
Ben


libgcc/
2009-01-13  Ben Elliston  <bje@au.ibm.com>

        * config/t-softfp: New file.
        * config.host (powerpc64-*-linux*, powerpc64-*-gnu*): Add t-softfp.
        (powerpc-*-linux*spe*, powerpc-*-linux*): Likewise.

Index: config/t-softfp
===================================================================
--- config/t-softfp     (revision 0)
+++ config/t-softfp     (revision 0)
@@ -0,0 +1,14 @@
+# Disable missing prototype and type limit warnings.  The prototypes
+# for the functions in the soft-fp files have not been brought across
+# from glibc.
+
+# cfr. srcdirify in gcc/Makefile.in
+soft-fp-files = $(filter $(gcc_srcdir)/config/soft-fp/%, $(LIB2ADD)) \
+       $(filter $(gcc_objdir)/config/soft-fp/%, $(LIB2ADD))
+
+soft-fp-objects-base = $(basename $(notdir $(soft-fp-files)))
+
+soft-fp-objects = $(addsuffix $(objext), $(soft-fp-objects-base)) \
+  $(addsuffix _s$(objext), $(soft-fp-objects-base))
+
+$(soft-fp-objects) : INTERNAL_CFLAGS += -Wno-missing-prototypes -Wno-type-limits
Index: config.host
===================================================================
--- config.host (revision 143326)
+++ config.host (working copy)
@@ -437,10 +437,10 @@
 picochip-*-*)
         ;;
 powerpc64-*-linux*)
-       tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-ldbl128"
+       tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-ldbl128 t-softfp"
        ;;
 powerpc64-*-gnu*)
-       tmake_file="${tmake_file} rs6000/t-ldbl128"
+       tmake_file="${tmake_file} rs6000/t-ldbl128 t-softfp"
        ;;
 powerpc-*-darwin*)
        ;;
@@ -468,10 +468,10 @@
        tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-ldbl128"
        ;;
 powerpc-*-linux*spe*)
-       tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-ldbl128"
+       tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-ldbl128 t-softfp"
        ;;
 powerpc-*-linux*)
-       tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-ldbl128"
+       tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-ldbl128 t-softfp"
        ;;
 powerpc-*-gnu-gnualtivec*)
        tmake_file="${tmake_file} rs6000/t-ldbl128"




More information about the Gcc-patches mailing list