mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-26 06:50:07 +00:00
9cd4747089
The current scheme to identify which module a translation unit is built in depends on defining multiple macros IS_IN_* and also defining NOT_IN_libc if we're building a non-libc module. In addition, there is an IN_LIB macro that does effectively the same thing, but for different modules (notably the systemtap probes). This macro scheme unifies both ideas to use just one macro IN_MODULE and assign it a value depending on the module it is being built into. If the module is not defined, it defaults to MODULE_libc. Patches that follow will replace uses of IS_IN_* variables with the IS_IN() macro. libc-symbols.h has been converted already to give an example of how such a transition will look. Verified that there are no relevant binary changes. One source change that will crop up repeatedly is that of nscd_stat, since it uses the build timestamp as a constant in its logic. * Makeconfig (in-module): Get value of libof set for the translation unit. (CPPFLAGS): Use $(in-module). * Makerules: Don't suffix routine names for nonlib. * include/libc-modules.h: New file. * include/libc-symbols.h: Include libc-modules.h (IS_IN): New macro to replace IS_IN_* macros. * elf/Makefile: Set libof-* for each routine. * elf/rtld-Rules: Likewise. * extra-modules.mk: Likewise. * iconv/Makefile: Likewise. * iconvdata/Makefile: Likewise. * locale/Makefile: Likewise. * malloc/Makefile: Likewise. * nss/Makefile: Likewise. * sysdeps/gnu/Makefile: Likewise. * sysdeps/ieee754/ldbl-opt/Makefile: Likewise. * sysdeps/unix/sysv/linux/Makefile: Likewise. * sysdeps/s390/s390-64/Makefile: Likewise. * nscd/Makefile: Set libof-* for each routine. Set CFLAGS and CPPFLAGS for nscd instead of nonlib.
93 lines
3.0 KiB
Makefile
93 lines
3.0 KiB
Makefile
pic-ccflag = -fpic
|
|
|
|
ifeq ($(subdir),gmon)
|
|
sysdep_routines += s390x-mcount
|
|
endif
|
|
|
|
ifeq ($(subdir),elf)
|
|
CFLAGS-rtld.c += -Wno-uninitialized -Wno-unused
|
|
CFLAGS-dl-load.c += -Wno-unused
|
|
CFLAGS-dl-reloc.c += -Wno-unused
|
|
endif
|
|
|
|
ifeq ($(subdir),iconvdata)
|
|
ISO-8859-1_CP037_Z900-routines := iso-8859-1_cp037_z900
|
|
ISO-8859-1_CP037_Z900-map := gconv.map
|
|
|
|
UTF8_UTF32_Z9-routines := utf8-utf32-z9
|
|
UTF8_UTF32_Z9-map := gconv.map
|
|
|
|
UTF16_UTF32_Z9-routines := utf16-utf32-z9
|
|
UTF16_UTF32_Z9-map := gconv.map
|
|
|
|
UTF8_UTF16_Z9-routines := utf8-utf16-z9
|
|
UTF8_UTF16_Z9-map := gconv.map
|
|
|
|
s390x-iconv-modules = ISO-8859-1_CP037_Z900 UTF8_UTF16_Z9 UTF16_UTF32_Z9 UTF8_UTF32_Z9
|
|
|
|
extra-modules-left += $(s390x-iconv-modules)
|
|
include extra-module.mk
|
|
|
|
cpp-srcs-left := $(foreach mod,$(s390x-iconv-modules),$($(mod)-routines))
|
|
lib := iconvdata
|
|
include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
|
|
|
|
extra-objs += $(addsuffix .so, $(s390x-iconv-modules))
|
|
install-others += $(patsubst %, $(inst_gconvdir)/%.so, $(s390x-iconv-modules))
|
|
|
|
$(patsubst %, $(inst_gconvdir)/%.so, $(s390x-iconv-modules)) : \
|
|
$(inst_gconvdir)/%.so: $(objpfx)%.so $(+force)
|
|
$(do-install-program)
|
|
|
|
$(objpfx)gconv-modules-s390: gconv-modules $(+force)
|
|
cp $< $@
|
|
echo >> $@
|
|
echo "# S/390 hardware accelerated modules" >> $@
|
|
echo -n "module ISO-8859-1// IBM037// " >> $@
|
|
echo " ISO-8859-1_CP037_Z900 1" >> $@
|
|
echo -n "module IBM037// ISO-8859-1// " >> $@
|
|
echo " ISO-8859-1_CP037_Z900 1" >> $@
|
|
echo -n "module ISO-10646/UTF8/ UTF-32// " >> $@
|
|
echo " UTF8_UTF32_Z9 1" >> $@
|
|
echo -n "module UTF-32BE// ISO-10646/UTF8/ " >> $@
|
|
echo " UTF8_UTF32_Z9 1" >> $@
|
|
echo -n "module ISO-10646/UTF8/ UTF-32BE// " >> $@
|
|
echo " UTF8_UTF32_Z9 1" >> $@
|
|
echo -n "module UTF-16BE// UTF-32// " >> $@
|
|
echo " UTF16_UTF32_Z9 1" >> $@
|
|
echo -n "module UTF-32BE// UTF-16// " >> $@
|
|
echo " UTF16_UTF32_Z9 1" >> $@
|
|
echo -n "module INTERNAL UTF-16// " >> $@
|
|
echo " UTF16_UTF32_Z9 1" >> $@
|
|
echo -n "module UTF-32BE// UTF-16BE// " >> $@
|
|
echo " UTF16_UTF32_Z9 1" >> $@
|
|
echo -n "module INTERNAL UTF-16BE// " >> $@
|
|
echo " UTF16_UTF32_Z9 1" >> $@
|
|
echo -n "module UTF-16BE// UTF-32BE// " >> $@
|
|
echo " UTF16_UTF32_Z9 1" >> $@
|
|
echo -n "module UTF-16BE// INTERNAL " >> $@
|
|
echo " UTF16_UTF32_Z9 1" >> $@
|
|
echo -n "module UTF-16BE// ISO-10646/UTF8/ " >> $@
|
|
echo " UTF8_UTF16_Z9 1" >> $@
|
|
echo -n "module ISO-10646/UTF8/ UTF-16// " >> $@
|
|
echo " UTF8_UTF16_Z9 1" >> $@
|
|
echo -n "module ISO-10646/UTF8/ UTF-16BE// " >> $@
|
|
echo " UTF8_UTF16_Z9 1" >> $@
|
|
|
|
$(inst_gconvdir)/gconv-modules: $(objpfx)gconv-modules-s390 $(+force)
|
|
$(do-install)
|
|
ifeq (no,$(cross-compiling))
|
|
# Update the $(prefix)/lib/gconv/gconv-modules.cache file. This is necessary
|
|
# if this libc has more gconv modules than the previously installed one.
|
|
if test -f "$(inst_gconvdir)/gconv-modules.cache"; then \
|
|
LC_ALL=C \
|
|
$(rtld-prefix) \
|
|
$(common-objpfx)iconv/iconvconfig \
|
|
$(addprefix --prefix=,$(install_root)); \
|
|
fi
|
|
else
|
|
@echo '*@*@*@ You should recreate $(inst_gconvdir)/gconv-modules.cache'
|
|
endif
|
|
|
|
endif
|