mirror of
git://sourceware.org/git/glibc.git
synced 2025-03-06 20:58:33 +01:00
update from main archive 960904
Thu Sep 5 03:20:42 1996 Ulrich Drepper <drepper@cygnus.com> Change configuration and Makefiles to allow add-ons to have a sysdeps/ directory hierachy. * configure.in: Test for sysdeps/ directory in add-ons. Before all test and searches in these hierachies, too. * Makeconfig (full-config-subdirs): Define based on $(config-sysdirs). Extend with $(..) if not absolute path. Use $(full-config-subdirs) where $(config-sysdirs) was used. * Makefile ($(objpfx)sysd-dirs): Use config-sysdirs. * MakeTAGS: Use $(full-config-subdirs). * Makerules: Change comment to libc.so link script. (sysdirs): Define based on $(full-config-subdirs). (sysd-Makefile): Define using config-sysdirs. (sysd-rules): Likewise. * sysdeps/unix/Makefile (sysd-syscalls): Define based on +sysdep-dirs. * sysdeps/unix/make-syscalls.sh: Remove basedir argument. Wed Sep 4 01:32:21 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/m68k/fpu/k_cos.c: Rewritten for better accuracy. * sysdeps/m68k/fpu/k_sin.c: Likewise. * sysdeps/m68k/fpu/k_tan.c: Likewise. Thu Sep 5 01:06:09 1996 Richard Henderson <rth@tamu.edu> * malloc/free.c (free): Protect by using __libc_malloc_lock. * malloc/malloc-find.c (malloc_find_object_address): Likewise. * malloc/malloc-size.c (malloc_usable_size): Likewise. * malloc/malloc-walk.c (malloc_walk): Likewise. * malloc/memalign.c (memalign): Likewise. * malloc/realloc.c (realloc): Likewise. * malloc/malloc.c: Define __libc_malloc_lock. (_malloc_internal): Don't use `malloc'. Instead look for `__malloc_hook' or call `_malloc_internal'. (malloc): Protect by using `__libc_malloc_lock'. * malloc/malloc.h: Declare `__libc_malloc_lock'. Mon Sep 2 22:42:59 1996 Richard Henderson <rth@tamu.edu> * sysdeps/alpha/elf/start.S: Use weak_alias for __start instead of the hard definition. * sysdeps/alpha/dl-machine.h (RTLD_START): Add type info for _start and _dl_start_user. * sysdeps/unix/sysv/linux/alpha/init-first.h (SYSDEP_CALL_INIT): Make _dl_starting_up weak. Add type info for NAME. Mon Sep 2 22:15:14 1996 Richard Henderson <rth@tamu.edu> * Makefile (all): Add extra_solibs pass. (+subdir_targets): Same. * Rules (extra_solibs): New phony empty target for subdirs without extra libs. * extra-lib.mk: Build lib*.so* in extra_solibs not lib-noranlib. * manual/Makefile: Add dummy extra_solibs target. Sun Sep 1 15:41:22 1996 Richard Henderson <rth@tamu.edu> * Makeconfig (+link): Add $(link-extra-libs). (link-extra-libs): New variable which expands to the full paths of the other libraries needed by a program, as controled by LDLIBS-$(@F). * db/Makefile: Use LDLIBS-makedb to link libdb not a dependency, as the later attempts to install the library before linking it. * sysdeps/unix/alpha/sysdep.S: Align errno. * sysdeps/unix/sysv/linux/alpha/ioperm.c (struct platform): Add hae_shift entry. (io): Move bus_memory_base and sparse_bus_memory_base into struct. (_hae_shift): New function. * sysdeps/unix/sysv/linux/alpha/sys/io.h: New file. Prototypes for the bus query functions. Sat Aug 31 18:14:54 1996 Richard Henderson <rth@tamu.edu> * elf/dl-close.c (_dl_close): In static executables, map->l_prev can be NULL when unloading a library. * elf/dl-open.c (_dl_open): Pass __environ instead of __libc_envp to the library .init function. * sysdeps/alpha/dl-machine.h (elf_machine_rela): Since we omitted part of the COPY reloc processing earlier, omit the rest now -- we'll get into less trouble later when some fool does use a COPY. * sysdeps/unix/sysv/linux/init-first.c (init): Accept argc et al as parameters. Move all argc and __libc_multiple_libcs calculation out to init-first.h. Use __environ not __libc_envp. * sysdeps/unix/sysv/linux/alpha/init-first.h: Rewrite. * sysdeps/unix/sysv/linux/i386/init-first.h: Rewrite. Thu Aug 29 20:26:40 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/posix/profil.c (profil): Don't clobber saved timer and signal settings when profiling was already turned on. * csu/gmon-start.c (__gmon_start__) [HAVE_INITFINI]: Protect from being called twice. Wed Sep 4 01:31:50 1996 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/linux/i386/mmap.S: Test for 0 < return value < -4096 and not < 0 to decide about failure. Reported by Andreas Jaeger. Tue Sep 3 19:04:05 1996 Ulrich Drepper <drepper@cygnus.com> * stdio-common/vfscanf.c (__vfscanf): Don't count EOF char in %c format. Sat Aug 31 18:10:51 1996 Ulrich Drepper <drepper@cygnus.com> * wcsmbs/wchar.h: Define prototypes for wcstoq and wcstouq only #ifdef __USE_GNU. Sat Aug 31 12:34:29 1996 Ulrich Drepper <drepper@cygnus.com> * version.c: Add missing newline character in banner. * sysdeps/unix/sysv/linux/alpha/Dist: Correct typo. * sysdeps/unix/sysv/linux/i386/Dist: Likewise. Sat Aug 31 03:07:39 1996 Ulrich Drepper <drepper@cygnus.com> * intl/l10nflist.c (_nl_normalize_codeset): We convert to lower case, so don't prepend uppercase `ISO' for only numeric arg.
This commit is contained in:
parent
db813f25f2
commit
57ba7bb471
40 changed files with 601 additions and 248 deletions
129
ChangeLog
129
ChangeLog
|
@ -1,3 +1,132 @@
|
||||||
|
Thu Sep 5 03:20:42 1996 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
|
Change configuration and Makefiles to allow add-ons to have a
|
||||||
|
sysdeps/ directory hierachy.
|
||||||
|
* configure.in: Test for sysdeps/ directory in add-ons. Before
|
||||||
|
all test and searches in these hierachies, too.
|
||||||
|
* Makeconfig (full-config-subdirs): Define based on $(config-sysdirs).
|
||||||
|
Extend with $(..) if not absolute path.
|
||||||
|
Use $(full-config-subdirs) where $(config-sysdirs) was used.
|
||||||
|
* Makefile ($(objpfx)sysd-dirs): Use config-sysdirs.
|
||||||
|
* MakeTAGS: Use $(full-config-subdirs).
|
||||||
|
* Makerules: Change comment to libc.so link script.
|
||||||
|
(sysdirs): Define based on $(full-config-subdirs).
|
||||||
|
(sysd-Makefile): Define using config-sysdirs.
|
||||||
|
(sysd-rules): Likewise.
|
||||||
|
* sysdeps/unix/Makefile (sysd-syscalls): Define based on +sysdep-dirs.
|
||||||
|
* sysdeps/unix/make-syscalls.sh: Remove basedir argument.
|
||||||
|
|
||||||
|
Wed Sep 4 01:32:21 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
||||||
|
|
||||||
|
* sysdeps/m68k/fpu/k_cos.c: Rewritten for better accuracy.
|
||||||
|
* sysdeps/m68k/fpu/k_sin.c: Likewise.
|
||||||
|
* sysdeps/m68k/fpu/k_tan.c: Likewise.
|
||||||
|
|
||||||
|
Thu Sep 5 01:06:09 1996 Richard Henderson <rth@tamu.edu>
|
||||||
|
|
||||||
|
* malloc/free.c (free): Protect by using __libc_malloc_lock.
|
||||||
|
* malloc/malloc-find.c (malloc_find_object_address): Likewise.
|
||||||
|
* malloc/malloc-size.c (malloc_usable_size): Likewise.
|
||||||
|
* malloc/malloc-walk.c (malloc_walk): Likewise.
|
||||||
|
* malloc/memalign.c (memalign): Likewise.
|
||||||
|
* malloc/realloc.c (realloc): Likewise.
|
||||||
|
* malloc/malloc.c: Define __libc_malloc_lock.
|
||||||
|
(_malloc_internal): Don't use `malloc'. Instead look for
|
||||||
|
`__malloc_hook' or call `_malloc_internal'.
|
||||||
|
(malloc): Protect by using `__libc_malloc_lock'.
|
||||||
|
* malloc/malloc.h: Declare `__libc_malloc_lock'.
|
||||||
|
|
||||||
|
Mon Sep 2 22:42:59 1996 Richard Henderson <rth@tamu.edu>
|
||||||
|
|
||||||
|
* sysdeps/alpha/elf/start.S: Use weak_alias for __start
|
||||||
|
instead of the hard definition.
|
||||||
|
|
||||||
|
* sysdeps/alpha/dl-machine.h (RTLD_START): Add type info for
|
||||||
|
_start and _dl_start_user.
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/alpha/init-first.h (SYSDEP_CALL_INIT):
|
||||||
|
Make _dl_starting_up weak. Add type info for NAME.
|
||||||
|
|
||||||
|
Mon Sep 2 22:15:14 1996 Richard Henderson <rth@tamu.edu>
|
||||||
|
|
||||||
|
* Makefile (all): Add extra_solibs pass.
|
||||||
|
(+subdir_targets): Same.
|
||||||
|
* Rules (extra_solibs): New phony empty target for subdirs without
|
||||||
|
extra libs.
|
||||||
|
* extra-lib.mk: Build lib*.so* in extra_solibs not lib-noranlib.
|
||||||
|
* manual/Makefile: Add dummy extra_solibs target.
|
||||||
|
|
||||||
|
Sun Sep 1 15:41:22 1996 Richard Henderson <rth@tamu.edu>
|
||||||
|
|
||||||
|
* Makeconfig (+link): Add $(link-extra-libs).
|
||||||
|
(link-extra-libs): New variable which expands to the full paths of
|
||||||
|
the other libraries needed by a program, as controled by LDLIBS-$(@F).
|
||||||
|
* db/Makefile: Use LDLIBS-makedb to link libdb not a dependency, as
|
||||||
|
the later attempts to install the library before linking it.
|
||||||
|
|
||||||
|
* sysdeps/unix/alpha/sysdep.S: Align errno.
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/alpha/ioperm.c (struct platform): Add
|
||||||
|
hae_shift entry.
|
||||||
|
(io): Move bus_memory_base and sparse_bus_memory_base into struct.
|
||||||
|
(_hae_shift): New function.
|
||||||
|
* sysdeps/unix/sysv/linux/alpha/sys/io.h: New file. Prototypes
|
||||||
|
for the bus query functions.
|
||||||
|
|
||||||
|
Sat Aug 31 18:14:54 1996 Richard Henderson <rth@tamu.edu>
|
||||||
|
|
||||||
|
* elf/dl-close.c (_dl_close): In static executables, map->l_prev
|
||||||
|
can be NULL when unloading a library.
|
||||||
|
|
||||||
|
* elf/dl-open.c (_dl_open): Pass __environ instead of __libc_envp
|
||||||
|
to the library .init function.
|
||||||
|
|
||||||
|
* sysdeps/alpha/dl-machine.h (elf_machine_rela): Since we omitted
|
||||||
|
part of the COPY reloc processing earlier, omit the rest now --
|
||||||
|
we'll get into less trouble later when some fool does use a COPY.
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/init-first.c (init): Accept argc et al as
|
||||||
|
parameters. Move all argc and __libc_multiple_libcs calculation out
|
||||||
|
to init-first.h. Use __environ not __libc_envp.
|
||||||
|
* sysdeps/unix/sysv/linux/alpha/init-first.h: Rewrite.
|
||||||
|
* sysdeps/unix/sysv/linux/i386/init-first.h: Rewrite.
|
||||||
|
|
||||||
|
Thu Aug 29 20:26:40 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
||||||
|
|
||||||
|
* sysdeps/posix/profil.c (profil): Don't clobber saved timer and
|
||||||
|
signal settings when profiling was already turned on.
|
||||||
|
|
||||||
|
* csu/gmon-start.c (__gmon_start__) [HAVE_INITFINI]: Protect from
|
||||||
|
being called twice.
|
||||||
|
|
||||||
|
Wed Sep 4 01:31:50 1996 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/i386/mmap.S: Test for
|
||||||
|
0 < return value < -4096 and not < 0 to decide about failure.
|
||||||
|
Reported by Andreas Jaeger.
|
||||||
|
|
||||||
|
Tue Sep 3 19:04:05 1996 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
|
* stdio-common/vfscanf.c (__vfscanf): Don't count EOF char
|
||||||
|
in %c format.
|
||||||
|
|
||||||
|
Sat Aug 31 18:10:51 1996 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
|
* wcsmbs/wchar.h: Define prototypes for wcstoq and wcstouq only
|
||||||
|
#ifdef __USE_GNU.
|
||||||
|
|
||||||
|
Sat Aug 31 12:34:29 1996 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
|
* version.c: Add missing newline character in banner.
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/alpha/Dist: Correct typo.
|
||||||
|
* sysdeps/unix/sysv/linux/i386/Dist: Likewise.
|
||||||
|
|
||||||
|
Sat Aug 31 03:07:39 1996 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
|
* intl/l10nflist.c (_nl_normalize_codeset): We convert to lower
|
||||||
|
case, so don't prepend uppercase `ISO' for only numeric arg.
|
||||||
|
|
||||||
Tue Sep 3 11:16:07 1996 Thomas Bushnell/ n/BSG <thomas@gnu.ai.mit.edu>
|
Tue Sep 3 11:16:07 1996 Thomas Bushnell/ n/BSG <thomas@gnu.ai.mit.edu>
|
||||||
|
|
||||||
* shadow/lckpwdf.c (__ulckpwdf): Don't take address of LOCK in
|
* shadow/lckpwdf.c (__ulckpwdf): Don't take address of LOCK in
|
||||||
|
|
2
MakeTAGS
2
MakeTAGS
|
@ -39,7 +39,7 @@ tags_sources = $(all-sources) $(all-headers) $(all-dist)
|
||||||
endif # ctype
|
endif # ctype
|
||||||
endif # No tags_sources
|
endif # No tags_sources
|
||||||
|
|
||||||
sysdep-dirs := $(addprefix $(sysdep_dir)/,$(sysdirs))
|
sysdep-dirs := $(full-config-subdirs)
|
||||||
|
|
||||||
ifndef sysdep_dirs
|
ifndef sysdep_dirs
|
||||||
# Find all sysdep directories.
|
# Find all sysdep directories.
|
||||||
|
|
24
Makeconfig
24
Makeconfig
|
@ -78,10 +78,14 @@ endif
|
||||||
sysdep_dir := $(..)sysdeps
|
sysdep_dir := $(..)sysdeps
|
||||||
export sysdep_dir := $(sysdep_dir)
|
export sysdep_dir := $(sysdep_dir)
|
||||||
|
|
||||||
|
|
||||||
# Get the values defined by options to `configure'.
|
# Get the values defined by options to `configure'.
|
||||||
include $(common-objpfx)config.make
|
include $(common-objpfx)config.make
|
||||||
|
|
||||||
|
# Complete path to sysdep dirs.
|
||||||
|
full-config-sysdirs := $(filter /%, $(config-sysdirs)) \
|
||||||
|
$(addprefix $(..), $(filter-out /%, $(config-sysdirs)))
|
||||||
|
export full-config-sysdirs := $(full-config-sysdirs)
|
||||||
|
|
||||||
# Run config.status to update config.make and config.h. We don't show the
|
# Run config.status to update config.make and config.h. We don't show the
|
||||||
# dependence of config.h to Make, because it is only touched when it
|
# dependence of config.h to Make, because it is only touched when it
|
||||||
# changes and so config.status would be run every time; the dependence of
|
# changes and so config.status would be run every time; the dependence of
|
||||||
|
@ -93,12 +97,12 @@ $(common-objpfx)config.make: $(common-objpfx)config.status $(..)config.h.in
|
||||||
# Find all the sysdeps configure fragments, to make sure we re-run
|
# Find all the sysdeps configure fragments, to make sure we re-run
|
||||||
# configure when any of them changes.
|
# configure when any of them changes.
|
||||||
$(common-objpfx)config.status: $(..)configure \
|
$(common-objpfx)config.status: $(..)configure \
|
||||||
$(foreach dir,$(config-sysdirs),\
|
$(foreach dir,$(full-config-sysdirs),\
|
||||||
$(wildcard \
|
$(wildcard \
|
||||||
$(sysdep_dir)/$(dir)/Implies) \
|
$(dir)/Implies) \
|
||||||
$(patsubst %.in,%,\
|
$(patsubst %.in,%,\
|
||||||
$(firstword $(wildcard \
|
$(firstword $(wildcard \
|
||||||
$(addprefix $(sysdep_dir)/$(dir)/,configure configure.in)))))
|
$(addprefix $(dir)/,configure configure.in)))))
|
||||||
@cd $(@D); if test -f $(@F); then exec $(SHELL) $(@F) --recheck; else \
|
@cd $(@D); if test -f $(@F); then exec $(SHELL) $(@F) --recheck; else \
|
||||||
echo The GNU C library has not been configured. >&2; \
|
echo The GNU C library has not been configured. >&2; \
|
||||||
echo Run \`configure\' to configure it before building. >&2; \
|
echo Run \`configure\' to configure it before building. >&2; \
|
||||||
|
@ -299,8 +303,8 @@ ifndef +link
|
||||||
+link = $(CC) -nostdlib -nostartfiles -o $@ \
|
+link = $(CC) -nostdlib -nostartfiles -o $@ \
|
||||||
$(sysdep-LDFLAGS) $(config-LDFLAGS) $(LDFLAGS) \
|
$(sysdep-LDFLAGS) $(config-LDFLAGS) $(LDFLAGS) \
|
||||||
$(addprefix $(csu-objpfx),start.o) $(+preinit) \
|
$(addprefix $(csu-objpfx),start.o) $(+preinit) \
|
||||||
$(filter-out $(common-objpfx)libc%,$^) $(link-libc) \
|
$(filter-out $(common-objpfx)libc%,$^) \
|
||||||
$(+postinit)
|
$(link-extra-libs) $(link-libc) $(+postinit)
|
||||||
endif
|
endif
|
||||||
ifndef config-LDFLAGS
|
ifndef config-LDFLAGS
|
||||||
ifeq (yes,$(build-shared))
|
ifeq (yes,$(build-shared))
|
||||||
|
@ -330,6 +334,13 @@ else
|
||||||
link-libc = $(common-objpfx)libc.a $(gnulib) $(common-objpfx)libc.a
|
link-libc = $(common-objpfx)libc.a $(gnulib) $(common-objpfx)libc.a
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
ifndef link-extra-libs
|
||||||
|
ifeq (yes,$(build-shared))
|
||||||
|
link-extra-libs = $(foreach lib,$(LDLIBS-$(@F)),$(common-objpfx)$(lib).so$($(notdir $(lib)).so-version))
|
||||||
|
else
|
||||||
|
link-extra-libs = $(foreach lib,$(LDLIBS-$(@F)),$(common-objpfx)$(lib).a)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
ifndef gnulib
|
ifndef gnulib
|
||||||
gnulib := -lgcc
|
gnulib := -lgcc
|
||||||
endif
|
endif
|
||||||
|
@ -339,6 +350,7 @@ ifeq ($(elf),yes)
|
||||||
endif
|
endif
|
||||||
csu-objpfx = $(common-objpfx)csu/
|
csu-objpfx = $(common-objpfx)csu/
|
||||||
elf-objpfx = $(common-objpfx)elf/
|
elf-objpfx = $(common-objpfx)elf/
|
||||||
|
db-objpfx = $(common-objpfx)db/
|
||||||
|
|
||||||
ifeq (yes,$(build-shared))
|
ifeq (yes,$(build-shared))
|
||||||
# The name under which the run-time dynamic linker is installed.
|
# The name under which the run-time dynamic linker is installed.
|
||||||
|
|
23
Makefile
23
Makefile
|
@ -26,7 +26,7 @@ endif
|
||||||
|
|
||||||
# This is the default target; it makes everything except the tests.
|
# This is the default target; it makes everything except the tests.
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: lib others
|
all: lib extra_solibs others
|
||||||
|
|
||||||
define autoconf-it
|
define autoconf-it
|
||||||
@-rm -f $@.new
|
@-rm -f $@.new
|
||||||
|
@ -73,14 +73,13 @@ subdirs := $(filter mach,$(subdirs)) $(filter hurd,$(subdirs)) \
|
||||||
|
|
||||||
|
|
||||||
# These are the targets that are made by making them in each subdirectory.
|
# These are the targets that are made by making them in each subdirectory.
|
||||||
+subdir_targets := subdir_lib objects objs others subdir_mostlyclean \
|
+subdir_targets := subdir_lib extra_solibs objects objs others \
|
||||||
subdir_clean subdir_distclean subdir_realclean \
|
subdir_mostlyclean subdir_clean subdir_distclean \
|
||||||
tests subdir_lint.out \
|
subdir_realclean tests subdir_lint.out \
|
||||||
subdir_distinfo \
|
subdir_distinfo \
|
||||||
subdir_echo-headers subdir_echo-distinfo \
|
subdir_echo-headers subdir_echo-distinfo \
|
||||||
subdir_install $(addprefix install-, \
|
subdir_install \
|
||||||
no-libc.a bin lib \
|
$(addprefix install-, no-libc.a bin lib data headers others)
|
||||||
data headers others)
|
|
||||||
|
|
||||||
headers := errno.h sys/errno.h errnos.h limits.h values.h \
|
headers := errno.h sys/errno.h errnos.h limits.h values.h \
|
||||||
features.h gnu-versions.h libc-lock.h
|
features.h gnu-versions.h libc-lock.h
|
||||||
|
@ -117,9 +116,13 @@ endif
|
||||||
|
|
||||||
$(objpfx)sysd-dirs: $(+sysdir_pfx)config.make
|
$(objpfx)sysd-dirs: $(+sysdir_pfx)config.make
|
||||||
(echo define sysdep-subdirs; \
|
(echo define sysdep-subdirs; \
|
||||||
for dir in $(sysdirs); do \
|
for sysdir in $(config-sysdirs); do \
|
||||||
if [ -r $(sysdep_dir)/$$dir/Subdirs ]; then \
|
case $$sysdir in \
|
||||||
sed 's/#.*$$//' $(sysdep_dir)/$$dir/Subdirs; \
|
/*) dir=$$sysdir ;; \
|
||||||
|
*) dir=$(..)$$sysdir ;; \
|
||||||
|
esac; \
|
||||||
|
if [ -r $$dir/Subdirs ]; then \
|
||||||
|
sed 's/#.*$$//' $$dir/Subdirs; \
|
||||||
else true; \
|
else true; \
|
||||||
fi; \
|
fi; \
|
||||||
done; \
|
done; \
|
||||||
|
|
45
Makerules
45
Makerules
|
@ -56,13 +56,13 @@ include $(..)Makeconfig
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# `configure' writes a definition of `config-sysdirs' in `config.make'.
|
# `configure' writes a definition of `config-sysdirs' in `config.make'.
|
||||||
sysdirs = $(config-sysdirs)
|
sysdirs = $(strip $(full-config-sysdirs))
|
||||||
|
|
||||||
+sysdir_pfx = $(common-objpfx)
|
+sysdir_pfx = $(common-objpfx)
|
||||||
|
|
||||||
export sysdirs := $(sysdirs)
|
export sysdirs := $(sysdirs)
|
||||||
|
|
||||||
+sysdep_dirs := $(addprefix $(sysdep_dir)/,$(sysdirs))
|
+sysdep_dirs := $(full-config-sysdirs)
|
||||||
ifdef objdir
|
ifdef objdir
|
||||||
+sysdep_dirs := $(objdir) $(+sysdep_dirs)
|
+sysdep_dirs := $(objdir) $(+sysdep_dirs)
|
||||||
endif
|
endif
|
||||||
|
@ -86,8 +86,7 @@ endif
|
||||||
# appropriate and not worry about where foo.h comes from, which may be
|
# appropriate and not worry about where foo.h comes from, which may be
|
||||||
# system dependent and not known by that Makefile.
|
# system dependent and not known by that Makefile.
|
||||||
vpath %.h $(subst $(empty) ,:,$(strip $(common-objpfx) $(objpfx) \
|
vpath %.h $(subst $(empty) ,:,$(strip $(common-objpfx) $(objpfx) \
|
||||||
$(addprefix $(sysdep_dir)/,$(sysdirs)) \
|
$(+sysdep_dirs) $(..)))
|
||||||
$(..)))
|
|
||||||
|
|
||||||
# Some sysdep makefiles use this to distinguish being included here from
|
# Some sysdep makefiles use this to distinguish being included here from
|
||||||
# being included individually by a subdir makefile (hurd/Makefile needs this).
|
# being included individually by a subdir makefile (hurd/Makefile needs this).
|
||||||
|
@ -95,18 +94,21 @@ in-Makerules := yes
|
||||||
|
|
||||||
ifndef avoid-generated
|
ifndef avoid-generated
|
||||||
-include $(+sysdir_pfx)sysd-Makefile
|
-include $(+sysdir_pfx)sysd-Makefile
|
||||||
ifneq ($(sysd-Makefile-sysdirs),$(sysdirs))
|
ifneq ($(sysd-Makefile-sysdirs),$(config-sysdirs))
|
||||||
sysd-Makefile-force = FORCE
|
sysd-Makefile-force = FORCE
|
||||||
FORCE:
|
FORCE:
|
||||||
endif
|
endif
|
||||||
$(+sysdir_pfx)sysd-Makefile: $(+sysdir_pfx)config.make $(..)Makerules \
|
$(+sysdir_pfx)sysd-Makefile: $(+sysdir_pfx)config.make $(..)Makerules \
|
||||||
$(sysd-Makefile-force)
|
$(sysd-Makefile-force)
|
||||||
-@rm -f $@T
|
-@rm -f $@T
|
||||||
(echo 'sysd-Makefile-sysdirs := $(sysdirs)'; \
|
(echo 'sysd-Makefile-sysdirs := $(config-sysdirs)'; \
|
||||||
for dir in $(sysdirs); do \
|
for dir in $(config-sysdirs); do \
|
||||||
file=sysdeps/$$dir/Makefile; \
|
file=$$dir/Makefile; \
|
||||||
if [ -f $(..)$$file ]; then \
|
if [ -f $$file ]; then \
|
||||||
echo include "\$$(..)$$file"; \
|
case $$dir in \
|
||||||
|
/*) echo include "$$file" ;; \
|
||||||
|
*) echo include "\$$(..)$$file" ;; \
|
||||||
|
esac; \
|
||||||
else true; fi; \
|
else true; fi; \
|
||||||
done; \
|
done; \
|
||||||
echo 'sysd-Makefile-done=t') > $@T
|
echo 'sysd-Makefile-done=t') > $@T
|
||||||
|
@ -213,8 +215,8 @@ endif
|
||||||
# contents of sysd-rules.
|
# contents of sysd-rules.
|
||||||
ifdef sysd-Makefile-done
|
ifdef sysd-Makefile-done
|
||||||
-include $(+sysdir_pfx)sysd-rules
|
-include $(+sysdir_pfx)sysd-rules
|
||||||
ifneq ($(sysd-rules-sysdirs),$(sysdirs))
|
ifneq ($(sysd-rules-sysdirs),$(config-sysdirs))
|
||||||
# The value of $(sysdirs) the sysd-rules was computed for
|
# The value of $(+sysdep_dirs) the sysd-rules was computed for
|
||||||
# differs from the one we are using now. So force a rebuild of sysd-rules.
|
# differs from the one we are using now. So force a rebuild of sysd-rules.
|
||||||
sysd-rules-force = FORCE
|
sysd-rules-force = FORCE
|
||||||
FORCE:
|
FORCE:
|
||||||
|
@ -222,12 +224,15 @@ endif
|
||||||
endif
|
endif
|
||||||
$(+sysdir_pfx)sysd-rules: $(+sysdir_pfx)config.make $(..)Makerules \
|
$(+sysdir_pfx)sysd-rules: $(+sysdir_pfx)config.make $(..)Makerules \
|
||||||
$(wildcard $(foreach dir,$(sysdirs),\
|
$(wildcard $(foreach dir,$(sysdirs),\
|
||||||
$(sysdep_dir)/$(dir)/Makefile))\
|
$(dir)/Makefile))\
|
||||||
$(sysd-rules-force)
|
$(sysd-rules-force)
|
||||||
-@rm -f $@T
|
-@rm -f $@T
|
||||||
(echo 'sysd-rules-sysdirs := $(sysdirs)'; \
|
(echo 'sysd-rules-sysdirs := $(config-sysdirs)'; \
|
||||||
for sysdir in $(sysdirs); do \
|
for sysdir in $(config-sysdirs); do \
|
||||||
dir="\$$(sysdep_dir)/$$sysdir"; \
|
case $$sysdir in \
|
||||||
|
/*) dir=$$sysdir ;; \
|
||||||
|
*) dir="\$$(..)$$sysdir" ;; \
|
||||||
|
esac; \
|
||||||
for o in $(object-suffixes); do \
|
for o in $(object-suffixes); do \
|
||||||
$(open-check-inhibit-asm) \
|
$(open-check-inhibit-asm) \
|
||||||
echo "\$$(objpfx)%$$o: $$dir/%.S \$$(before-compile); \
|
echo "\$$(objpfx)%$$o: $$dir/%.S \$$(before-compile); \
|
||||||
|
@ -596,10 +601,10 @@ $(slibdir)/libc-$(version).so: $(common-objpfx)libc.so; $(do-install-program)
|
||||||
install: $(slibdir)/libc.so$(libc.so-version)
|
install: $(slibdir)/libc.so$(libc.so-version)
|
||||||
|
|
||||||
ifndef subdir
|
ifndef subdir
|
||||||
# What we install as libc.so for programs to link against is in fact an
|
# What we install as libc.so for programs to link against is in fact a
|
||||||
# archive. It contains the various $(static-only-routines) objects, and
|
# link script. It contains references for the various libraries we need.
|
||||||
# the special object libc-syms.so that contains just the dynamic symbol
|
# The libc.so object is not complete since some functions are only defined
|
||||||
# table of the shared libc object.
|
# in libc.a and the dynamic linker is an etra object.
|
||||||
install: $(libdir)/libc.so
|
install: $(libdir)/libc.so
|
||||||
$(libdir)/libc.so: $(common-objpfx)libc.so$(libc.so-version) \
|
$(libdir)/libc.so: $(common-objpfx)libc.so$(libc.so-version) \
|
||||||
$(elfobjdir)/$(rtld-installed-name) \
|
$(elfobjdir)/$(rtld-installed-name) \
|
||||||
|
|
4
Rules
4
Rules
|
@ -107,13 +107,14 @@ $(objpfx)%.out: /dev/null $(objpfx)% # Make it 2nd arg for canned sequence.
|
||||||
endif # tests
|
endif # tests
|
||||||
|
|
||||||
.PHONY: distclean realclean subdir_distclean subdir_realclean \
|
.PHONY: distclean realclean subdir_distclean subdir_realclean \
|
||||||
subdir_clean subdir_mostlyclean
|
subdir_clean subdir_mostlyclean extra_solibs
|
||||||
subdir_mostlyclean: mostlyclean
|
subdir_mostlyclean: mostlyclean
|
||||||
subdir_clean: clean
|
subdir_clean: clean
|
||||||
subdir_distclean: distclean
|
subdir_distclean: distclean
|
||||||
subdir_realclean: realclean
|
subdir_realclean: realclean
|
||||||
realclean: distclean
|
realclean: distclean
|
||||||
distclean: clean
|
distclean: clean
|
||||||
|
extra_solibs:
|
||||||
|
|
||||||
.PHONY: subdir_echo-headers
|
.PHONY: subdir_echo-headers
|
||||||
subdir_echo-headers: echo-headers
|
subdir_echo-headers: echo-headers
|
||||||
|
@ -135,7 +136,6 @@ subdir_dist: dist
|
||||||
|
|
||||||
# Convenient target to update all the generated source files.
|
# Convenient target to update all the generated source files.
|
||||||
.PHONY: generated
|
.PHONY: generated
|
||||||
generated: $(addprefix $(objpfx),$(generated))
|
|
||||||
generated: $(addprefix $(common-objpfx),$(common-generated))
|
generated: $(addprefix $(common-objpfx),$(common-generated))
|
||||||
|
|
||||||
ifndef libc.so-version
|
ifndef libc.so-version
|
||||||
|
|
121
configure
vendored
121
configure
vendored
|
@ -689,6 +689,12 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
|
||||||
|
|
||||||
subdirs="$add_ons"
|
subdirs="$add_ons"
|
||||||
|
|
||||||
|
add_ons_pfx=
|
||||||
|
if test x$add_ons != x; then
|
||||||
|
for f in $add_ons; do
|
||||||
|
add_ons_pfx="$add_ons_pfx $f/"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Make sure we can run config.sub.
|
# Make sure we can run config.sub.
|
||||||
|
@ -819,23 +825,34 @@ done
|
||||||
|
|
||||||
# Find what sysdep directories exist.
|
# Find what sysdep directories exist.
|
||||||
sysnames=
|
sysnames=
|
||||||
for b in $base ''; do
|
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
||||||
for m0 in $mach ''; do
|
for d in $add_ons_pfx ''; do
|
||||||
for v in /$vendor ''; do
|
for b in $base ''; do
|
||||||
for o in /$ostry ''; do
|
for m0 in $mach ''; do
|
||||||
for m in $mach ''; do
|
for v in /$vendor ''; do
|
||||||
try="$m0$b$v$o$m"
|
for o in /$ostry ''; do
|
||||||
test -n "$enable_debug_configure" && echo "$0 DEBUG: try $try" >&2
|
for m in $mach ''; do
|
||||||
if test -d $sysdep_dir$try; then
|
if test "$m0$b$v$o$m"; then
|
||||||
sysnames="$sysnames $try"
|
try="${d}sysdeps$m0$b$v$o$m"
|
||||||
{ test -n "$o" || test -n "$b"; } && os_used=t
|
test -n "$enable_debug_configure" &&
|
||||||
{ test -n "$m" || test -n "$m0"; } && machine_used=t
|
echo "$0 DEBUG: try $try" >&2
|
||||||
fi
|
case $try in
|
||||||
|
/*) dest=$try ;;
|
||||||
|
*) dest=$srcdir/$try ;;
|
||||||
|
esac
|
||||||
|
if test -d $dest; then
|
||||||
|
sysnames="$sysnames $try"
|
||||||
|
{ test -n "$o" || test -n "$b"; } && os_used=t
|
||||||
|
{ test -n "$m" || test -n "$m0"; } && machine_used=t
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
IFS="$ac_save_ifs"
|
||||||
|
|
||||||
if test -z "$os_used" && test "$os" != none; then
|
if test -z "$os_used" && test "$os" != none; then
|
||||||
{ echo "configure: error: Operating system $os is not supported." 1>&2; exit 1; }
|
{ echo "configure: error: Operating system $os is not supported." 1>&2; exit 1; }
|
||||||
|
@ -854,12 +871,18 @@ fi
|
||||||
# machine (otherwise what's the point of an ABI?).
|
# machine (otherwise what's the point of an ABI?).
|
||||||
if test "$elf" = yes; then
|
if test "$elf" = yes; then
|
||||||
elf_dirs=
|
elf_dirs=
|
||||||
for m in $mach; do
|
for d in $add_ons_pfx ''; do
|
||||||
if test -d $sysdep_dir$m/elf; then
|
case $d in
|
||||||
elf_dirs="$elf_dirs $m/elf"
|
/*) xsrcdir= ;;
|
||||||
fi
|
*) xsrcdir=$srcdir/ ;;
|
||||||
|
esac
|
||||||
|
for m in $mach; do
|
||||||
|
if test -d $xsrcdir${d}sysdeps$m/elf; then
|
||||||
|
elf_dirs="$elf_dirs $d$m/elf"
|
||||||
|
fi
|
||||||
|
done
|
||||||
done
|
done
|
||||||
sysnames="`echo $elf_dirs | sed -e 's,^/,,' -e 's, /,,g'` $sysnames"
|
sysnames="`echo $elf_dirs | sed -e 's,//,/,g'` $sysnames"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
@ -883,13 +906,25 @@ while test $# -gt 0; do
|
||||||
# Report each name as we discover it, so there is no long pause in output.
|
# Report each name as we discover it, so there is no long pause in output.
|
||||||
echo $ac_n "$name $ac_c" >&6
|
echo $ac_n "$name $ac_c" >&6
|
||||||
|
|
||||||
if test -f $sysdep_dir/$name/Implies; then
|
name_base=`echo $name | sed -e 's@\(.*sysdeps\)/.*@\1@'`
|
||||||
|
|
||||||
|
case $name in
|
||||||
|
/*) xsrcdir= ;;
|
||||||
|
*) xsrcdir=$srcdir/ ;;
|
||||||
|
esac
|
||||||
|
test -n "$enable_debug_configure" &&
|
||||||
|
echo "DEBUG: name/Implies $xsrcdir$name/Implies" >&2
|
||||||
|
|
||||||
|
if test -f $xsrcdir$name/Implies; then
|
||||||
# Collect more names from the `Implies' file (removing comments).
|
# Collect more names from the `Implies' file (removing comments).
|
||||||
implied="`sed 's/#.*$//' < $sysdep_dir/$name/Implies`"
|
implied_candidate="`sed 's/#.*$//' < $xsrcdir$name/Implies`"
|
||||||
for x in $implied; do
|
implied=
|
||||||
test -d $sysdep_dir/$x || {
|
for x in $implied_candidate; do
|
||||||
echo "configure: warning: sysdeps/$name/Implies specifies nonexistent $x" 1>&2
|
if test -d $xsrcdir$name_base/$x; then
|
||||||
}
|
implied="$implied $name_base/$x";
|
||||||
|
else
|
||||||
|
echo "configure: warning: $name/Implies specifies nonexistent $x" 1>&2
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
implied=
|
implied=
|
||||||
|
@ -899,7 +934,7 @@ while test $# -gt 0; do
|
||||||
names="$names $name"
|
names="$names $name"
|
||||||
|
|
||||||
# Find the parent of NAME, using the empty string if it has none.
|
# Find the parent of NAME, using the empty string if it has none.
|
||||||
parent="`echo $name | sed -n -e '/\//!q' -e 's=/[^/]*$==p'`"
|
parent="`echo $name | sed -n -e 's=/[^/]*$==' -e '/sysdeps$/q' -e p`"
|
||||||
|
|
||||||
# Add the names implied by NAME, and NAME's parent (if it has one), to
|
# Add the names implied by NAME, and NAME's parent (if it has one), to
|
||||||
# the list of names to be processed (the argument list). We prepend the
|
# the list of names to be processed (the argument list). We prepend the
|
||||||
|
@ -913,10 +948,10 @@ while test $# -gt 0; do
|
||||||
done
|
done
|
||||||
|
|
||||||
# Add the default directories.
|
# Add the default directories.
|
||||||
sysnames="$names generic stub"
|
sysnames="$names sysdeps/generic sysdeps/stub"
|
||||||
|
|
||||||
# The other names were emitted during the scan.
|
# The other names were emitted during the scan.
|
||||||
echo "$ac_t""generic stub" 1>&6
|
echo "$ac_t""sysdeps/generic sysdeps/stub" 1>&6
|
||||||
|
|
||||||
|
|
||||||
### Locate tools.
|
### Locate tools.
|
||||||
|
@ -1139,13 +1174,13 @@ else
|
||||||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||||
# not just through cpp.
|
# not just through cpp.
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1143 "configure"
|
#line 1178 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
Syntax Error
|
Syntax Error
|
||||||
EOF
|
EOF
|
||||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||||
{ (eval echo configure:1149: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
{ (eval echo configure:1184: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||||
ac_err=`grep -v '^ *+' conftest.out`
|
ac_err=`grep -v '^ *+' conftest.out`
|
||||||
if test -z "$ac_err"; then
|
if test -z "$ac_err"; then
|
||||||
:
|
:
|
||||||
|
@ -1154,13 +1189,13 @@ else
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
CPP="${CC-cc} -E -traditional-cpp"
|
CPP="${CC-cc} -E -traditional-cpp"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1158 "configure"
|
#line 1193 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
Syntax Error
|
Syntax Error
|
||||||
EOF
|
EOF
|
||||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||||
{ (eval echo configure:1164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
{ (eval echo configure:1199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||||
ac_err=`grep -v '^ *+' conftest.out`
|
ac_err=`grep -v '^ *+' conftest.out`
|
||||||
if test -z "$ac_err"; then
|
if test -z "$ac_err"; then
|
||||||
:
|
:
|
||||||
|
@ -1302,7 +1337,7 @@ if eval "test \"`echo '$''{'libc_cv_friendly_stddef'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1306 "configure"
|
#line 1341 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#define __need_size_t
|
#define __need_size_t
|
||||||
#define __need_wchar_t
|
#define __need_wchar_t
|
||||||
|
@ -1318,7 +1353,7 @@ size_t size; wchar_t wchar;
|
||||||
if (&size == NULL || &wchar == NULL) abort ();
|
if (&size == NULL || &wchar == NULL) abort ();
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
if { (eval echo configure:1357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
libc_cv_friendly_stddef=yes
|
libc_cv_friendly_stddef=yes
|
||||||
else
|
else
|
||||||
|
@ -1425,7 +1460,7 @@ if eval "test \"`echo '$''{'libc_cv_have_initfini'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1429 "configure"
|
#line 1464 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
int main() { return 0; }
|
int main() { return 0; }
|
||||||
|
@ -1435,7 +1470,7 @@ asm (".section .init");
|
||||||
asm (".text");
|
asm (".text");
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1439: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
if { (eval echo configure:1474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
libc_cv_have_initfini=yes
|
libc_cv_have_initfini=yes
|
||||||
else
|
else
|
||||||
|
@ -1463,7 +1498,7 @@ if eval "test \"`echo '$''{'libc_cv_asm_underscores'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1467 "configure"
|
#line 1502 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
asm ("_glibc_foobar:");
|
asm ("_glibc_foobar:");
|
||||||
int main() { return 0; }
|
int main() { return 0; }
|
||||||
|
@ -1471,7 +1506,7 @@ int t() {
|
||||||
glibc_foobar ();
|
glibc_foobar ();
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
if { (eval echo configure:1510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
libc_cv_asm_underscores=yes
|
libc_cv_asm_underscores=yes
|
||||||
else
|
else
|
||||||
|
@ -1565,7 +1600,7 @@ __throw () {}
|
||||||
EOF
|
EOF
|
||||||
if { ac_try='${CC-cc} $CFLAGS
|
if { ac_try='${CC-cc} $CFLAGS
|
||||||
-nostdlib -nostartfiles -Wl,--no-whole-archive
|
-nostdlib -nostartfiles -Wl,--no-whole-archive
|
||||||
-o conftest conftest.c'; { (eval echo configure:1569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
-o conftest conftest.c'; { (eval echo configure:1604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||||
libc_cv_ld_no_whole_archive=yes
|
libc_cv_ld_no_whole_archive=yes
|
||||||
else
|
else
|
||||||
libc_cv_ld_no_whole_archive=no
|
libc_cv_ld_no_whole_archive=no
|
||||||
|
@ -1586,7 +1621,7 @@ __throw () {}
|
||||||
EOF
|
EOF
|
||||||
if { ac_try='${CC-cc} $CFLAGS
|
if { ac_try='${CC-cc} $CFLAGS
|
||||||
-nostdlib -nostartfiles -fno-exceptions
|
-nostdlib -nostartfiles -fno-exceptions
|
||||||
-o conftest conftest.c'; { (eval echo configure:1590: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
-o conftest conftest.c'; { (eval echo configure:1625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||||
libc_cv_gcc_no_exceptions=yes
|
libc_cv_gcc_no_exceptions=yes
|
||||||
else
|
else
|
||||||
libc_cv_gcc_no_exceptions=no
|
libc_cv_gcc_no_exceptions=no
|
||||||
|
@ -1607,9 +1642,13 @@ libc_link_sources=
|
||||||
# configure fragments, and looking for a uname implementation.
|
# configure fragments, and looking for a uname implementation.
|
||||||
uname=
|
uname=
|
||||||
for dir in $sysnames; do
|
for dir in $sysnames; do
|
||||||
if test -r $sysdep_dir/$dir/configure; then
|
case $dir in
|
||||||
echo "$ac_t""running configure fragment for $dir" 1>&6
|
/*) dest=$dir ;;
|
||||||
. $sysdep_dir/$dir/configure
|
*) dest=$srcdir/$dir ;;
|
||||||
|
esac
|
||||||
|
if test -r $dest/configure; then
|
||||||
|
echo "$ac_t""running configure fragment for $dest" 1>&6
|
||||||
|
. $dest/configure
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -z "$uname"; then
|
if test -z "$uname"; then
|
||||||
|
|
97
configure.in
97
configure.in
|
@ -77,6 +77,12 @@ AC_ARG_ENABLE(add-ons, dnl
|
||||||
[add_ons=`echo "$enableval" | sed 's/,/ /g'`],
|
[add_ons=`echo "$enableval" | sed 's/,/ /g'`],
|
||||||
[add_ons=])
|
[add_ons=])
|
||||||
AC_CONFIG_SUBDIRS($add_ons)
|
AC_CONFIG_SUBDIRS($add_ons)
|
||||||
|
add_ons_pfx=
|
||||||
|
if test x$add_ons != x; then
|
||||||
|
for f in $add_ons; do
|
||||||
|
add_ons_pfx="$add_ons_pfx $f/"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
AC_CANONICAL_HOST
|
AC_CANONICAL_HOST
|
||||||
# We keep the original values in `$config_*' and never modify them, so we
|
# We keep the original values in `$config_*' and never modify them, so we
|
||||||
|
@ -189,23 +195,34 @@ changequote([,])dnl
|
||||||
|
|
||||||
# Find what sysdep directories exist.
|
# Find what sysdep directories exist.
|
||||||
sysnames=
|
sysnames=
|
||||||
for b in $base ''; do
|
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
||||||
for m0 in $mach ''; do
|
for d in $add_ons_pfx ''; do
|
||||||
for v in /$vendor ''; do
|
for b in $base ''; do
|
||||||
for o in /$ostry ''; do
|
for m0 in $mach ''; do
|
||||||
for m in $mach ''; do
|
for v in /$vendor ''; do
|
||||||
try="$m0$b$v$o$m"
|
for o in /$ostry ''; do
|
||||||
test -n "$enable_debug_configure" && echo "$0 [DEBUG]: try $try" >&2
|
for m in $mach ''; do
|
||||||
if test -d $sysdep_dir$try; then
|
if test "$m0$b$v$o$m"; then
|
||||||
sysnames="$sysnames $try"
|
try="${d}sysdeps$m0$b$v$o$m"
|
||||||
{ test -n "$o" || test -n "$b"; } && os_used=t
|
test -n "$enable_debug_configure" &&
|
||||||
{ test -n "$m" || test -n "$m0"; } && machine_used=t
|
echo "$0 [DEBUG]: try $try" >&2
|
||||||
fi
|
case $try in
|
||||||
|
/*) dest=$try ;;
|
||||||
|
*) dest=$srcdir/$try ;;
|
||||||
|
esac
|
||||||
|
if test -d $dest; then
|
||||||
|
sysnames="$sysnames $try"
|
||||||
|
{ test -n "$o" || test -n "$b"; } && os_used=t
|
||||||
|
{ test -n "$m" || test -n "$m0"; } && machine_used=t
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
IFS="$ac_save_ifs"
|
||||||
|
|
||||||
if test -z "$os_used" && test "$os" != none; then
|
if test -z "$os_used" && test "$os" != none; then
|
||||||
AC_MSG_ERROR(Operating system $os is not supported.)
|
AC_MSG_ERROR(Operating system $os is not supported.)
|
||||||
|
@ -224,12 +241,18 @@ fi
|
||||||
# machine (otherwise what's the point of an ABI?).
|
# machine (otherwise what's the point of an ABI?).
|
||||||
if test "$elf" = yes; then
|
if test "$elf" = yes; then
|
||||||
elf_dirs=
|
elf_dirs=
|
||||||
for m in $mach; do
|
for d in $add_ons_pfx ''; do
|
||||||
if test -d $sysdep_dir$m/elf; then
|
case $d in
|
||||||
elf_dirs="$elf_dirs $m/elf"
|
/*) xsrcdir= ;;
|
||||||
fi
|
*) xsrcdir=$srcdir/ ;;
|
||||||
|
esac
|
||||||
|
for m in $mach; do
|
||||||
|
if test -d $xsrcdir${d}sysdeps$m/elf; then
|
||||||
|
elf_dirs="$elf_dirs $d$m/elf"
|
||||||
|
fi
|
||||||
|
done
|
||||||
done
|
done
|
||||||
sysnames="`echo $elf_dirs | sed -e 's,^/,,' -e 's, /,,g'` $sysnames"
|
sysnames="`echo $elf_dirs | sed -e 's,//,/,g'` $sysnames"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
@ -253,13 +276,25 @@ while test $# -gt 0; do
|
||||||
# Report each name as we discover it, so there is no long pause in output.
|
# Report each name as we discover it, so there is no long pause in output.
|
||||||
echo $ac_n "$name $ac_c" >&AC_FD_MSG
|
echo $ac_n "$name $ac_c" >&AC_FD_MSG
|
||||||
|
|
||||||
if test -f $sysdep_dir/$name/Implies; then
|
name_base=`echo $name | sed -e 's@\(.*sysdeps\)/.*@\1@'`
|
||||||
|
|
||||||
|
case $name in
|
||||||
|
/*) xsrcdir= ;;
|
||||||
|
*) xsrcdir=$srcdir/ ;;
|
||||||
|
esac
|
||||||
|
test -n "$enable_debug_configure" &&
|
||||||
|
echo "[DEBUG]: name/Implies $xsrcdir$name/Implies" >&2
|
||||||
|
|
||||||
|
if test -f $xsrcdir$name/Implies; then
|
||||||
# Collect more names from the `Implies' file (removing comments).
|
# Collect more names from the `Implies' file (removing comments).
|
||||||
implied="`sed 's/#.*$//' < $sysdep_dir/$name/Implies`"
|
implied_candidate="`sed 's/#.*$//' < $xsrcdir$name/Implies`"
|
||||||
for x in $implied; do
|
implied=
|
||||||
test -d $sysdep_dir/$x || {
|
for x in $implied_candidate; do
|
||||||
AC_MSG_WARN(sysdeps/$name/Implies specifies nonexistent $x)
|
if test -d $xsrcdir$name_base/$x; then
|
||||||
}
|
implied="$implied $name_base/$x";
|
||||||
|
else
|
||||||
|
AC_MSG_WARN($name/Implies specifies nonexistent $x)
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
implied=
|
implied=
|
||||||
|
@ -270,7 +305,7 @@ while test $# -gt 0; do
|
||||||
|
|
||||||
# Find the parent of NAME, using the empty string if it has none.
|
# Find the parent of NAME, using the empty string if it has none.
|
||||||
changequote(,)dnl
|
changequote(,)dnl
|
||||||
parent="`echo $name | sed -n -e '/\//!q' -e 's=/[^/]*$==p'`"
|
parent="`echo $name | sed -n -e 's=/[^/]*$==' -e '/sysdeps$/q' -e p`"
|
||||||
changequote([,])dnl
|
changequote([,])dnl
|
||||||
|
|
||||||
# Add the names implied by NAME, and NAME's parent (if it has one), to
|
# Add the names implied by NAME, and NAME's parent (if it has one), to
|
||||||
|
@ -285,10 +320,10 @@ changequote([,])dnl
|
||||||
done
|
done
|
||||||
|
|
||||||
# Add the default directories.
|
# Add the default directories.
|
||||||
sysnames="$names generic stub"
|
sysnames="$names sysdeps/generic sysdeps/stub"
|
||||||
AC_SUBST(sysnames)
|
AC_SUBST(sysnames)
|
||||||
# The other names were emitted during the scan.
|
# The other names were emitted during the scan.
|
||||||
AC_MSG_RESULT(generic stub)
|
AC_MSG_RESULT(sysdeps/generic sysdeps/stub)
|
||||||
|
|
||||||
|
|
||||||
### Locate tools.
|
### Locate tools.
|
||||||
|
@ -525,9 +560,13 @@ libc_link_sources=
|
||||||
# configure fragments, and looking for a uname implementation.
|
# configure fragments, and looking for a uname implementation.
|
||||||
uname=
|
uname=
|
||||||
for dir in $sysnames; do
|
for dir in $sysnames; do
|
||||||
if test -r $sysdep_dir/$dir/configure; then
|
case $dir in
|
||||||
AC_MSG_RESULT(running configure fragment for $dir)
|
/*) dest=$dir ;;
|
||||||
. $sysdep_dir/$dir/configure
|
*) dest=$srcdir/$dir ;;
|
||||||
|
esac
|
||||||
|
if test -r $dest/configure; then
|
||||||
|
AC_MSG_RESULT(running configure fragment for $dest)
|
||||||
|
. $dest/configure
|
||||||
fi
|
fi
|
||||||
[
|
[
|
||||||
if test -z "$uname"; then
|
if test -z "$uname"; then
|
||||||
|
|
|
@ -40,6 +40,15 @@ void __gmon_start__ (void) __attribute__ ((constructor));
|
||||||
void
|
void
|
||||||
__gmon_start__ (void)
|
__gmon_start__ (void)
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_INITFINI
|
||||||
|
/* Protect from being called more than once. Since crti.o is linked
|
||||||
|
into every shared library, each of their init functions will call us. */
|
||||||
|
static int called;
|
||||||
|
|
||||||
|
if (called++)
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Start keeping profiling records. */
|
/* Start keeping profiling records. */
|
||||||
monstartup ((u_long) &_start, (u_long) &etext);
|
monstartup ((u_long) &_start, (u_long) &etext);
|
||||||
|
|
||||||
|
@ -47,4 +56,3 @@ __gmon_start__ (void)
|
||||||
collected data. */
|
collected data. */
|
||||||
atexit (&_mcleanup);
|
atexit (&_mcleanup);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,4 +39,4 @@ CFLAGS-hash_func.c := -Wno-unused
|
||||||
# The db code outsmarts the compiler frequently.
|
# The db code outsmarts the compiler frequently.
|
||||||
override CFLAGS += -Wno-uninitialized
|
override CFLAGS += -Wno-uninitialized
|
||||||
|
|
||||||
$(objpfx)makedb: -ldb
|
LDLIBS-makedb := db/libdb
|
||||||
|
|
|
@ -99,7 +99,8 @@ _dl_close (struct link_map *map)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Finally, unlink the data structure and free it. */
|
/* Finally, unlink the data structure and free it. */
|
||||||
map->l_prev->l_next = map->l_next;
|
if (map->l_prev)
|
||||||
|
map->l_prev->l_next = map->l_next;
|
||||||
if (map->l_next)
|
if (map->l_next)
|
||||||
map->l_next->l_prev = map->l_prev;
|
map->l_next->l_prev = map->l_prev;
|
||||||
if (map->l_searchlist)
|
if (map->l_searchlist)
|
||||||
|
|
|
@ -29,8 +29,8 @@ extern int __libc_multiple_libcs; /* Defined in init-first.c. */
|
||||||
|
|
||||||
extern int __libc_argc;
|
extern int __libc_argc;
|
||||||
extern char **__libc_argv;
|
extern char **__libc_argv;
|
||||||
extern char **__libc_envp;
|
|
||||||
|
|
||||||
|
extern char **__environ;
|
||||||
|
|
||||||
size_t _dl_global_scope_alloc;
|
size_t _dl_global_scope_alloc;
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ _dl_open (const char *file, int mode)
|
||||||
/* Run the initializer functions of new objects. */
|
/* Run the initializer functions of new objects. */
|
||||||
while (init = _dl_init_next (new))
|
while (init = _dl_init_next (new))
|
||||||
(*(void (*) (int, char **, char **)) init) (__libc_argc, __libc_argv,
|
(*(void (*) (int, char **, char **)) init) (__libc_argc, __libc_argv,
|
||||||
__libc_envp);
|
__environ);
|
||||||
|
|
||||||
if (dl_start_ptr == NULL)
|
if (dl_start_ptr == NULL)
|
||||||
/* We must be the static _dl_open in libc.a because ld.so.1 is not
|
/* We must be the static _dl_open in libc.a because ld.so.1 is not
|
||||||
|
|
|
@ -28,7 +28,7 @@ alltypes-$(lib) := $(foreach o,$(object-suffixes-$(lib)),\
|
||||||
ifeq (,$(filter $(lib),$(extra-libs-others)))
|
ifeq (,$(filter $(lib),$(extra-libs-others)))
|
||||||
lib-noranlib: $(alltypes-$(lib))
|
lib-noranlib: $(alltypes-$(lib))
|
||||||
ifeq (yes,$(build-shared))
|
ifeq (yes,$(build-shared))
|
||||||
lib-noranlib: $(objpfx)$(lib).so$($(lib).so-version)
|
extra_solibs: $(objpfx)$(lib).so$($(lib).so-version)
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
others: $(alltypes-$(lib))
|
others: $(alltypes-$(lib))
|
||||||
|
@ -37,7 +37,7 @@ endif
|
||||||
# The linked shared library is never a dependent of lib-noranlib,
|
# The linked shared library is never a dependent of lib-noranlib,
|
||||||
# because linking it will depend on libc.so already being built.
|
# because linking it will depend on libc.so already being built.
|
||||||
ifneq (,$(filter .so,$(object-suffixes-$(lib))))
|
ifneq (,$(filter .so,$(object-suffixes-$(lib))))
|
||||||
others: $(objpfx)$(lib).so
|
extra_solibs: $(objpfx)$(lib).so
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -369,7 +369,7 @@ _nl_normalize_codeset (codeset, name_len)
|
||||||
if (retval != NULL)
|
if (retval != NULL)
|
||||||
{
|
{
|
||||||
if (only_digit)
|
if (only_digit)
|
||||||
wp = stpcpy (retval, "ISO");
|
wp = stpcpy (retval, "iso");
|
||||||
else
|
else
|
||||||
wp = retval;
|
wp = retval;
|
||||||
|
|
||||||
|
|
|
@ -155,7 +155,7 @@ subdir_%: ;
|
||||||
# ../Rules defines them for code subdirectories; for us, they are no-ops.
|
# ../Rules defines them for code subdirectories; for us, they are no-ops.
|
||||||
# None of these should be `subdir_TARGET'; those targets are transformed
|
# None of these should be `subdir_TARGET'; those targets are transformed
|
||||||
# by the implicit rule above into `TARGET' deps.
|
# by the implicit rule above into `TARGET' deps.
|
||||||
glibc-targets := lib objects objs others tests lint.out \
|
glibc-targets := lib extra_solibs objects objs others tests lint.out \
|
||||||
echo-headers echo-distinfo stubs
|
echo-headers echo-distinfo stubs
|
||||||
.PHONY: $(glibc-targets)
|
.PHONY: $(glibc-targets)
|
||||||
$(glibc-targets):
|
$(glibc-targets):
|
||||||
|
|
|
@ -159,7 +159,7 @@ on the lookup process. Action items are placed between two service
|
||||||
names and are written within brackets. The general form is
|
names and are written within brackets. The general form is
|
||||||
|
|
||||||
@display
|
@display
|
||||||
@t{[} ( @t{!}? @var{status} @t{=} @var{action} )+ @t{]}
|
@code{[} ( @code{!}? @var{status} @code{=} @var{action} )+ @code{]}
|
||||||
@end display
|
@end display
|
||||||
|
|
||||||
@noindent
|
@noindent
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 1991, 1992, 1993, 1995 Free Software Foundation, Inc.
|
/* Copyright (C) 1991, 92, 93, 95, 96 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
|
|
@ -186,13 +186,17 @@ _dl_runtime_resolve:
|
||||||
#define RTLD_START asm ("\
|
#define RTLD_START asm ("\
|
||||||
.text
|
.text
|
||||||
.globl _start
|
.globl _start
|
||||||
.globl _dl_start_user
|
.ent _start
|
||||||
_start:
|
_start:
|
||||||
br $gp,0f
|
br $gp, 0f
|
||||||
0: ldgp $gp, 0($gp)
|
0: ldgp $gp, 0($gp)
|
||||||
/* Pass pointer to argument block to _dl_start. */
|
/* Pass pointer to argument block to _dl_start. */
|
||||||
mov $sp, $16
|
mov $sp, $16
|
||||||
bsr $26, _dl_start..ng
|
bsr $26, _dl_start..ng
|
||||||
|
.end _start
|
||||||
|
/* FALLTHRU */
|
||||||
|
.globl _dl_start_user
|
||||||
|
.ent _dl_start_user
|
||||||
_dl_start_user:
|
_dl_start_user:
|
||||||
/* Save the user entry point address in s0. */
|
/* Save the user entry point address in s0. */
|
||||||
mov $0, $9
|
mov $0, $9
|
||||||
|
@ -225,7 +229,8 @@ _dl_start_user:
|
||||||
lda $0, _dl_fini
|
lda $0, _dl_fini
|
||||||
/* Jump to the user's entry point. */
|
/* Jump to the user's entry point. */
|
||||||
mov $9, $27
|
mov $9, $27
|
||||||
jmp ($9)");
|
jmp ($9)
|
||||||
|
.end _dl_start_user");
|
||||||
|
|
||||||
/* Nonzero iff TYPE describes relocation of a PLT entry, so
|
/* Nonzero iff TYPE describes relocation of a PLT entry, so
|
||||||
PLT entries should not be allowed to define the value. */
|
PLT entries should not be allowed to define the value. */
|
||||||
|
@ -377,8 +382,6 @@ elf_machine_rela (struct link_map *map,
|
||||||
sym_value += reloc->r_addend;
|
sym_value += reloc->r_addend;
|
||||||
*reloc_addr = sym_value;
|
*reloc_addr = sym_value;
|
||||||
}
|
}
|
||||||
else if (r_info == R_ALPHA_COPY)
|
|
||||||
memcpy (reloc_addr, (void *) sym_value, sym->st_size);
|
|
||||||
else
|
else
|
||||||
assert (! "unexpected dynamic reloc type");
|
assert (! "unexpected dynamic reloc type");
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,12 +20,9 @@ Cambridge, MA 02139, USA. */
|
||||||
#include <sysdep.h>
|
#include <sysdep.h>
|
||||||
|
|
||||||
.text
|
.text
|
||||||
.globl _start /* what ELF wants */
|
|
||||||
.globl __start /* for backwards (ECOFF) comatibility */
|
|
||||||
.align 3
|
.align 3
|
||||||
.ent __start, 0
|
.ent _start, 0
|
||||||
_start:
|
_start:
|
||||||
__start:
|
|
||||||
.frame fp, 0, zero
|
.frame fp, 0, zero
|
||||||
mov zero, fp
|
mov zero, fp
|
||||||
br gp, 1f
|
br gp, 1f
|
||||||
|
@ -62,7 +59,6 @@ __start:
|
||||||
mov a1, s1
|
mov a1, s1
|
||||||
mov a2, s2
|
mov a2, s2
|
||||||
|
|
||||||
#ifdef HAVE_INITFINI
|
|
||||||
/* Call _init, the entry point to our own .init section. */
|
/* Call _init, the entry point to our own .init section. */
|
||||||
jsr ra, _init
|
jsr ra, _init
|
||||||
ldgp gp, 0(ra)
|
ldgp gp, 0(ra)
|
||||||
|
@ -71,16 +67,12 @@ __start:
|
||||||
lda a0, _fini
|
lda a0, _fini
|
||||||
jsr ra, atexit
|
jsr ra, atexit
|
||||||
ldgp gp, 0(ra)
|
ldgp gp, 0(ra)
|
||||||
#else
|
|
||||||
/* initialize constructors: */
|
/* Call the user's main and exit with its return value. */
|
||||||
jsr ra, __main
|
|
||||||
ldgp gp, 0(ra)
|
|
||||||
#endif
|
|
||||||
mov s0, a0
|
mov s0, a0
|
||||||
mov s1, a1
|
mov s1, a1
|
||||||
mov s2, a2
|
mov s2, a2
|
||||||
|
|
||||||
/* Call the user's main and exit with its return value. */
|
|
||||||
jsr ra, main
|
jsr ra, main
|
||||||
ldgp gp, 0(ra)
|
ldgp gp, 0(ra)
|
||||||
|
|
||||||
|
@ -90,7 +82,10 @@ __start:
|
||||||
/* Die very horribly if exit returns. Call_pal hlt is callable from
|
/* Die very horribly if exit returns. Call_pal hlt is callable from
|
||||||
kernel mode only; this will result in an illegal instruction trap. */
|
kernel mode only; this will result in an illegal instruction trap. */
|
||||||
call_pal 0
|
call_pal 0
|
||||||
END(__start)
|
.end _start
|
||||||
|
|
||||||
|
/* For ECOFF backwards compatibility. */
|
||||||
|
weak_alias(_start, __start)
|
||||||
|
|
||||||
/* Define a symbol for the first piece of initialized data. */
|
/* Define a symbol for the first piece of initialized data. */
|
||||||
.data
|
.data
|
||||||
|
|
|
@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
|
||||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||||
Cambridge, MA 02139, USA. */
|
Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
#include <ansidecl.h>
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#ifndef FUNC
|
#ifndef FUNC
|
||||||
|
@ -29,7 +28,14 @@ Cambridge, MA 02139, USA. */
|
||||||
#define __CONCATX(a,b) __CONCAT(a,b)
|
#define __CONCATX(a,b) __CONCAT(a,b)
|
||||||
|
|
||||||
float_type
|
float_type
|
||||||
DEFUN(__CONCATX(__kernel_,FUNC), (x, y), float_type x AND float_type y)
|
__CONCATX(__kernel_,FUNC) (x, y)
|
||||||
|
float_type x;
|
||||||
|
float_type y;
|
||||||
{
|
{
|
||||||
return __CONCATX(__,FUNC) (x + y);
|
float_type sin_x, cos_x, sin_y, cos_y;
|
||||||
|
__asm__ __volatile__ ("fsincosx %2,%0:%1" : "=f" (cos_x), "=f" (sin_x)
|
||||||
|
: "f" (x));
|
||||||
|
__asm__ __volatile__ ("fsincosx %2,%0:%1" : "=f" (cos_y), "=f" (sin_y)
|
||||||
|
: "f" (y));
|
||||||
|
return cos_x * cos_y - sin_x * sin_y;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
|
||||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||||
Cambridge, MA 02139, USA. */
|
Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
#include <ansidecl.h>
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#ifndef FUNC
|
#ifndef FUNC
|
||||||
|
@ -29,8 +28,17 @@ Cambridge, MA 02139, USA. */
|
||||||
#define __CONCATX(a,b) __CONCAT(a,b)
|
#define __CONCATX(a,b) __CONCAT(a,b)
|
||||||
|
|
||||||
float_type
|
float_type
|
||||||
DEFUN(__CONCATX(__kernel_,FUNC), (x, y, iy),
|
__CONCATX(__kernel_,FUNC) (x, y, iy)
|
||||||
float_type x AND float_type y AND int iy)
|
float_type x;
|
||||||
|
float_type y;
|
||||||
|
int iy;
|
||||||
{
|
{
|
||||||
return __CONCATX(__,FUNC) (x + y);
|
float_type sin_x, cos_x, sin_y, cos_y;
|
||||||
|
if (iy == 0)
|
||||||
|
return __m81_u_(__CONCATX(__,FUNC)) (x);
|
||||||
|
__asm__ __volatile__ ("fsincosx %2,%0:%1" : "=f" (cos_x), "=f" (sin_x)
|
||||||
|
: "f" (x));
|
||||||
|
__asm__ __volatile__ ("fsincosx %2,%0:%1" : "=f" (cos_y), "=f" (sin_y)
|
||||||
|
: "f" (y));
|
||||||
|
return sin_x * cos_y + cos_x * sin_y;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
|
||||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||||
Cambridge, MA 02139, USA. */
|
Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
#include <ansidecl.h>
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#ifndef FUNC
|
#ifndef FUNC
|
||||||
|
@ -29,11 +28,16 @@ Cambridge, MA 02139, USA. */
|
||||||
#define __CONCATX(a,b) __CONCAT(a,b)
|
#define __CONCATX(a,b) __CONCAT(a,b)
|
||||||
|
|
||||||
float_type
|
float_type
|
||||||
DEFUN(__CONCATX(__kernel_,FUNC), (x, y, iy),
|
__CONCATX(__kernel_,FUNC) (x, y, iy)
|
||||||
float_type x AND float_type y AND int iy)
|
float_type x;
|
||||||
|
float_type y;
|
||||||
|
int iy;
|
||||||
{
|
{
|
||||||
if (iy == 1)
|
float_type tan_x, tan_y;
|
||||||
return __CONCATX(__,FUNC) (x + y);
|
tan_x = __m81_u_(__CONCATX(__,FUNC)) (x);
|
||||||
|
tan_y = __m81_u_(__CONCATX(__,FUNC)) (y);
|
||||||
|
if (iy > 0)
|
||||||
|
return (tan_x + tan_y) / (1 - tan_x * tan_y);
|
||||||
else
|
else
|
||||||
return ((float_type) -1.0) / __CONCATX(__,FUNC) (x + y);
|
return (tan_x * tan_y - 1) / (tan_x + tan_y);
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
|
||||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||||
Cambridge, MA 02139, USA. */
|
Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
#include <ansidecl.h>
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <hurd.h>
|
#include <hurd.h>
|
||||||
|
@ -25,8 +24,11 @@ Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
/* Send N bytes of BUF to socket FD. Returns the number sent or -1. */
|
/* Send N bytes of BUF to socket FD. Returns the number sent or -1. */
|
||||||
int
|
int
|
||||||
DEFUN(__send, (fd, buf, n, flags),
|
__send (fd, buf, n, flags)
|
||||||
int fd AND const PTR buf AND size_t n AND int flags)
|
int fd;
|
||||||
|
const void *buf;
|
||||||
|
size_t n;
|
||||||
|
int flags;
|
||||||
{
|
{
|
||||||
error_t err;
|
error_t err;
|
||||||
int wrote;
|
int wrote;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
|
/* Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
|
||||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||||
Cambridge, MA 02139, USA. */
|
Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
#include <ansidecl.h>
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <hurd.h>
|
#include <hurd.h>
|
||||||
|
@ -28,9 +27,13 @@ Cambridge, MA 02139, USA. */
|
||||||
/* Send N bytes of BUF on socket FD to peer at address ADDR (which is
|
/* Send N bytes of BUF on socket FD to peer at address ADDR (which is
|
||||||
ADDR_LEN bytes long). Returns the number sent, or -1 for errors. */
|
ADDR_LEN bytes long). Returns the number sent, or -1 for errors. */
|
||||||
int
|
int
|
||||||
DEFUN(sendto, (fd, buf, n, flags, addr, addr_len),
|
sendto (fd, buf, n, flags, addr, addr_len)
|
||||||
int fd AND const PTR buf AND size_t n AND int flags AND
|
int fd;
|
||||||
const struct sockaddr_un *addr AND size_t addr_len)
|
const void *buf;
|
||||||
|
size_t n;
|
||||||
|
int flags;
|
||||||
|
const struct sockaddr_un *addr;
|
||||||
|
size_t addr_len;
|
||||||
{
|
{
|
||||||
addr_port_t aport;
|
addr_port_t aport;
|
||||||
error_t err;
|
error_t err;
|
||||||
|
|
|
@ -78,6 +78,15 @@ profil (u_short *sample_buffer, size_t size, size_t offset, u_int scale)
|
||||||
return sigaction (SIGPROF, &oact, NULL);
|
return sigaction (SIGPROF, &oact, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (samples)
|
||||||
|
{
|
||||||
|
/* Was already turned on. Restore old timer and signal handler
|
||||||
|
first. */
|
||||||
|
if (setitimer (ITIMER_PROF, &otimer, NULL) < 0
|
||||||
|
|| sigaction (SIGPROF, &oact, NULL) < 0)
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
samples = sample_buffer;
|
samples = sample_buffer;
|
||||||
nsamples = size / sizeof *samples;
|
nsamples = size / sizeof *samples;
|
||||||
pc_offset = offset;
|
pc_offset = offset;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Return info on filesystem.
|
/* Return info on filesystem.
|
||||||
Copyright (C) 1995 Free Software Foundation, Inc.
|
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
|
|
@ -284,11 +284,11 @@ export asm_CPP := $(COMPILE.S) -E -x assembler-with-cpp
|
||||||
|
|
||||||
$(common-objpfx)sysd-syscalls: $(..)sysdeps/unix/make-syscalls.sh \
|
$(common-objpfx)sysd-syscalls: $(..)sysdeps/unix/make-syscalls.sh \
|
||||||
$(wildcard $(+sysdep_dirs:%=%/syscalls.list))
|
$(wildcard $(+sysdep_dirs:%=%/syscalls.list))
|
||||||
for dir in $$sysdirs; do \
|
for dir in $(+sysdep_dirs); do \
|
||||||
test -f $(..)sysdeps/$$dir/syscalls.list && \
|
test -f $$dir/syscalls.list && \
|
||||||
{ $(SHELL) $(dir $<)$(notdir $<) \
|
{ $(SHELL) $(dir $<)$(notdir $<) \
|
||||||
$(..)sysdeps $$dir $(object-suffixes) || exit 1; }; \
|
$$dir $(object-suffixes) || exit 1; }; \
|
||||||
test $$dir = unix && break; \
|
test $$dir = sysdeps/unix && break; \
|
||||||
done > $@T
|
done > $@T
|
||||||
mv -f $@T $@
|
mv -f $@T $@
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 1993 Free Software Foundation, Inc.
|
/* Copyright (C) 1993, 1996 Free Software Foundation, Inc.
|
||||||
Contributed by Brendan Kehoe (brendan@zen.org).
|
Contributed by Brendan Kehoe (brendan@zen.org).
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
@ -22,6 +22,7 @@ Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
.section .bss
|
.section .bss
|
||||||
.globl errno
|
.globl errno
|
||||||
|
.align 2
|
||||||
errno: .space 4
|
errno: .space 4
|
||||||
#ifdef __ELF__
|
#ifdef __ELF__
|
||||||
.type errno, @object
|
.type errno, @object
|
||||||
|
|
|
@ -3,12 +3,11 @@
|
||||||
# Usage: make-syscalls.sh ../sysdeps unix/common
|
# Usage: make-syscalls.sh ../sysdeps unix/common
|
||||||
# Expects $sysdirs in environment.
|
# Expects $sysdirs in environment.
|
||||||
|
|
||||||
sysbase=$1; shift
|
|
||||||
thisdir=$1; shift
|
thisdir=$1; shift
|
||||||
|
|
||||||
# Get the list of system calls for this directory.
|
# Get the list of system calls for this directory.
|
||||||
calls=`sed 's/#.*$//
|
calls=`sed 's/#.*$//
|
||||||
/^[ ]*$/d' $sysbase/$thisdir/syscalls.list`
|
/^[ ]*$/d' $thisdir/syscalls.list`
|
||||||
|
|
||||||
# Check each sysdep dir with higher priority than this one,
|
# Check each sysdep dir with higher priority than this one,
|
||||||
# and remove from $calls all the functions found in other dirs.
|
# and remove from $calls all the functions found in other dirs.
|
||||||
|
@ -21,13 +20,13 @@ for dir in $sysdirs; do
|
||||||
# If a syscall specified a "caller", then only compile that syscall
|
# If a syscall specified a "caller", then only compile that syscall
|
||||||
# if the caller function is also implemented in this directory.
|
# if the caller function is also implemented in this directory.
|
||||||
calls=`echo "$calls" | while read file caller rest; do
|
calls=`echo "$calls" | while read file caller rest; do
|
||||||
test -f $sysbase/$dir/$file.c && continue
|
test -f $dir/$file.c && continue
|
||||||
test -f $sysbase/$dir/$file.S && continue
|
test -f $dir/$file.S && continue
|
||||||
test -f $sysbase/$dir/$file.s && continue
|
test -f $dir/$file.s && continue
|
||||||
if test x$caller != x-; then
|
if test x$caller != x-; then
|
||||||
test -f $sysbase/$dir/$caller.c && continue
|
test -f $dir/$caller.c && continue
|
||||||
test -f $sysbase/$dir/$caller.S && continue
|
test -f $dir/$caller.S && continue
|
||||||
test -f $sysbase/$dir/$caller.s && continue
|
test -f $dir/$caller.s && continue
|
||||||
fi
|
fi
|
||||||
echo $file $caller $rest
|
echo $file $caller $rest
|
||||||
done`
|
done`
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
alpha/ptrace.halpha/regdef.h
|
alpha/ptrace.h alpha/regdef.h
|
||||||
ieee_get_fp_control.S ieee_set_fp_control.S
|
ieee_get_fp_control.S ieee_set_fp_control.S
|
||||||
ioperm.c
|
ioperm.c
|
||||||
init-first.h
|
init-first.h
|
||||||
clone.S
|
clone.S
|
||||||
|
sys/io.h
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
ifeq ($(subdir), misc)
|
ifeq ($(subdir), misc)
|
||||||
sysdep_headers += alpha/ptrace.h alpha/regdef.h
|
sysdep_headers += alpha/ptrace.h alpha/regdef.h sys/io.h
|
||||||
|
|
||||||
sysdep_routines += ieee_get_fp_control ieee_set_fp_control \
|
sysdep_routines += ieee_get_fp_control ieee_set_fp_control \
|
||||||
sethae ioperm osf_sigprocmask fstatfs statfs llseek
|
sethae ioperm osf_sigprocmask fstatfs statfs llseek
|
||||||
|
|
|
@ -1,12 +1,29 @@
|
||||||
/* This fragment is invoked in the stack context of program start.
|
/* The job of this fragment it to find argc and friends for INIT.
|
||||||
Its job is to set up a pointer to argc as an argument, pass
|
This is done in one of two ways: either in the stack context
|
||||||
control to `INIT', and, if necessary, clean up after the call
|
of program start, or having dlopen pass them in. */
|
||||||
to leave the stack in the same condition it was found in. */
|
|
||||||
|
|
||||||
#define SYSDEP_CALL_INIT(NAME, INIT) \
|
#define SYSDEP_CALL_INIT(NAME, INIT) \
|
||||||
asm(".globl " #NAME "\n" \
|
asm(".weak _dl_starting_up\n\t" \
|
||||||
#NAME ":\n\t" \
|
".globl " #NAME "\n\t" \
|
||||||
"ldgp $29, 0($27)\n\t" \
|
".ent " #NAME "\n" \
|
||||||
".prologue 1\n\t" \
|
#NAME ":\n\t" \
|
||||||
"mov $30, $16\n\t" \
|
"ldgp $29, 0($27)\n\t" \
|
||||||
"br $31, " #INIT "..ng");
|
".prologue 1\n\t" \
|
||||||
|
".set at\n\t" \
|
||||||
|
/* Are we a dynamic libc being loaded into a static program? */ \
|
||||||
|
"lda $0, _dl_starting_up\n\t" \
|
||||||
|
"beq $0, 1f\n\t" \
|
||||||
|
"ldl $0, 0($0)\n" \
|
||||||
|
"cmpeq $31, $0, $0\n" \
|
||||||
|
"1:\t" \
|
||||||
|
"stl $0, __libc_multiple_libcs\n\t" \
|
||||||
|
/* If so, argc et al are in a0-a2 already. Otherwise, load them. */ \
|
||||||
|
"bne $0, 2f\n\t" \
|
||||||
|
"ldl $16, 0($30)\n\t" \
|
||||||
|
"lda $17, 8($30)\n\t" \
|
||||||
|
"s8addq $16, $17, $18\n\t" \
|
||||||
|
"addq $18, 8, $18\n" \
|
||||||
|
"2:\t" \
|
||||||
|
"br $31, " #INIT "..ng\n\t" \
|
||||||
|
".set noat\n\t" \
|
||||||
|
".end " #NAME);
|
||||||
|
|
|
@ -84,20 +84,21 @@ struct ioswtch {
|
||||||
static struct platform {
|
static struct platform {
|
||||||
const char *name;
|
const char *name;
|
||||||
int io_sys;
|
int io_sys;
|
||||||
|
int hae_shift;
|
||||||
unsigned long bus_memory_base;
|
unsigned long bus_memory_base;
|
||||||
unsigned long sparse_bus_memory_base;
|
unsigned long sparse_bus_memory_base;
|
||||||
} platform[] = {
|
} platform[] = {
|
||||||
{"Alcor", IOSYS_CIA, CIA_DENSE_MEM, CIA_SPARSE_MEM},
|
{"Alcor", IOSYS_CIA, 5, CIA_DENSE_MEM, CIA_SPARSE_MEM},
|
||||||
{"Avanti", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM},
|
{"Avanti", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM},
|
||||||
{"Cabriolet", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM},
|
{"Cabriolet", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM},
|
||||||
{"EB164", IOSYS_CIA, CIA_DENSE_MEM, CIA_SPARSE_MEM},
|
{"EB164", IOSYS_CIA, 5, CIA_DENSE_MEM, CIA_SPARSE_MEM},
|
||||||
{"EB64+", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM},
|
{"EB64+", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM},
|
||||||
{"EB66", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM},
|
{"EB66", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM},
|
||||||
{"EB66P", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM},
|
{"EB66P", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM},
|
||||||
{"Jensen", IOSYS_JENSEN, 0, JENSEN_SPARSE_MEM},
|
{"Jensen", IOSYS_JENSEN, 7, 0, JENSEN_SPARSE_MEM},
|
||||||
{"Mikasa", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM},
|
{"Mikasa", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM},
|
||||||
{"Mustang", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM},
|
{"Mustang", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM},
|
||||||
{"Noname", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM},
|
{"Noname", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -109,11 +110,11 @@ static struct {
|
||||||
unsigned long base;
|
unsigned long base;
|
||||||
struct ioswtch * swp;
|
struct ioswtch * swp;
|
||||||
int sys;
|
int sys;
|
||||||
|
int hae_shift;
|
||||||
|
unsigned long bus_memory_base;
|
||||||
|
unsigned long sparse_bus_memory_base;
|
||||||
} io;
|
} io;
|
||||||
|
|
||||||
static unsigned long bus_memory_base = -1;
|
|
||||||
static unsigned long sparse_bus_memory_base = -1;
|
|
||||||
|
|
||||||
extern void __sethae (unsigned long); /* we can't use asm/io.h */
|
extern void __sethae (unsigned long); /* we can't use asm/io.h */
|
||||||
|
|
||||||
|
|
||||||
|
@ -335,8 +336,9 @@ init_iosys (void)
|
||||||
{
|
{
|
||||||
if (strcmp (platform[i].name, systype) == 0)
|
if (strcmp (platform[i].name, systype) == 0)
|
||||||
{
|
{
|
||||||
bus_memory_base = platform[i].bus_memory_base;
|
io.hae_shift = platform[i].hae_shift;
|
||||||
sparse_bus_memory_base = platform[i].sparse_bus_memory_base;
|
io.bus_memory_base = platform[i].bus_memory_base;
|
||||||
|
io.sparse_bus_memory_base = platform[i].sparse_bus_memory_base;
|
||||||
io.sys = platform[i].io_sys;
|
io.sys = platform[i].io_sys;
|
||||||
if (io.sys == IOSYS_JENSEN)
|
if (io.sys == IOSYS_JENSEN)
|
||||||
io.swp = &ioswtch[0];
|
io.swp = &ioswtch[0];
|
||||||
|
@ -500,7 +502,7 @@ _bus_base(void)
|
||||||
{
|
{
|
||||||
if (!io.swp && init_iosys () < 0)
|
if (!io.swp && init_iosys () < 0)
|
||||||
return -1;
|
return -1;
|
||||||
return bus_memory_base;
|
return io.bus_memory_base;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long
|
unsigned long
|
||||||
|
@ -508,7 +510,15 @@ _bus_base_sparse(void)
|
||||||
{
|
{
|
||||||
if (!io.swp && init_iosys () < 0)
|
if (!io.swp && init_iosys () < 0)
|
||||||
return -1;
|
return -1;
|
||||||
return sparse_bus_memory_base;
|
return io.sparse_bus_memory_base;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
_hae_shift(void)
|
||||||
|
{
|
||||||
|
if (!io.swp && init_iosys () < 0)
|
||||||
|
return -1;
|
||||||
|
return io.hae_shift;
|
||||||
}
|
}
|
||||||
|
|
||||||
weak_alias (_sethae, sethae);
|
weak_alias (_sethae, sethae);
|
||||||
|
@ -522,3 +532,4 @@ weak_alias (_outw, outw);
|
||||||
weak_alias (_outl, outl);
|
weak_alias (_outl, outl);
|
||||||
weak_alias (_bus_base, bus_base);
|
weak_alias (_bus_base, bus_base);
|
||||||
weak_alias (_bus_base_sparse, bus_base_sparse);
|
weak_alias (_bus_base_sparse, bus_base_sparse);
|
||||||
|
weak_alias (_hae_shift, hae_shift);
|
||||||
|
|
59
sysdeps/unix/sysv/linux/alpha/sys/io.h
Normal file
59
sysdeps/unix/sysv/linux/alpha/sys/io.h
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
/* 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. */
|
||||||
|
|
||||||
|
#ifndef _SYS_IO_H
|
||||||
|
|
||||||
|
#define _SYS_IO_H 1
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
|
__BEGIN_DECLS
|
||||||
|
|
||||||
|
/* Get constants from kernel header files. */
|
||||||
|
#include <asm/io.h>
|
||||||
|
|
||||||
|
/* If TURN_ON is TRUE, request for permission to do direct i/o on the
|
||||||
|
port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O
|
||||||
|
permission off for that range. This call requires root privileges.
|
||||||
|
|
||||||
|
Portability note: not all Linux platforms support this call. Most
|
||||||
|
platforms based on the PC I/O architecture probably will, however.
|
||||||
|
E.g., Linux/Alpha for Alpha PCs supports this. */
|
||||||
|
extern int ioperm __P ((unsigned long int __from, unsigned long int __num,
|
||||||
|
int __turn_on));
|
||||||
|
|
||||||
|
/* Set the I/O privilege level to LEVEL. If LEVEL>3, permission to
|
||||||
|
access any I/O port is granted. This call requires root
|
||||||
|
privileges. */
|
||||||
|
extern int iopl __P ((int __level));
|
||||||
|
|
||||||
|
/* Return the physical address of the DENSE I/O memory or NULL if none
|
||||||
|
is available (e.g. on a jensen). */
|
||||||
|
extern unsigned long _bus_base __P ((void)) __attribute__ ((const));
|
||||||
|
extern unsigned long bus_base __P ((void)) __attribute__ ((const));
|
||||||
|
|
||||||
|
/* Return the physical address of the SPARSE I/O memory. */
|
||||||
|
extern unsigned long _bus_base_sparse __P ((void)) __attribute__ ((const));
|
||||||
|
extern unsigned long bus_base_sparse __P ((void)) __attribute__ ((const));
|
||||||
|
|
||||||
|
/* Return the HAE shift used by the SPARSE I/O memory. */
|
||||||
|
extern int _hae_shift __P ((void)) __attribute__ ((const));
|
||||||
|
extern int hae_shift __P ((void)) __attribute__ ((const));
|
||||||
|
|
||||||
|
__END_DECLS
|
||||||
|
|
||||||
|
#endif /* _SYS_IO_H */
|
|
@ -1,3 +1,3 @@
|
||||||
sys/perm.h sys/vm86.h
|
sys/perm.h sys/vm86.h
|
||||||
init-first.h
|
init-first.h
|
||||||
close.S
|
clone.S
|
||||||
|
|
|
@ -1,13 +1,27 @@
|
||||||
/* This fragment is invoked in the stack context of program start.
|
/* The job of this fragment it to find argc and friends for INIT.
|
||||||
Its job is to set up a pointer to argc as an argument, pass
|
This is done in one of two ways: either in the stack context
|
||||||
control to `INIT', and, if necessary, clean up after the call
|
of program start, or having dlopen pass them in. */
|
||||||
to leave the stack in the same condition it was found in. */
|
|
||||||
|
|
||||||
#define SYSDEP_CALL_INIT(NAME, INIT) \
|
#define SYSDEP_CALL_INIT(NAME, INIT) \
|
||||||
asm(".globl " #NAME "\n\t" \
|
void NAME (void *arg) \
|
||||||
#NAME ":\n\t" \
|
{ \
|
||||||
"lea 4(%esp), %eax\n\t" \
|
int argc; \
|
||||||
"pushl %eax\n\t" \
|
char **argv, **envp; \
|
||||||
"call " #INIT "\n\t" \
|
\
|
||||||
"popl %eax\n\t" \
|
__libc_multiple_libcs = &_dl_starting_up && !_dl_starting_up; \
|
||||||
"ret");
|
\
|
||||||
|
if (!__libc_multiple_libcs) \
|
||||||
|
{ \
|
||||||
|
argc = (int) arg; \
|
||||||
|
argv = (char **) &arg + 1; \
|
||||||
|
envp = &argv[argc+1]; \
|
||||||
|
} \
|
||||||
|
else \
|
||||||
|
{ \
|
||||||
|
argc = (int) arg; \
|
||||||
|
argv = ((char ***) &arg)[1]; \
|
||||||
|
envp = ((char ***) &arg)[2]; \
|
||||||
|
} \
|
||||||
|
\
|
||||||
|
INIT (argc, argv, envp); \
|
||||||
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 1995 Free Software Foundation, Inc.
|
/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
@ -36,9 +36,9 @@ ENTRY (__mmap)
|
||||||
/* Restore registers. */
|
/* Restore registers. */
|
||||||
movl %edx, %ebx
|
movl %edx, %ebx
|
||||||
|
|
||||||
/* %eax is < 0 if there was an error. */
|
/* If 0 > %eax > -4096 there was an error. */
|
||||||
testl %eax, %eax
|
cmpl $-4096, %eax
|
||||||
jl syscall_error
|
ja syscall_error
|
||||||
|
|
||||||
/* Successful; return the syscall's value. */
|
/* Successful; return the syscall's value. */
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -27,7 +27,7 @@ extern void __libc_init (int, char **, char **);
|
||||||
extern void __libc_global_ctors (void);
|
extern void __libc_global_ctors (void);
|
||||||
|
|
||||||
/* The function is called from assembly stubs the compiler can't see. */
|
/* The function is called from assembly stubs the compiler can't see. */
|
||||||
static void init (void *) __attribute__ ((unused));
|
static void init (int, char **, char **) __attribute__ ((unused));
|
||||||
|
|
||||||
extern int _dl_starting_up;
|
extern int _dl_starting_up;
|
||||||
weak_extern (_dl_starting_up)
|
weak_extern (_dl_starting_up)
|
||||||
|
@ -40,26 +40,16 @@ int __libc_multiple_libcs = 1;
|
||||||
later calls of initializers for dynamic libraries. */
|
later calls of initializers for dynamic libraries. */
|
||||||
int __libc_argc;
|
int __libc_argc;
|
||||||
char **__libc_argv;
|
char **__libc_argv;
|
||||||
char **__libc_envp;
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
init (void *data)
|
init (int argc, char **argv, char **envp)
|
||||||
{
|
{
|
||||||
extern int __personality (int);
|
extern int __personality (int);
|
||||||
|
|
||||||
__libc_multiple_libcs = &_dl_starting_up && ! _dl_starting_up;
|
|
||||||
|
|
||||||
|
|
||||||
/* We must not call `personality' twice. */
|
/* We must not call `personality' twice. */
|
||||||
if (!__libc_multiple_libcs)
|
if (!__libc_multiple_libcs)
|
||||||
{
|
{
|
||||||
/* The argument we got points to the values describing the
|
|
||||||
command line argument etc. */
|
|
||||||
__libc_argc = *(int *)data;
|
|
||||||
__libc_argv = (char **)data + 1;
|
|
||||||
__libc_envp = &__libc_argv[__libc_argc + 1];
|
|
||||||
|
|
||||||
/* The `personality' system call takes one argument that chooses
|
/* The `personality' system call takes one argument that chooses
|
||||||
the "personality", i.e. the set of system calls and such. We
|
the "personality", i.e. the set of system calls and such. We
|
||||||
must make this call first thing to disable emulation of some
|
must make this call first thing to disable emulation of some
|
||||||
|
@ -70,17 +60,13 @@ init (void *data)
|
||||||
/* Set the FPU control word to the proper default value. */
|
/* Set the FPU control word to the proper default value. */
|
||||||
__setfpucw (__fpu_control);
|
__setfpucw (__fpu_control);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
/* The argument we got points to the values describing the
|
|
||||||
command line argument etc. */
|
|
||||||
__libc_argc = *((int *)data)++;
|
|
||||||
__libc_argv = *((char ***)data)++;
|
|
||||||
__libc_envp = *(char ***)data;
|
|
||||||
}
|
|
||||||
|
|
||||||
__environ = __libc_envp;
|
/* Save the command-line arguments. */
|
||||||
__libc_init (__libc_argc, __libc_argv, __libc_envp);
|
__libc_argc = argc;
|
||||||
|
__libc_argv = argv;
|
||||||
|
__environ = envp;
|
||||||
|
|
||||||
|
__libc_init (argc, argv, envp);
|
||||||
|
|
||||||
#ifdef PIC
|
#ifdef PIC
|
||||||
__libc_global_ctors ();
|
__libc_global_ctors ();
|
||||||
|
|
|
@ -27,7 +27,7 @@ Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.\n\
|
||||||
This is free software; see the source for copying conditions.\n\
|
This is free software; see the source for copying conditions.\n\
|
||||||
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\n\
|
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\n\
|
||||||
PARTICULAR PURPOSE.\n\
|
PARTICULAR PURPOSE.\n\
|
||||||
Report bugs to <bug-glibc@gnu.ai.mit.edu>.";
|
Report bugs to <bug-glibc@gnu.ai.mit.edu>.\n";
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
|
|
@ -264,7 +264,7 @@ extern long int __wcstol_internal __P ((__const wchar_t *__nptr,
|
||||||
extern unsigned long int __wcstoul_internal __P ((__const wchar_t *__nptr,
|
extern unsigned long int __wcstoul_internal __P ((__const wchar_t *__nptr,
|
||||||
wchar_t **__endptr,
|
wchar_t **__endptr,
|
||||||
int __base, int __group));
|
int __base, int __group));
|
||||||
#ifdef __GNUC__
|
#if defined __GNUC__ && defined __USE_GNU
|
||||||
extern long long int __wcstoq_internal __P ((__const wchar_t *__nptr,
|
extern long long int __wcstoq_internal __P ((__const wchar_t *__nptr,
|
||||||
wchar_t **__endptr, int __base,
|
wchar_t **__endptr, int __base,
|
||||||
int __group));
|
int __group));
|
||||||
|
@ -272,7 +272,7 @@ extern unsigned long long int __wcstouq_internal __P ((__const wchar_t *__nptr,
|
||||||
wchar_t **__endptr,
|
wchar_t **__endptr,
|
||||||
int __base,
|
int __base,
|
||||||
int __group));
|
int __group));
|
||||||
#endif /* GCC */
|
#endif /* GCC and use GNU. */
|
||||||
|
|
||||||
|
|
||||||
#if defined (__OPTIMIZE__) && __GNUC__ >= 2
|
#if defined (__OPTIMIZE__) && __GNUC__ >= 2
|
||||||
|
@ -293,16 +293,15 @@ extern __inline float wcstof (__const wchar_t *__nptr, wchar_t **__endptr)
|
||||||
extern __inline __long_double_t wcstold (__const wchar_t *__nptr,
|
extern __inline __long_double_t wcstold (__const wchar_t *__nptr,
|
||||||
wchar_t **__endptr)
|
wchar_t **__endptr)
|
||||||
{ return __wcstold_internal (__nptr, __endptr, 0); }
|
{ return __wcstold_internal (__nptr, __endptr, 0); }
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __USE_BSD
|
|
||||||
extern __inline long long int wcstoq (__const wchar_t *__nptr,
|
extern __inline long long int wcstoq (__const wchar_t *__nptr,
|
||||||
wchar_t **__endptr, int __base)
|
wchar_t **__endptr, int __base)
|
||||||
{ return __wcstoq_internal (__nptr, __endptr, __base, 0); }
|
{ return __wcstoq_internal (__nptr, __endptr, __base, 0); }
|
||||||
extern __inline unsigned long long int wcstouq (__const wchar_t *__nptr,
|
extern __inline unsigned long long int wcstouq (__const wchar_t *__nptr,
|
||||||
wchar_t **__endptr, int __base)
|
wchar_t **__endptr, int __base)
|
||||||
{ return __wcstouq_internal (__nptr, __endptr, __base, 0); }
|
{ return __wcstouq_internal (__nptr, __endptr, __base, 0); }
|
||||||
#endif
|
#endif /* Use GNU. */
|
||||||
#endif /* Optimizing GCC >=2. */
|
#endif /* Optimizing GCC >=2. */
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue