Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
Roland McGrath committed Jun 16, 1996
1 parent 3433189 commit 26da047
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 62 deletions.
17 changes: 17 additions & 0 deletions 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.
Expand Down
8 changes: 2 additions & 6 deletions hurd/hurdinit.c
Expand Up @@ -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);
Expand All @@ -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
14 changes: 13 additions & 1 deletion math/Makefile
Expand Up @@ -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.
Expand All @@ -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


Expand All @@ -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 $< $@
6 changes: 6 additions & 0 deletions 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_;
6 changes: 6 additions & 0 deletions rpm/Makefile
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 4 additions & 0 deletions shlib-versions
Expand Up @@ -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
11 changes: 0 additions & 11 deletions 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
Expand Down
22 changes: 0 additions & 22 deletions sysdeps/unix/sysv/linux/i386/ieee_fpu.c

This file was deleted.

22 changes: 0 additions & 22 deletions sysdeps/unix/sysv/linux/ieee-fpucw.c

This file was deleted.

0 comments on commit 26da047

Please sign in to comment.