This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
A patch for sysdeps/i386/Makefile
On Thu, Nov 30, 2000 at 03:24:51PM -0800, Ulrich Drepper wrote:
> "H . J . Lu" <hjl@valinux.com> writes:
>
> > Does -Os affect the math library only?
>
This patch seems to work for me. It passes "make check" with -Os. I am
using gcc 2.96-64 from Red Hat.
H.J.
----
2000-11-30 H.J. Lu <hjl@gnu.org>
* sysdeps/i386/Makefile (+cflags): Replace -Os with -O1 for
libm.
Index: sysdeps/i386/Makefile
===================================================================
RCS file: /work/cvs/gnu/glibc/sysdeps/i386/Makefile,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 Makefile
--- sysdeps/i386/Makefile 2000/05/21 21:11:34 1.1.1.1
+++ sysdeps/i386/Makefile 2000/12/01 01:57:32
@@ -24,3 +24,10 @@ CFLAGS-rtld.c += -Wno-uninitialized -Wno
CFLAGS-dl-load.c += -Wno-unused
CFLAGS-dl-reloc.c += -Wno-unused
endif
+
+# -Os will generate the incorrect math library. Replace -Os with -O1.
+ifeq ($(subdir),math)
+ifneq (,$(filter -Os,$(+cflags)))
++cflags := $(filter-out -Os,$(+cflags)) -O1
+endif
+endif