* shlib-versions (*-*-*): Add libutil=1.
* rpm/Makefile (install-lib): Add libc.a et al.
(install-others): Only add libc.so if $(build-shared) is yes.
* math/Makefile (install-lib): New variable, list libieee.a.
(non-lib.a): Likewise.
(extra-objs): Likewise, and ieee-math.o.
($(objpfx)libieee.a): New target, link to ieee-math.o.
* math/ieee-math.c: New file.
* sysdeps/unix/sysv/linux/Makefile [$(subdir)=math]: Remove setfpucw
and libieee.a stuff.
* sysdeps/unix/sysv/linux/ieee-fpucw.c: File removed.
* sysdeps/unix/sysv/linux/i386/ieee_fpu.c: File removed.
Sun Jun 16 03:22:49 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
+ * hurd/hurdinit.c (map0): Remove [!PIC] conditional.
+
+ * shlib-versions (*-*-*): Add libutil=1.
+
+ * rpm/Makefile (install-lib): Add libc.a et al.
+ (install-others): Only add libc.so if $(build-shared) is yes.
+
+ * math/Makefile (install-lib): New variable, list libieee.a.
+ (non-lib.a): Likewise.
+ (extra-objs): Likewise, and ieee-math.o.
+ ($(objpfx)libieee.a): New target, link to ieee-math.o.
+ * math/ieee-math.c: New file.
+ * sysdeps/unix/sysv/linux/Makefile [$(subdir)=math]: Remove setfpucw
+ and libieee.a stuff.
+ * sysdeps/unix/sysv/linux/ieee-fpucw.c: File removed.
+ * sysdeps/unix/sysv/linux/i386/ieee_fpu.c: File removed.
+
* sysdeps/unix/sysv/Makefile (sysdep_headers): Make append of termio.h
and rule for it conditional on termio.h not already being in
sysdep_headers.
return 0;
}
\f
-#ifndef PIC
-
/* Map the page at address zero with no access allowed, so
dereferencing NULL will fault and no "anywhere" allocations
(e.g. the out of line memory containing the argument strings)
can be assigned address zero, which C says is not a valid pointer.
- When dynamically linked, this will be done by the dynamic linker
- before we run. */
+ When dynamically linked, this should be done by the dynamic linker
+ before we run, but failing is harmless and we ignore the error. */
static void map0 (void) __attribute__ ((unused));
text_set_element (_hurd_preinit_hook, map0);
&addr, __vm_page_size, 0, 0, MACH_PORT_NULL, 0, 1,
VM_PROT_NONE, VM_PROT_NONE, VM_INHERIT_COPY);
}
-
-#endif
#long-m-yes = $(long-m-routines) # uncomment this when code works
#distribute += $(long-m-routines:=.c) # and this when at least all files exist
-
# These functions are in libc instead of libm because __printf_fp
# calls them, so any program using printf will need them linked in,
# and we don't want to have to link every program with -lm.
distribute += $(long-c-yes:=.c)
+# The -lieee module sets the _LIB_VERSION_ switch to IEEE mode
+# for error handling in the -lm functions.
+install-lib += libieee.a
+non-lib.a += libieee.a
+extra-objs += libieee.a ieee-math.o
+
include ../Rules
# The fdlibm code generates a lot of these warnings but is otherwise clean.
override CFLAGS += -Wno-uninitialized -Wno-write-strings
+
+# The -lieee library is actually an object file.
+# The module just defines the _LIB_VERSION_ variable.
+# It's not a library to make sure it is linked in instead of s_lib_version.o.
+$(objpfx)libieee.a: $(objpfx)ieee-math.o
+ rm -f $@
+ ln $< $@
--- /dev/null
+/* Linking in this module forces IEEE error handling rules for math functions.
+ The default is POSIX.1 error handling. */
+
+#include <math.h>
+
+_LIB_VERSION_TYPE _LIB_VERSION = _IEEE_;
$(patsubst %.so,%-$(version).so,$(lib)) \
$(lib)$($(lib)-version) $(lib))
+# Add libc.a and libc_p.a.
+install-lib += $(foreach o,$(filter-out .so,$(object-suffixes)),\
+ $(patsubst %,$(libtype$o),c))
+
+ifeq (yes,$(build-shared))
# Add libc.so itself, which is a special case in Makerules.
ifndef libc.so-version
install-others += $(slibdir)/libc.so
$(slibdir)/libc-$(version).so \
$(slibdir)/libc.so$(libc.so-version)
endif
+endif
\f
all: glibc-$(version).$(config).rpm
# The -ldl interface (see <dlfcn.h>) is the same on all platforms.
*-*-* libdl=2
+
+# So far the -lutil interface is the same on all platforms, except for the
+# `struct utmp' format, which depends on libc.
+*-*-* libutil=1
-ifeq ($(subdir), math)
-sysdep_routines += setfpucw
-extra-objs += ieee-fpucw.o
-install-lib += libieee.a
-non-lib.a += libieee.a
-
-$(objpfx)libieee.a: $(objpfx)ieee-fpucw.o
- rm -f $@
- ln $< $@
-endif
-
ifeq ($(subdir), io)
sysdep_routines += fxstat lxstat xstat
endif
+++ /dev/null
-/* Default control word for ix86 FPU.
-Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
-
-#include <fpu_control.h>
-
-unsigned short __fpu_control = _FPU_IEEE;
+++ /dev/null
-/* Set default FPU control word for IEEE operation.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include "fpu_control.h"
-
-fpu_control_t __fpu_control = _FPU_IEEE;