mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-09 23:00:07 +00:00
cc3fa75512
1997-11-11 21:30 Ulrich Drepper <drepper@cygnus.com> * include/sys/stat.h: Define stat, fstat, lstat and *64 variants as macros so the the library compiles correctly even without optimization. * io/fstat.c: Undef fstat. * io/fstat64.c: Undef fstat64 * io/lstat.c: Undef lstat. * io/lstat64.c: Undef lstat64 * io/stat.c: Undef stat. * io/stat64.c: Undef stat64 * io/fts.c: Include <include/sys/stat.h> to get macro definitions. * io/ftw.c: Likewise. * io/getdirname.c: Likewise. * Makefile (install): Run test-installation.pl if possible. * db2/Makefile: Update from db-2.3.12. * db2/db.h: Likewise. * db2/db_int.h: Likewise. * db2/btree/bt_cursor.c: Likewise. * db2/btree/bt_delete.c: Likewise. * db2/btree/bt_open.c: Likewise. * db2/btree/bt_put.c: Likewise. * db2/btree/bt_rec.c: Likewise. * db2/btree/bt_recno.c: Likewise. * db2/btree/bt_search.c: Likewise. * db2/btree/bt_split.c: Likewise. * db2/btree/bt_stat.c: Likewise. * db2/btree/btree.src: Likewise. * db2/btree/btree_auto.c: Likewise. * db2/btree/bt_cursor.c: Likewise. * db2/btree/bt_delete.c: Likewise. * db2/btree/bt_open.c: Likewise. * db2/btree/bt_put.c: Likewise. * db2/btree/bt_rec.c: Likewise. * db2/btree/bt_recno.c: Likewise. * db2/btree/bt_search.c: Likewise. * db2/btree/bt_split.c: Likewise. * db2/btree/bt_stat.c: Likewise. * db2/btree/btree.src: Likewise. * db2/btree/btree_auto.c: Likewise. * db2/common/db_appinit.c: Likewise. * db2/common/db_apprec.c: Likewise. * db2/common/db_byteorder.c: Likewise. * db2/common/db_region.c: Likewise. * db2/db/db.c: Likewise * db2/db/db.src: Likewise * db2/db/db_auto.c: Likewise * db2/db/db_dispatch.c: Likewise * db2/db/db_dup.c: Likewise * db2/db/db_overflow.c: Likewise * db2/db/db_pr.c: Likewise * db2/db/db_rec.c: Likewise * db2/db/db_ret.c: Likewise * db2/db/db_thread.c: Likewise * db2/db185/db185.c: Likewise. * db2/hash/hash.c: Likewise. * db2/hash/hash.src: Likewise. * db2/hash/hash_auto.c: Likewise. * db2/hash/hash_dup.c: Likewise. * db2/hash/hash_page.c: Likewise. * db2/hash/hash_rec.c: Likewise. * db2/include/btree_auto.h: Likewise. * db2/include/btree_ext.h: Likewise. * db2/include/clib_ext.h: Likewise. * db2/include/common_ext.h: Likewise. * db2/include/db.h.src: Likewise. * db2/include/db_am.h: Likewise. * db2/include/db_auto.h: Likewise. * db2/include/db_cxx.h: Likewise. * db2/include/db_ext.h: Likewise. * db2/include/db_int.h.src: Likewise. * db2/include/hash.h: Likewise. * db2/include/hash_auto.h: Likewise. * db2/include/hash_ext.h: Likewise. * db2/include/lock.h: Likewise. * db2/include/lock_ext.h: Likewise. * db2/include/log.h: Likewise. * db2/include/log_ext.h: Likewise. * db2/include/mp.h: Likewise. * db2/include/mp_ext.h: Likewise. * db2/include/mutex_ext.h: Likewise. * db2/include/os_ext.h: Likewise. * db2/include/os_func.h: Likewise. * db2/include/txn.h: Likewise. * db2/include/txn_ext.h: Likewise. * db2/lock/lock.c: Likewise. * db2/lock/lock_deadlock.c: Likewise. * db2/log/log.c: Likewise. * db2/log/log_archive.c: Likewise. * db2/log/log_auto.c: Likewise. * db2/log/log_findckp.c: Likewise. * db2/log/log_get.c: Likewise. * db2/log/log_put.c: Likewise. * db2/log/log_rec.c: Likewise. * db2/log/log_register.c: Likewise. * db2/mp/mp_bh.c: Likewise. * db2/mp/mp_fget.c: Likewise. * db2/mp/mp_fopen.c: Likewise. * db2/mp/mp_fput.c: Likewise. * db2/mp/mp_fset.c: Likewise. * db2/mp/mp_open.c: Likewise. * db2/mp/mp_pr.c: Likewise. * db2/mp/mp_region.c: Likewise. * db2/mp/mp_sync.c: Likewise. * db2/mutex/mutex.c: Likewise. * db2/os/os_abs.c: Likewise. * db2/os/os_dir.c: Likewise. * db2/os/os_fid.c: Likewise. * db2/os/os_fsync.c: Likewise. * db2/os/os_func.c: Likewise. * db2/os/os_map.c: Likewise. * db2/os/os_oflags.c: Likewise. * db2/os/os_open.c: Likewise. * db2/os/os_rpath.c: Likewise. * db2/os/os_rw.c: Likewise. * db2/os/os_seek.c: Likewise. * db2/os/os_sleep.c: Likewise. * db2/os/os_stat.c: Likewise. * db2/os/os_unlink.c: Likewise. * db2/progs/db_deadlock/db_deadlock.c: Likewise. * db2/progs/db_dump/db_dump.c: Likewise. * db2/progs/db_load/db_load.c: Likewise. * db2/progs/db_recover/db_recover.c: Likewise. * db2/progs/db_stat/db_stat.c: Likewise. * db2/txn/txn.c: Likewise. * db2/txn/txn_auto.c: Likewise. * db2/txn/txn_rec.c: Likewise. * db2/os/db_os_abs.c: Removed. * db2/os/db_os_dir.c: Removed. * db2/os/db_os_fid.c: Removed. * db2/os/db_os_lseek.c: Removed. * db2/os/db_os_mmap.c: Removed. * db2/os/db_os_open.c: Removed. * db2/os/db_os_rw.c: Removed. * db2/os/db_os_sleep.c: Removed. * db2/os/db_os_stat.c: Removed. * db2/os/db_os_unlink.c: Removed. * libio/stdio.h (fopen): Add __restrict to parameters. * manual/process.texi (system): Describe behaviour for NULL argument. * stdio-common/printf-parse.h: Parse hh modifier. * stdio-common/vfprintf.c: Handle hh modifier. * stdio-common/vfscanf.c: Likewise. * manual/stdio.texi: Describe hh modifier for scanf/printf. * math/complex.h: Don't define _Imaginary_I, but instead _Complex_I. gcc does no yet know the `imaginary' keyword. * math/test-math.c: Add little test for know gcc bug. * math/tgmath.h: Make complex versions of log10() only available if __USE_GNU. * stdlib/test-canon.c: Fix typo. * sysdeps/generic/setenv.c: Avoid compilation warnings. Reported by Jim Meyering. * sysdeps/generic/bits/errno.h: EILSEQ is an ISO C error number. * sysdeps/mach/hurd/bits/errno.h: Likewise. * sysdeps/standalone/bits/errno.h: Likewise. * sysdeps/unix/sysv/linux/bits/errno.h: Likewise. * sysdeps/i386/i586/memcpy.S: New file. * sysdeps/i386/i586/mempcpy.S: New file. * sysdeps/i386/i586/memset.S: Fix typo. * sysdeps/posix/getcwd.c: Define HAVE_MEMPCPY for _LIBC. Add casts. * sysdeps/posix/system.c: Add comment to explain code. * sysdeps/wordsize-32/inttypes.h: Include <stddef.h> for wchar_t. Define PTRDIFF_{MIN,MAX}, SIG_ATOMIC_{MIN,MAX}, SIZE_MAX, WCHAR_{MIN,MAX}, WINT_{MIN,MAX}. Define wcstoimax, wcstoumax. * sysdeps/wordsize-64/inttypes.h: Likewise. * wcsmbs/wchar.h: Define WCHAR_{MIN,MAX} if not already defined. Declare __wcsto{l,ul,ll,ull}_internal only if not already done. * time/Makefile (routines): Add strfxtime. * time/strftime.c: Implement %F and %f format. * time/strfxtime.c: New file. * time/time.h: Define new types and symbols from ISO C 9X. * time/mktime.c: Little comment correction. 1997-11-10 Andreas Jaeger <aj@arthur.rhein-neckar.de> * sysdeps/libm-ieee754/s_sincosl.c: Fix typo. * sysdeps/libm-ieee754/s_tanl.c: Fix typo. * sysdeps/libm-ieee754/s_floorl.c: Correct typos. * sysdeps/libm-ieee754/e_remainderl.c: Replace EXTRACT_LDOUBLE_WORDS by GET_LDOUBLE_WORDS. * sysdeps/libm-ieee754/e_atan2l.c: Replace EXTRACT_LDOUBLE_WORDS by GET_LDOUBLE_WORDS. * sysdeps/libm-ieee754/s_scalbnl.c: Replace ";" by "," for correct variable declaration. * sysdeps/libm-ieee754/s_scalblnl.c: Likewise. * sysdeps/libm-ieee754/s_lrint.c (__lrint): Correct function. * math/libm-test.c (sqrt_test): Add test for sqrt (0.25). (asin_test): Add more test. 1997-11-10 23:34 Ulrich Drepper <drepper@cygnus.com> * sysdeps/libm-ieee754/e_asin.c: Add braces to make code clearer and to not confuse the poor compiler. * sysdeps/libm-ieee754/e_asinf.c: Likewise. Reported by vertex@cagent.com. 1997-11-09 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * elf/dl-lookup.c (do_lookup): Don't accept the base version if we require a specific one. * libio/oldfreopen.c: Bind old symbols to version GLIBC_2.0. * libio/oldiofopen.c: Likewise. * libio/oldstdfiles.c: Likewise. * libc.map: Export them. 1997-11-10 07:40 H.J. Lu <hjl@gnu.ai.mit.edu> * stdlib/exit.c (exit): Handle recursive calls to exit (). 1997-11-09 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/m68k/fpu/s_llrint.c: Fixed to take double argument instead of long double. * sysdeps/m68k/fpu/s_llrintf.c: New file. * sysdeps/m68k/fpu/s_llrintl.c: New file. * sysdeps/libm-ieee754/s_llrint.c: Make compilable and fix overflow condition. * sysdeps/libm-ieee754/s_llrintf.c: Fix overflow condition. * sysdeps/libm-ieee754/s_llrintl.c: Likewise. * sysdeps/libm-ieee754/s_llround.c: Likewise. * sysdeps/libm-ieee754/s_llroundf.c: Likewise. * sysdeps/libm-ieee754/s_llroundl.c: Likewise. * sysdeps/libm-ieee754/s_lrint.c: Likewise. * sysdeps/libm-ieee754/s_lrintf.c: Likewise. * sysdeps/libm-ieee754/s_lrintl.c: Likewise. * sysdeps/libm-ieee754/s_lround.c: Likewise. * sysdeps/libm-ieee754/s_lroundf.c: Likewise. * sysdeps/libm-ieee754/s_lroundl.c: Likewise. * math/libm-test.c: Test all three variants of lrint and llrint. Fix typos in lround and llround tests. Add tests for boundary cases for lrint and llround. 1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * manual/arith.texi: Misc doc fixes. * manual/ctype.texi: Likewise. * manual/pattern.texi: Likewise. * manual/terminal.texi: Likewise. 1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/unix/sysv/linux/xstatconv.c: Use struct assignment instead of memcpy to let the compiler use whatever it regards as optimal. * sysdeps/unix/sysv/linux/alpha/xstatconv.c: Likewise. 1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/unix/sysv/linux/Makefile (sysdep_headers) [$(subdir)=misc]: Add sys/prctl.h. * sysdeps/unix/sysv/linux/Dist: Distribute it. 1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * io/ftwtest-sh: Don't use the unknown which command, instead try pwd as /bin/pwd and /usr/bin/pwd. 1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * manual/maint.texi (Tools for Installation): Don't recommend broken version 3.76.1 of make. (Porting): Fix wording. 1997-11-06 06:13 H.J. Lu <hjl@gnu.ai.mit.edu> * config.make.in (build-pic-default): New, defined with pic_default. * configure.in (pic_default): New, set to yes if PIC is default. * Makeconfig (CPPFLAGS-.o, CPPFLAGS-.op, CPPFLAGS-.og, CPPFLAGS-.ob): Add -DPIC if $(build-pic-default) is yes. 1997-11-09 18:15 Ulrich Drepper <drepper@cygnus.com> * Makerules (libc.so): Fix typo. * csu/Makefile (CFLAGS-initfini.s): Correctly fix moving function definition. Patch by Zack Weinberg <zack@rabi.phys.columbia.edu>. * stdlib/strtod.c: Handle numbers like 0.0e10000 correctly which produce ±0.0. Reported by Joe Keane <jgk@jgk.org>. * sysdeps/libm-ieee754/s_ceill.c: Fix typos. * sysdeps/libm-ieee754/s_llrint.c: Correct code, it never worked. 1997-11-06 07:00 H.J. Lu <hjl@gnu.ai.mit.edu> * sysdeps/unix/sysv/i386/i686/time.S: Removed. 1997-11-08 14:07 Thorsten Kukuk <kukuk@vt.uni-paderborn.de> * nis/libnsl.map: Add __do_niscall2 for nis_cachemgr. * nis/nis_call.c: Set UDP resend timeout correct. * nis/nss_compat/compat-grp.c: Rewritten to make it faster. * nis/nss_compat/compat-pwd.c: Likewise. * nis/nss_compat/compat-spwd.c: Likewise. * nis/ypclnt.c: Fix UDP resend timeout, fix yp_bind/do_ypcall interaction. * inet/protocols/routed.h: Include sys/socket.h. * inet/protocols/talkd.h: Likewise. * inet/protocols/timed.h: Include rpc/types.h. * sunrpc/rpc/pmap_clnt.h: Include rpc/clnt.h. 1997-11-06 01:39 Ulrich Drepper <drepper@cygnus.com> * Makerules (libc.so): Add missing closing brace. 1997-11-05 Brendan Kehoe <brendan@lisa.cygnus.com> * libio.h (__P): Name its arg `p' instead of `params'. This was added solely to work around problems with the definition of __P in the Solaris math.h header.
688 lines
21 KiB
Plaintext
688 lines
21 KiB
Plaintext
# Copyright (C) 1991, 92, 93, 94, 95, 96, 97 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.
|
||
|
||
#
|
||
# Makefile configuration options for the GNU C library.
|
||
#
|
||
ifneq (,)
|
||
This makefile requires GNU Make.
|
||
endif
|
||
|
||
all: # Make this the default goal
|
||
|
||
ifneq "$(origin +included-Makeconfig)" "file"
|
||
|
||
+included-Makeconfig := yes
|
||
|
||
ifdef subdir
|
||
.. := ../
|
||
endif
|
||
|
||
# If config.make exists, the source directory was configured,
|
||
# so don't try to be clever and find another directory to build in.
|
||
ifneq (,$(wildcard $(..)config.make))
|
||
ARCH =
|
||
machine =
|
||
else # Not configured.
|
||
ifndef ARCH
|
||
ifdef machine
|
||
ARCH = $(machine)
|
||
endif # machine
|
||
endif # ARCH
|
||
endif # config.make
|
||
|
||
# Directory for object files and libc.a. If this is not defined, the
|
||
# object files live in the subdirectories where their sources live, and
|
||
# libc.a lives in the parent directory (this probably doesn't work any
|
||
# more).
|
||
ifdef ARCH
|
||
ifeq ($(filter /%,$(ARCH)),)
|
||
objdir := $(..)$(ARCH)
|
||
else
|
||
objdir = $(ARCH)
|
||
endif
|
||
endif
|
||
|
||
# $(common-objdir) is the place to put objects and
|
||
# such that are not specific to a single subdir.
|
||
ifdef objdir
|
||
objpfx := $(patsubst %//,%/,$(objdir)/$(subdir)/)
|
||
common-objpfx = $(objdir)/
|
||
common-objdir = $(objdir)
|
||
else
|
||
objpfx :=
|
||
ifdef ..
|
||
common-objpfx = $(..)
|
||
common-objdir = ..
|
||
else
|
||
# This is a kludge. make wizards might grok.
|
||
common-objpfx = sysdeps/../
|
||
common-objdir = .
|
||
endif
|
||
endif
|
||
|
||
# Root of the sysdeps tree.
|
||
sysdep_dir := $(..)sysdeps
|
||
export sysdep_dir := $(sysdep_dir)
|
||
|
||
# Get the values defined by options to `configure'.
|
||
include $(common-objpfx)config.make
|
||
|
||
# We have a special subdir for each binary format.
|
||
# For now, only ELF is fully supported.
|
||
ifeq ($(elf),yes)
|
||
binfmt-subdir = elf
|
||
else
|
||
# This is probably better than nothing.
|
||
binfmt-subdir = aout
|
||
endif
|
||
|
||
# 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
|
||
# 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
|
||
# config.make should suffice to force regeneration and re-exec, and the new
|
||
# image will notice if config.h changed.
|
||
$(common-objpfx)config.make: $(common-objpfx)config.status \
|
||
$(..)config.make.in $(..)config.h.in
|
||
cd $(<D); $(SHELL) $(<F)
|
||
|
||
# Find all the sysdeps configure fragments, to make sure we re-run
|
||
# configure when any of them changes.
|
||
$(common-objpfx)config.status: $(..)version.h $(..)configure \
|
||
$(foreach dir,$(full-config-sysdirs),\
|
||
$(wildcard \
|
||
$(dir)/Implies) \
|
||
$(patsubst %.in,%,\
|
||
$(firstword $(wildcard \
|
||
$(addprefix $(dir)/,configure configure.in)))))
|
||
@cd $(@D); if test -f $(@F); then exec $(SHELL) $(@F) --recheck; else \
|
||
echo The GNU C library has not been configured. >&2; \
|
||
echo Run \`configure\' to configure it before building. >&2; \
|
||
echo Try \`configure --help\' for more details. >&2; \
|
||
exit 1; fi
|
||
|
||
# Get the user's configuration parameters.
|
||
ifneq ($(wildcard $(..)configparms),)
|
||
include $(..)configparms
|
||
endif
|
||
ifneq ($(objpfx),)
|
||
ifneq ($(wildcard $(common-objpfx)configparms),)
|
||
include $(common-objpfx)configparms
|
||
endif
|
||
endif
|
||
|
||
####
|
||
#### These are the configuration variables. You can define values for
|
||
#### the variables below in the file `configparms'.
|
||
#### Do NOT edit this file.
|
||
####
|
||
|
||
|
||
# Set this to either `stdio' or `libio', to compile in either GNU stdio
|
||
# or GNU libio.
|
||
ifndef stdio
|
||
stdio = stdio
|
||
endif
|
||
|
||
# Common prefix for machine-independent installation directories.
|
||
ifeq ($(origin prefix),undefined) # ifndef would override explicit empty value.
|
||
prefix = /usr/local
|
||
endif
|
||
|
||
# Decide whether we shall build the programs or not. We always do this
|
||
# unless the user tells us (in configparms) or we are building for a
|
||
# standalone target.
|
||
ifndef build-programs
|
||
ifneq ($(config-os),none)
|
||
build-programs=yes
|
||
else
|
||
build-programs=no
|
||
endif
|
||
endif
|
||
|
||
# Common prefix for machine-dependent installation directories.
|
||
ifeq ($(origin exec_prefix),undefined)
|
||
exec_prefix = $(prefix)
|
||
endif
|
||
|
||
# Where to install the library and object files.
|
||
ifndef libdir
|
||
libdir = $(exec_prefix)/lib
|
||
endif
|
||
inst_libdir = $(install_root)$(libdir)
|
||
|
||
# Where to install the shared library and dynamic linker.
|
||
ifndef slibdir
|
||
slibdir = $(exec_prefix)/lib
|
||
endif
|
||
inst_slibdir = $(install_root)$(slibdir)
|
||
|
||
# Prefix to put on files installed in $(libdir). For libraries `libNAME.a',
|
||
# the prefix is spliced between `lib' and the name, so the linker switch
|
||
# `-l$(libprefix)NAME' finds the library; for other files the prefix is
|
||
# just prepended to the whole file name.
|
||
ifeq ($(origin libprefix),undefined)
|
||
libprefix =
|
||
endif
|
||
|
||
# Where to install the header files.
|
||
ifndef includedir
|
||
includedir = $(exec_prefix)/include
|
||
endif
|
||
inst_includedir = $(install_root)$(includedir)
|
||
|
||
# Where to install machine-independent data files.
|
||
# These are the timezone database, and the locale database.
|
||
ifndef datadir
|
||
datadir = $(prefix)/share
|
||
endif
|
||
inst_datadir = $(install_root)$(datadir)
|
||
|
||
# Where to install the timezone data files (which are machine-independent).
|
||
ifndef zonedir
|
||
zonedir = $(datadir)/zoneinfo
|
||
endif
|
||
inst_zonedir = $(install_root)$(zonedir)
|
||
|
||
# Where to install the locale and message catalog data files (which are
|
||
# machine-independent).
|
||
ifndef localedir
|
||
localedir = $(datadir)/locale
|
||
endif
|
||
inst_localedir = $(install_root)$(localedir)
|
||
|
||
# Where to install the locale charmap source files.
|
||
ifndef i18ndir
|
||
i18ndir = $(datadir)/i18n
|
||
endif
|
||
inst_i18ndir = $(install_root)$(i18ndir)
|
||
|
||
|
||
# Where to install programs.
|
||
ifndef bindir
|
||
bindir = $(exec_prefix)/bin
|
||
endif
|
||
inst_bindir = $(install_root)$(bindir)
|
||
|
||
# Where to install administrative programs.
|
||
ifndef rootsbindir
|
||
rootsbindir = $(exec_prefix)/sbin
|
||
endif
|
||
inst_rootsbindir = $(install_root)$(rootsbindir)
|
||
|
||
ifndef sbindir
|
||
sbindir = $(exec_prefix)/sbin
|
||
endif
|
||
inst_sbindir = $(install_root)$(sbindir)
|
||
|
||
# Where to install the Info files.
|
||
ifndef infodir
|
||
infodir = $(prefix)/info
|
||
endif
|
||
inst_infodir = $(install_root)$(infodir)
|
||
|
||
# Where to install default configuration files. These include the local
|
||
# timezone specification and network data base files.
|
||
ifndef sysconfdir
|
||
sysconfdir = $(prefix)/etc
|
||
endif
|
||
inst_sysconfdir = $(install_root)$(sysconfdir)
|
||
|
||
# What timezone should be the installed default (e.g., US/Eastern).
|
||
# Run `make -C time echo-zonenames' to see a list of available zone names.
|
||
# The local timezone can be changed with `zic -l TIMEZONE' at any time.
|
||
ifndef localtime
|
||
localtime = Factory
|
||
endif
|
||
|
||
# Where to install the "localtime" timezone file; this is the file whose
|
||
# contents $(localtime) specifies. If this is a relative pathname, it is
|
||
# relative to $(zonedir). It is a good idea to put this somewhere
|
||
# other than there, so the zoneinfo directory contains only universal data,
|
||
# localizing the configuration data elsewhere.
|
||
ifndef localtime-file
|
||
localtime-file = $(sysconfdir)/localtime
|
||
inst_localtime-file = $(install_root)$(localtime-file)
|
||
endif
|
||
|
||
# What to use for leap second specifications in compiling the default
|
||
# timezone files. Set this to `/dev/null' for no leap second handling as
|
||
# 1003.1 requires, or to `leapseconds' for proper leap second handling.
|
||
# Both zone flavors are always available as `posix/ZONE' and `right/ZONE'.
|
||
# This variable determines the default: if it's `/dev/null',
|
||
# ZONE==posix/ZONE; if it's `leapseconds', ZONE==right/ZONE.
|
||
ifndef leapseconds
|
||
leapseconds = /dev/null
|
||
endif
|
||
|
||
# What timezone's DST rules should be used when a POSIX-style TZ
|
||
# environment variable doesn't specify any rules. For 1003.1 compliance
|
||
# this timezone must use rules that are as U.S. federal law defines DST.
|
||
# Run `make -C time echo-zonenames' to see a list of available zone names.
|
||
# This setting can be changed with `zic -p TIMEZONE' at any time.
|
||
# If you want POSIX.1 compatibility, use `America/New_York'.
|
||
ifndef posixrules
|
||
posixrules = America/New_York
|
||
endif
|
||
|
||
# Where to install the "posixrules" timezone file; this is file
|
||
# whose contents $(posixrules) specifies. If this is a relative
|
||
# pathname, it is relative to $(zonedir).
|
||
ifndef posixrules-file
|
||
posixrules-file = posixrules
|
||
endif
|
||
|
||
|
||
# Directory where your system's native header files live.
|
||
# This is used on Unix systems to generate some GNU libc header files.
|
||
ifndef sysincludedir
|
||
sysincludedir = /usr/include
|
||
endif
|
||
|
||
|
||
# Commands to install files.
|
||
ifndef INSTALL_DATA
|
||
INSTALL_DATA = $(INSTALL) -m 644
|
||
endif
|
||
ifndef INSTALL_PROGRAM
|
||
INSTALL_PROGRAM = $(INSTALL)
|
||
endif
|
||
ifndef INSTALL
|
||
INSTALL = install
|
||
endif
|
||
|
||
|
||
# The name of the C compiler.
|
||
# If you've got GCC, and it works, use it.
|
||
ifeq ($(origin CC),default)
|
||
CC := gcc
|
||
endif
|
||
|
||
# The name of the C compiler to use for compilations of programs to run on
|
||
# the host that is building the library. If you set CC to a
|
||
# cross-compiler, you must set this to the normal compiler.
|
||
ifndef BUILD_CC
|
||
BUILD_CC = $(CC)
|
||
endif
|
||
|
||
# Default flags to pass the C compiler.
|
||
ifndef default_cflags
|
||
default_cflags := -g -O
|
||
endif
|
||
|
||
# Flags to pass the C compiler when assembling preprocessed assembly code
|
||
# (`.S' files). On some systems the assembler doesn't understand the `#' line
|
||
# directives the preprocessor produces. If you have troubling compiling
|
||
# assembly code, try using -P here to suppress these directives.
|
||
ifndef asm-CPPFLAGS
|
||
asm-CPPFLAGS =
|
||
endif
|
||
|
||
# ELF always supports init/fini sections
|
||
ifeq ($(elf),yes)
|
||
have-initfini = yes
|
||
endif
|
||
|
||
# Installed name of the startup code.
|
||
ifneq ($(have-initfini),yes)
|
||
# When not having init/fini, there is just one startfile, called crt0.o.
|
||
start-installed-name = crt0.o
|
||
else
|
||
# On systems having init/fini, crt0.o is called crt1.o, and there are
|
||
# some additional bizarre files.
|
||
start-installed-name = crt1.o
|
||
endif
|
||
|
||
|
||
# Command for linking programs with the C library.
|
||
ifndef +link
|
||
+link = $(CC) -nostdlib -nostartfiles -o $@ \
|
||
$(sysdep-LDFLAGS) $(config-LDFLAGS) $(LDFLAGS) \
|
||
$(addprefix $(csu-objpfx),$(start-installed-name)) \
|
||
$(+preinit) $(+prector) \
|
||
$(filter-out $(addprefix $(csu-objpfx),start.o \
|
||
$(start-installed-name))\
|
||
$(+preinit) $(link-extra-libs) \
|
||
$(common-objpfx)libc% $(+postinit),$^) \
|
||
$(link-extra-libs) $(link-libc) $(+postctor) $(+postinit)
|
||
endif
|
||
ifndef config-LDFLAGS
|
||
ifeq (yes,$(build-shared))
|
||
config-LDFLAGS = -Wl,-dynamic-linker=$(slibdir)/$(rtld-installed-name)
|
||
endif
|
||
endif
|
||
ifndef link-libc
|
||
ifeq (yes,$(build-shared))
|
||
# We need the versioned name of libc.so in the deps of $(others) et al
|
||
# so that the symlink to libc.so is created before anything tries to
|
||
# run the linked programs.
|
||
link-libc = -Wl,-rpath-link=$(rpath-link) \
|
||
$(common-objpfx)libc.so$(libc.so-version) \
|
||
$(elfobjdir)/$(rtld-installed-name) \
|
||
$(common-objpfx)libc.a $(gnulib)
|
||
# Choose the default search path for the dynamic linker based on
|
||
# where we will install libraries.
|
||
ifneq ($(libdir),$(slibdir))
|
||
default-rpath = $(slibdir):$(libdir)
|
||
else
|
||
default-rpath = $(libdir)
|
||
endif
|
||
# This is how to find at build-time things that will be installed there.
|
||
rpath-link = $(common-objdir):$(mathobjdir):$(elfobjdir):$(nssobjdir):$(dbobjdir)
|
||
mathobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)math)
|
||
elfobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)elf)
|
||
nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
|
||
dbobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)db2)
|
||
else
|
||
link-libc = $(common-objpfx)libc.a $(gnulib) $(common-objpfx)libc.a
|
||
endif
|
||
endif
|
||
|
||
ifndef link-extra-libs
|
||
ifeq (yes,$(build-shared))
|
||
ifneq ($(common-objpfx),$(objpfx))
|
||
link-extra-libs = $(foreach lib,$(LDLIBS-$(@F)),\
|
||
$(wildcard $(common-objpfx)$(lib).so$($(notdir $(lib)).so-version) \
|
||
$(objpfx)$(lib).so$($(notdir $(lib)).so-version)))
|
||
else
|
||
link-extra-libs = $(foreach lib,$(LDLIBS-$(@F)),$(common-objpfx)$(lib).so$($(notdir $(lib)).so-version))
|
||
endif
|
||
else
|
||
link-extra-libs = $(foreach lib,$(LDLIBS-$(@F)),$(common-objpfx)$(lib).a)
|
||
endif
|
||
endif
|
||
ifndef gnulib
|
||
gnulib := -lgcc
|
||
endif
|
||
ifeq ($(elf),yes)
|
||
+preinit = $(addprefix $(csu-objpfx),crti.o)
|
||
+postinit = $(addprefix $(csu-objpfx),crtn.o)
|
||
+prector = `$(CC) --print-file-name=crtbegin.o`
|
||
+postctor = `$(CC) --print-file-name=crtend.o`
|
||
endif
|
||
csu-objpfx = $(common-objpfx)csu/
|
||
elf-objpfx = $(common-objpfx)elf/
|
||
db-objpfx = $(common-objpfx)db/
|
||
|
||
# How to run a program we just linked with our library.
|
||
# The program binary is assumed to be $(word 2,$^).
|
||
built-program-file = $(dir $(word 2,$^))$(notdir $(word 2,$^))
|
||
ifneq (yes,$(build-shared))
|
||
built-program-cmd = $(built-program-file)
|
||
else
|
||
comma = ,
|
||
sysdep-library-path = \
|
||
$(subst $(empty) ,:,$(strip $(patsubst -Wl$(comma)-rpath-link=%, %,\
|
||
$(filter -Wl$(comma)-rpath-link=%,\
|
||
$(sysdep-LDFLAGS)))))
|
||
define built-program-cmd
|
||
LD_LIBRARY_PATH=$(rpath-link)$(patsubst %,:%,$(sysdep-library-path)) \
|
||
$(elf-objpfx)$(rtld-installed-name) $(built-program-file)
|
||
endef
|
||
endif
|
||
|
||
ifndef LD
|
||
LD := ld -X
|
||
endif
|
||
|
||
ifndef RANLIB
|
||
RANLIB = ranlib
|
||
endif
|
||
|
||
# Extra flags to pass to GCC.
|
||
+gccwarn := -Wall -Wwrite-strings -Wno-parentheses -Winline -Wstrict-prototypes
|
||
|
||
# This is the program that generates makefile
|
||
# dependencies from C source files.
|
||
ifndef +mkdep
|
||
+mkdep = $(CC) -M
|
||
endif
|
||
|
||
# The program that makes Emacs-style TAGS files.
|
||
ETAGS := etags -T
|
||
|
||
# The `m4' macro processor; this is used by sysdeps/sparc/Makefile (and
|
||
# perhaps others) to preprocess assembly code in some cases.
|
||
M4 = m4
|
||
|
||
####
|
||
#### End of configuration variables.
|
||
####
|
||
|
||
# This tells some versions of GNU make before 3.63 not to export all variables.
|
||
.NOEXPORT:
|
||
|
||
# We want to echo the commands we're running without
|
||
# umpteen zillion filenames along with it (we use `...' instead)
|
||
# but we don't want this echoing done when the user has said
|
||
# he doesn't want to see commands echoed by using -s.
|
||
ifneq "$(findstring s,$(MAKEFLAGS))" "" # if -s
|
||
+cmdecho := echo >/dev/null
|
||
else # not -s
|
||
+cmdecho := echo
|
||
endif # -s
|
||
|
||
# These are the flags given to the compiler to tell
|
||
# it what sort of optimization and/or debugging output to do.
|
||
ifndef +cflags
|
||
# If `CFLAGS' was defined, use that.
|
||
ifdef CFLAGS
|
||
+cflags := $(filter-out -I%,$(CFLAGS))
|
||
endif # CFLAGS
|
||
endif # +cflags
|
||
|
||
# If none of the above worked, default to "-g -O".
|
||
ifeq "$(strip $(+cflags))" ""
|
||
+cflags := $(default_cflags)
|
||
endif # $(+cflags) == ""
|
||
|
||
+cflags := $(+cflags) $(+gccwarn)
|
||
+gcc-nowarn := -w
|
||
|
||
# Don't duplicate options if we inherited variables from the parent.
|
||
+cflags := $(sort $(+cflags))
|
||
|
||
|
||
# These are flags given to the C compiler to tell it to look for include
|
||
# files (including ones given in angle brackets) in the current directory,
|
||
# in the parent library source directory and in the include directory.
|
||
# `+sysdep-includes' will be defined by Makerules.
|
||
+includes = -I. $(patsubst %/,-I%,$(objpfx)) $(patsubst %/,-I%,$(..)) \
|
||
-I$(..)include $($(stdio)-include) $(includes) \
|
||
$(+sysdep-includes) $(last-includes)
|
||
|
||
# Since libio has several internal header files, we use a -I instead
|
||
# of many little headers in the include directory.
|
||
libio-include = -I$(..)libio
|
||
|
||
# These are the variables that the implicit compilation rules use.
|
||
CPPFLAGS = $(+includes) $(defines) -include $(..)include/libc-symbols.h \
|
||
$(sysdep-CPPFLAGS) $(CPPFLAGS-$(suffix $@)) $(CPPFLAGS-$(<F)) \
|
||
$(CPPFLAGS-$(@F))
|
||
override CFLAGS = $(+cflags) $(sysdep-CFLAGS) $(CFLAGS-$(suffix $@)) \
|
||
$(CFLAGS-$(<F)) $(CFLAGS-$(@F))
|
||
|
||
|
||
# This is the macro that the implicit linking rules use.
|
||
ifneq "$(filter -g,$(+cflags))" "" # -g is in $(+cflags)
|
||
LDFLAGS := -g
|
||
endif
|
||
|
||
|
||
# If everything is compiled with -fPIC (implicitly) we must tell this by
|
||
# defining the PIC symbol.
|
||
ifeq (yes,$(build-pic-default))
|
||
pic-default = -DPIC
|
||
endif
|
||
|
||
# Enable object files for different versions of the library.
|
||
# Various things use $(object-suffixes) to know what all to make.
|
||
# The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
|
||
# to pass different flags for each flavor.
|
||
libtypes = $(foreach o,$(object-suffixes),$(libtype$o))
|
||
all-object-suffixes := .o .os .op .og .ob
|
||
object-suffixes :=
|
||
ifeq (yes,$(build-static))
|
||
CPPFLAGS-.o = $(pic-default)
|
||
libtype.o := lib%.a
|
||
object-suffixes += .o
|
||
endif
|
||
ifeq (yes,$(build-shared))
|
||
# Under --enable-shared, we will build a shared library of PIC objects.
|
||
# The PIC object files are named foo.os.
|
||
object-suffixes += .os
|
||
CPPFLAGS-.os = -DPIC
|
||
CFLAGS-.os = $(pic-ccflag) -fno-common
|
||
libtype.os := lib%_pic.a
|
||
# This can be changed by a sysdep makefile
|
||
pic-ccflag = -fPIC
|
||
endif
|
||
ifeq (yes,$(build-profile))
|
||
# Under --enable-profile, we will build a static library of profiled objects.
|
||
# The profiled object files are named foo.op.
|
||
object-suffixes += .op
|
||
CPPFLAGS-.op = -DPROF $(pic-default)
|
||
CFLAGS-.op = -pg
|
||
libtype.op = lib%_p.a
|
||
endif
|
||
ifeq (yes,$(build-omitfp))
|
||
# Under --enable-omitfp, we build an the library optimized without
|
||
# debugging information using -fomit-frame-pointer, and build an extra
|
||
# library with debugging information. The debuggable objects are named foo.og.
|
||
object-suffixes += .og
|
||
CPPFLAGS-.og = $(pic-default)
|
||
CFLAGS-.og = -g
|
||
CFLAGS-.o = -g0 -O99 -fomit-frame-pointer -D__USE_STRING_INLINES
|
||
CFLAGS-.os += $(CFLAGS-.o)
|
||
libtype.og = lib%_g.a
|
||
endif
|
||
ifeq (yes,$(build-bounded))
|
||
# Under --enable-bounded, we build the library with `-fbounded-pointers -g'
|
||
# to runtime bounds checking. The bounded-pointer objects are named foo.ob.
|
||
object-suffixes += .ob
|
||
CPPFLAGS-.ob = -DBOUNDED_POINTERS $(pic-default)
|
||
CFLAGS-.ob = -g -fbounded-pointers
|
||
libtype.ob = lib%_b.a
|
||
endif
|
||
|
||
|
||
+gnu-stabs = $(shell echo>&2 '*** BARF ON ME')
|
||
|
||
ifndef BUILD_CC
|
||
BUILD_CC = $(CC)
|
||
endif
|
||
|
||
# Figure out the version numbers from version.h.
|
||
|
||
$(common-objpfx)version.mk: $(..)version.h $(..)Makeconfig
|
||
sed -n -e 's/^.*RELEASE.*"\([^"]*\)".*$$/release=\1/p' \
|
||
-e 's/^.*VERSION.*"\([^"]*\)".*$$/version=\1/p' \
|
||
< $< > $@-new
|
||
mv -f $@-new $@
|
||
|
||
common-generated += version.mk
|
||
|
||
ifeq (yes, $(build-shared))
|
||
|
||
# Process the shlib-versions file, which tells us what shared library
|
||
# version numbers to use when we install shared objects on this system.
|
||
-include $(common-objpfx)soversions.mk
|
||
$(common-objpfx)soversions.mk: $(..)shlib-versions $(..)Makeconfig \
|
||
$(wildcard $(patsubst %, $(..)%/shlib-versions,\
|
||
$(add-ons))) \
|
||
$(common-objpfx)config.make
|
||
(file="$(wildcard $(patsubst %,$(..)%/shlib-versions,$(add-ons))) \
|
||
$(..)shlib-versions"; \
|
||
for f in $$file; do \
|
||
sed 's/#.*$$//' $$f | while read conf versions; do \
|
||
test -n "$$versions" && \
|
||
test `expr '$(config-machine)-$(config-vendor)-$(config-os)' \
|
||
: "$$conf"` != 0 || continue; \
|
||
for v in $$versions; do \
|
||
lib=`echo $$v | sed 's/=.*$$//'`; \
|
||
if eval "test -z \"\$$vers_lib$$lib\""; then \
|
||
eval vers_lib$${lib}=yes; \
|
||
number=`echo $$v | sed "s/^.*=//"`; \
|
||
case $$number in \
|
||
[0-9]*) echo "$$lib.so-version=.$$number"; \
|
||
echo "all-sonames+=$$lib.so\$$($$lib.so-version)";;\
|
||
*) echo "$$lib.so-version=$$number"; \
|
||
echo "all-sonames+=\$$($$lib.so-version)";; \
|
||
esac; \
|
||
fi; \
|
||
done; \
|
||
done; \
|
||
done;) > $@T; exit 0
|
||
mv -f $@T $@
|
||
|
||
# Get $(version) defined with the release version number.
|
||
-include $(common-objpfx)version.mk
|
||
|
||
# Generate the header containing the names of all shared libraries.
|
||
# We use a stamp file to avoid uncessary recompilations.
|
||
before-compile += $(common-objpfx)gnu/lib-names.h
|
||
$(common-objpfx)gnu/lib-names.h: $(common-objpfx)gnu/lib-names.stmp
|
||
$(common-objpfx)gnu/lib-names.stmp: $(common-objpfx)soversions.mk
|
||
$(make-target-directory)
|
||
@rm -f ${@:stmp=T} $@
|
||
(echo '/* This file is automatically generated.';\
|
||
echo ' It defines macros to allow user program to find the shared';\
|
||
echo ' library files which come as part of GNU libc. */';\
|
||
echo '#ifndef __GNU_LIB_NAMES_H'; \
|
||
echo '#define __GNU_LIB_NAMES_H 1'; \
|
||
echo; \
|
||
(libs='$(all-sonames)';\
|
||
for l in $$libs; do \
|
||
upname=`echo $$l | sed 's/[.]so.*//' | \
|
||
tr 'abcdefghijklmnopqrstuvwxyz-' \
|
||
'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`; \
|
||
echo "#define $${upname}_SO \"$$l\""; \
|
||
done;) | sort; \
|
||
echo; \
|
||
echo '#endif /* gnu/lib-names.h */';) > ${@:stmp=T}
|
||
if test -r ${@:stmp=h} && cmp -s ${@:stmp=h} ${@:stmp=T}; \
|
||
then rm -f ${@:stmp=T}; \
|
||
else mv -f ${@:stmp=T} ${@:stmp=h}; fi
|
||
touch $@
|
||
|
||
common-generated += gnu/lib-names.h gnu/lib-names.stmp
|
||
|
||
# The name under which the run-time dynamic linker is installed.
|
||
# We are currently going for the convention that `/lib/ld.so.1'
|
||
# names the SVR4/ELF ABI-compliant dynamic linker.
|
||
ifndef rtld-installed-name
|
||
ifdef ld.so-version
|
||
rtld-installed-name = $(ld.so-version)
|
||
else
|
||
rtld-installed-name = ld.so.1
|
||
endif
|
||
endif
|
||
|
||
ifndef rtld-version-installed-name
|
||
rtld-version-installed-name = ld-$(version).so
|
||
endif
|
||
|
||
endif # build-shared
|
||
|
||
endif # Makeconfig not yet included
|