diff options
author | Roland McGrath <roland@gnu.org> | 1996-06-16 09:31:23 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1996-06-16 09:31:23 +0000 |
commit | 26da047f376abd5da2561be914b93179c7230afa (patch) | |
tree | c2f1ae03ba5e26ee38a222f6a27ee027ac13a264 | |
parent | 3433189e8a3934084db3945f1e9c0c8fa3f8f166 (diff) | |
download | glibc-26da047f376abd5da2561be914b93179c7230afa.tar.gz glibc-26da047f376abd5da2561be914b93179c7230afa.tar.xz glibc-26da047f376abd5da2561be914b93179c7230afa.zip |
* hurd/hurdinit.c (map0): Remove [!PIC] conditional. cvs/libc-960616
* 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.
-rw-r--r-- | ChangeLog | 17 | ||||
-rw-r--r-- | hurd/hurdinit.c | 8 | ||||
-rw-r--r-- | math/Makefile | 14 | ||||
-rw-r--r-- | math/ieee-math.c | 6 | ||||
-rw-r--r-- | rpm/Makefile | 6 | ||||
-rw-r--r-- | shlib-versions | 4 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/Makefile | 11 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/ieee_fpu.c | 22 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/ieee-fpucw.c | 22 |
9 files changed, 48 insertions, 62 deletions
diff --git a/ChangeLog b/ChangeLog index 941a62dbcc..9a0b50fdaf 100644 --- 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. diff --git a/hurd/hurdinit.c b/hurd/hurdinit.c index eccbd8ed3d..7d946b8bff 100644 --- a/hurd/hurdinit.c +++ b/hurd/hurdinit.c @@ -202,15 +202,13 @@ _hurd_setproc (process_t procserver) return 0; } -#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 diff --git a/math/Makefile b/math/Makefile index 65302911c4..dfcbff7fc7 100644 --- a/math/Makefile +++ b/math/Makefile @@ -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 index 0000000000..99e41a31c0 --- /dev/null +++ b/math/ieee-math.c @@ -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_; diff --git a/rpm/Makefile b/rpm/Makefile index 5ffa19ab88..1bf6b6ed51 100644 --- a/rpm/Makefile +++ b/rpm/Makefile @@ -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 all: glibc-$(version).$(config).rpm diff --git a/shlib-versions b/shlib-versions index e0434672e9..2b92f95f1e 100644 --- a/shlib-versions +++ b/shlib-versions @@ -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 diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index a14f84c3b1..db81c2cc8e 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -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 index 41511547b2..0000000000 --- a/sysdeps/unix/sysv/linux/i386/ieee_fpu.c +++ /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 index 6f4ac19c2d..0000000000 --- a/sysdeps/unix/sysv/linux/ieee-fpucw.c +++ /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; |