diff options
Diffstat (limited to 'elf')
-rw-r--r-- | elf/Makefile | 7 | ||||
-rw-r--r-- | elf/rtld-Rules | 5 |
2 files changed, 11 insertions, 1 deletions
diff --git a/elf/Makefile b/elf/Makefile index 34f0b1f..f013c22 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -436,7 +436,8 @@ $(objpfx)ldconfig: $(ldconfig-modules:%=$(objpfx)%.o) SYSCONF-FLAGS := -D'SYSCONFDIR="$(sysconfdir)"' CFLAGS-ldconfig.c = $(SYSCONF-FLAGS) -D'LIBDIR="$(libdir)"' \ - -D'SLIBDIR="$(slibdir)"' -DIS_IN_ldconfig=1 + -D'SLIBDIR="$(slibdir)"' -DIS_IN_ldconfig=1 -DNOT_IN_libc=1 +libof-ldconfig = ldconfig CFLAGS-dl-cache.c = $(SYSCONF-FLAGS) CFLAGS-cache.c = $(SYSCONF-FLAGS) CFLAGS-rtld.c = $(SYSCONF-FLAGS) @@ -444,6 +445,10 @@ CFLAGS-rtld.c = $(SYSCONF-FLAGS) CPPFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\ -DNOT_IN_libc=1 -DIS_IN_rtld=1 -DIN_LIB=rtld) +cpp-srcs-left := $(all-rtld-routines:=.os) +lib := rtld +include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left)) + test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(strip $(modules-names)))) generated += $(addsuffix .so,$(strip $(modules-names))) diff --git a/elf/rtld-Rules b/elf/rtld-Rules index 0a5d6af..f2cc4a1 100644 --- a/elf/rtld-Rules +++ b/elf/rtld-Rules @@ -138,6 +138,11 @@ ifdef rtld-depfiles -include $(rtld-depfiles) endif +# Set libof-* for each routine. +cpp-srcs-left := $(rtld-modules:%.os=%) +lib := rtld +include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left)) + # This here is the whole point of all the shenanigans. rtld-CPPFLAGS := -DNOT_IN_libc=1 -DIS_IN_rtld=1 -DIN_LIB=rtld |