mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-14 17:11:06 +00:00
aa32f79837
* include/stdlib.h (__libc_drand48_data): Declare as hidden. * stdlib/drand48.c: Remove declaration of __libc_drand48_data here. * stdlib/erand48.c: Likewise. * stdlib/jrand48.c: Likewise. * stdlib/lcong48.c: Likewise. * stdlib/lrand48.c: Likewise. * stdlib/mrand48.c: Likewise. * stdlib/nrand48.c: Likewise. * stdlib/seed48.c: Likewise. * stdlib/srand48.c: Likewise. * stdio-common/_itoa.c (_itoa_base_table): Declare as hidden. (_itoa_lower_digits_internal): New declaration. (_itoa_upper_digits_internal): New declaration. (_itoa): Use INTUSE to acces _itoa_upper_digits and _itoa_lower_digits. * stdio-common.h (_itoa_lower_digits_internal): New declaration. (_itoa_upper_digits_internal): New declaration. (_itoa_word): Use INTUSE to acces _itoa_upper_digits and _itoa_lower_digits. * stdio-common/itoa-digits.c: Use INTVARDEF with _itoa_lower_digits. * stdio-common/itoa-udigits.c: Use INTVARDEF with _itoa_upper_digits. * elf/dl-minimal.c (_itoa): Declare _itoa_lower_digits as hidden. * elf/dl-reloc.c (_dl_reloc_bad_type): Likewise. * stdio-common/_itowa.c (_itoa_base_table): Declare as hidden. (_itowa_lower_digits): Likewise. (_itowa_upper_digits): Likewise. * stdio-common/_itowa.h (_itowa_lower_digits): Likewise. (_itowa_upper_digits): Likewise. * intl/plural-exp.h (attribute_hidden): Define as empty macro if not already defined. (GERMANIC_PLURAL): Declare as hidden. * posix/getopt.c (__getopt_initialized): Declare as hidden. (attribute_hidden): Define as empty macro if not already defined. * iconv/gconv_int.h (__gconv_path_elem): Declare hidden. (__gconv_max_path_elem_len): Likewise. (__gconv_path_envvar): Likewise. * math/Makefile (gmp-objs): Remove mp_clz_tab. * stdlib/Makefile (aux): Remove mp_clz_tab. * stdlib/mp_clz_tab.c: Removed. Not needed anywhere. * stdlib/exit.h (__exit_funcs): Declare as hidden.
171 lines
5.7 KiB
Makefile
171 lines
5.7 KiB
Makefile
# Copyright (C) 1991-1999, 2000, 2001, 2002 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 Lesser General Public
|
|
# License as published by the Free Software Foundation; either
|
|
# version 2.1 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
|
|
# Lesser General Public License for more details.
|
|
|
|
# You should have received a copy of the GNU Lesser General Public
|
|
# License along with the GNU C Library; if not, write to the Free
|
|
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
|
# 02111-1307 USA.
|
|
|
|
#
|
|
# Makefile for stdlib routines
|
|
#
|
|
subdir := stdlib
|
|
|
|
headers := stdlib.h alloca.h monetary.h fmtmsg.h ucontext.h sys/ucontext.h \
|
|
inttypes.h stdint.h bits/wordsize.h bits/wchar.h
|
|
|
|
routines := \
|
|
atof atoi atol atoll \
|
|
abort \
|
|
bsearch qsort msort \
|
|
getenv putenv setenv secure-getenv \
|
|
exit on_exit atexit cxa_atexit cxa_finalize old_atexit \
|
|
abs labs llabs \
|
|
div ldiv lldiv \
|
|
mblen mbstowcs mbtowc wcstombs wctomb \
|
|
random random_r rand rand_r \
|
|
drand48 erand48 lrand48 nrand48 mrand48 jrand48 \
|
|
srand48 seed48 lcong48 \
|
|
drand48_r erand48_r lrand48_r nrand48_r mrand48_r jrand48_r \
|
|
srand48_r seed48_r lcong48_r \
|
|
drand48-iter \
|
|
strtol strtoul strtoll strtoull \
|
|
strtol_l strtoul_l strtoll_l strtoull_l \
|
|
strtof strtod strtold \
|
|
strtof_l strtod_l strtold_l \
|
|
system canonicalize \
|
|
a64l l64a \
|
|
rpmatch strfmon strfmon_l getsubopt xpg_basename fmtmsg \
|
|
strtoimax strtoumax wcstoimax wcstoumax \
|
|
getcontext setcontext makecontext swapcontext
|
|
|
|
# These routines will be omitted from the libc shared object.
|
|
# Instead the static object files will be included in a special archive
|
|
# linked against when the shared library will be used.
|
|
static-only-routines = atexit
|
|
|
|
distribute := exit.h grouping.h abort-instr.h isomac.c tst-fmtmsg.sh
|
|
test-srcs := tst-fmtmsg
|
|
tests := tst-strtol tst-strtod testmb testrand testsort testdiv \
|
|
test-canon test-canon2 tst-strtoll tst-environ \
|
|
tst-xpg-basename tst-random tst-bsearch tst-limits \
|
|
tst-rand48 bug-strtod tst-setcontext test-a64l tst-qsort
|
|
|
|
|
|
# Several mpn functions from GNU MP are used by the strtod function.
|
|
mpn-routines := inlines add_n addmul_1 cmp divmod_1 divrem udiv_qrnnd \
|
|
lshift rshift mod_1 mul mul_1 mul_n sub_n submul_1
|
|
mpn-headers = longlong.h gmp.h gmp-impl.h gmp-mparam.h asm-syntax.h
|
|
|
|
routines := $(strip $(routines) $(mpn-routines)) \
|
|
dbl2mpn ldbl2mpn \
|
|
mpn2flt mpn2dbl mpn2ldbl
|
|
# mp_clz seems not to be used. At least on x86. If removing the file
|
|
# does not cause problem clean this up and actually remove the file.
|
|
aux := fpioconst# mp_clz_tab
|
|
distribute := $(distribute) $(mpn-headers) gen-mpn-copy fpioconst.h
|
|
|
|
generated += isomac isomac.out
|
|
|
|
CFLAGS-bsearch.c = $(exceptions)
|
|
CFLAGS-msort.c = $(exceptions)
|
|
CFLAGS-qsort.c = $(exceptions)
|
|
|
|
include ../Makeconfig
|
|
|
|
ifneq (,$(filter %REENTRANT, $(defines)))
|
|
CFLAGS-strfmon.c = -D_IO_MTSAFE_IO
|
|
CFLAGS-strfmon_l.c = -D_IO_MTSAFE_IO
|
|
endif
|
|
|
|
ifeq (yes,$(have-protected))
|
|
CFLAGS-atexit.c = -DHAVE_DOT_HIDDEN
|
|
endif
|
|
|
|
include ../Rules
|
|
|
|
|
|
ifdef gmp-srcdir
|
|
|
|
gmp-srcdir := $(firstword $(filter-out ..//%,$(..)$(gmp-srcdir) $(gmp-srcdir)))
|
|
|
|
# Copy the mpn source files we use from the GNU MP source directory.
|
|
# `gmp-srcdir' is set by doing `configure --with-gmp=DIR'.
|
|
# (Do not try this at home. You need an as yet unreleased version of GNU MP.)
|
|
|
|
mpn-sysdep := $(addsuffix .c,$(mpn-routines)) \
|
|
$(addsuffix .S,$(mpn-routines)) \
|
|
$(addsuffix .s,$(mpn-routines)) gmp-mparam.h asm-syntax.h
|
|
|
|
mpn-try := $(addprefix $(gmp-srcdir)/mpn/*/,$(mpn-sysdep)) \
|
|
$(addprefix $(gmp-srcdir)/mpn/*/*/,$(mpn-sysdep))
|
|
mpn-found = $(wildcard $(mpn-try))
|
|
|
|
include mpn-copy.mk
|
|
%.mk: gen-%; sh $< > $@
|
|
|
|
mpn-copy-1 := $(patsubst $(gmp-srcdir)/mpn/%,$(sysdep_dir)/%,$(mpn-found))
|
|
mpn-copy-sysdep := $(mpn-copy-sysdep) $(mpn-copy-1)
|
|
mpn-copy-sysdep := $(filter $(addsuffix %,\
|
|
$(wildcard $(sort $(dir $(mpn-copy-sysdep))))), \
|
|
$(mpn-copy-sysdep))
|
|
$(mpn-copy-1): $(sysdep_dir)/%: $(ignore gmp2glibc.sed) $(gmp-srcdir)/mpn/%
|
|
$(gmp2glibc)
|
|
|
|
mpn-stuff = $(mpn-copy-sysdep) $(mpn-copy)
|
|
|
|
# chmod so I don't edit them by mistake.
|
|
define gmp2glibc
|
|
$(ignore sed -f $^ > $@-tmp)
|
|
cp $< $@-tmp
|
|
chmod a-w $@-tmp
|
|
mv -f $@-tmp $@
|
|
endef
|
|
|
|
mpn-copy = $(filter-out $(mpn-sysdep),$(mpn-headers))# mp_clz_tab.c)
|
|
$(mpn-copy): %: $(ignore gmp2glibc.sed) $(gmp-srcdir)/%; $(gmp2glibc)
|
|
|
|
.PHONY: copy-mpn clean-mpn mpn-stuff
|
|
mpn-stuff: $(mpn-stuff)
|
|
copy-mpn: $(mpn-stuff)
|
|
ifeq ($(with-cvs),yes)
|
|
test ! -d CVS || cvs $(CVSOPTS) commit -m'Updated from $(gmp-srcdir)' $+
|
|
endif
|
|
clean-mpn:
|
|
rm -f $(mpn-stuff)
|
|
|
|
endif
|
|
|
|
# Testdir has to be named stdlib and needs to be writable
|
|
test-canon-ARGS = --test-dir=${common-objpfx}stdlib
|
|
|
|
tst-strtod-ENV = LOCPATH=$(common-objpfx)localedata
|
|
|
|
# Run a test on the header files we use.
|
|
tests: $(objpfx)isomac.out
|
|
|
|
ifeq (no,$(cross-compiling))
|
|
tests: $(objpfx)tst-fmtmsg.out
|
|
endif
|
|
|
|
$(objpfx)isomac.out: $(objpfx)isomac
|
|
$(dir $<)$(notdir $<) '$(CC)' \
|
|
'-I../include -I.. $(+sysdep-includes) $(sysincludes)' > $<.out
|
|
|
|
isomac-CFLAGS = -O
|
|
$(objpfx)isomac: isomac.c
|
|
$(native-compile)
|
|
|
|
$(objpfx)tst-fmtmsg.out: tst-fmtmsg.sh $(objpfx)tst-fmtmsg
|
|
$(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)stdlib/
|