]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* hurd/hurdinit.c (map0): Remove [!PIC] conditional. cvs/libc-960616
authorRoland McGrath <roland@gnu.org>
Sun, 16 Jun 1996 09:31:23 +0000 (09:31 +0000)
committerRoland McGrath <roland@gnu.org>
Sun, 16 Jun 1996 09:31:23 +0000 (09:31 +0000)
* 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.

ChangeLog
hurd/hurdinit.c
math/Makefile
math/ieee-math.c [new file with mode: 0644]
rpm/Makefile
shlib-versions
sysdeps/unix/sysv/linux/Makefile
sysdeps/unix/sysv/linux/i386/ieee_fpu.c [deleted file]
sysdeps/unix/sysv/linux/ieee-fpucw.c [deleted file]

index 941a62dbccf04142417f5418fe855b5bf4bbe739..9a0b50fdaffd5b2e13a06b489166247ee8eba43d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,22 @@
 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.
index eccbd8ed3d10f4ae6406d0216f3b3e94a50ed225..7d946b8bffd09c0811a1c12d794aaeb715e2eb9b 100644 (file)
@@ -202,15 +202,13 @@ _hurd_setproc (process_t procserver)
   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);
@@ -223,5 +221,3 @@ map0 (void)
            &addr, __vm_page_size, 0, 0, MACH_PORT_NULL, 0, 1,
            VM_PROT_NONE, VM_PROT_NONE, VM_INHERIT_COPY);
 }
-
-#endif
index 65302911c4ca5db13ca3e068ec0e68fb106e1dae..dfcbff7fc785b4bcbbe656207724b0c7ecdfb083 100644 (file)
@@ -52,7 +52,6 @@ long-m-routines = $(patsubst %_rl,%l_r,$(libm-calls:=l)) # not ready yet
 #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.
@@ -62,6 +61,12 @@ long-c-yes = $(calls:=l)
 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
 
 
@@ -82,3 +87,10 @@ endif
 
 # 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 $< $@
diff --git a/math/ieee-math.c b/math/ieee-math.c
new file mode 100644 (file)
index 0000000..99e41a3
--- /dev/null
@@ -0,0 +1,6 @@
+/* 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_;
index 5ffa19ab884196366396d4584e4cbbf90e42fb14..1bf6b6ed5196e0fe309d62f7bfb9ea99ee3c984a 100644 (file)
@@ -38,6 +38,11 @@ install-lib += $(foreach lib,$(versioned),\
                         $(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
@@ -46,6 +51,7 @@ install-others += $(libdir)/libc.so \
                  $(slibdir)/libc-$(version).so \
                  $(slibdir)/libc.so$(libc.so-version)
 endif
+endif
 \f
 
 all: glibc-$(version).$(config).rpm
index e0434672e9ad7617917ea382158ecf64ce08e39f..2b92f95f1ec59dc659a2f0f825145d8ae912be47 100644 (file)
@@ -26,3 +26,7 @@ alpha-*-linux*                libc=6
 
 # 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
index a14f84c3b1c7f6a915143f708d0b93c0fcdec5f3..db81c2cc8e30a6bec4cc53323f0454605974aab2 100644 (file)
@@ -1,14 +1,3 @@
-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
diff --git a/sysdeps/unix/sysv/linux/i386/ieee_fpu.c b/sysdeps/unix/sysv/linux/i386/ieee_fpu.c
deleted file mode 100644 (file)
index 4151154..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/* 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;
diff --git a/sysdeps/unix/sysv/linux/ieee-fpucw.c b/sysdeps/unix/sysv/linux/ieee-fpucw.c
deleted file mode 100644 (file)
index 6f4ac19..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/* 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;