+2015-06-10 Dmitry V. Levin <ldv@altlinux.org>
+
+ * Makeconfig (+interp): Remove unused variable.
+ * elf/Makefile ($(objpfx)interp.os): Define for [$(build-shared) = yes]
+ only. Depend on $(common-objpfx)runtime-linker.h instead of
+ $(elf-objpfx)runtime-linker.h.
+ ($(elf-objpfx)runtime-linker.h): Rename to
+ $(common-objpfx)runtime-linker.h and move ...
+ * Makerules [$(build-shared) = yes]: ... here.
+ * elf/interp.c: Include <runtime-linker.h> instead of
+ <elf/runtime-linker.h>.
+
2015-06-09 Adhemerval Zanella <adhemerval.zanella@linaro.org>
* sysdeps/unix/sysv/linux/i386/gettimeofday.c
# Variants of the two previous definitions for statically linking programs.
+prectorT = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtbeginT.o`
+postctorT = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtend.o`
-+interp = $(addprefix $(elf-objpfx),interp.os)
csu-objpfx = $(common-objpfx)csu/
elf-objpfx = $(common-objpfx)elf/
common-generated += $(common-objpfx)libc-abis.h
endif # avoid-generated
+ifeq (yes,$(build-shared))
+$(common-objpfx)runtime-linker.h: $(common-objpfx)runtime-linker.stamp; @:
+$(common-objpfx)runtime-linker.stamp: $(common-objpfx)config.make
+ $(make-target-directory)
+ echo '#define RUNTIME_LINKER "$(rtlddir)/$(rtld-installed-name)"' \
+ > ${@:stamp=T}
+ $(move-if-change) ${@:stamp=T} ${@:stamp=h}
+ touch $@
+endif
+
# Make sure the subdirectory for object files gets created.
ifdef objpfx
ifeq (,$(wildcard $(objpfx).))
| $(AWK) '($$7 ~ /^UND(|EF)$$/ && $$1 != "0:" && $$4 != "REGISTER") { print; p=1 } END { exit p != 0 }'
mv -f $@.new $@
+ifeq (yes,$(build-shared))
# interp.c exists just to get the runtime linker path into libc.so.
-$(objpfx)interp.os: $(elf-objpfx)runtime-linker.h
-
-$(elf-objpfx)runtime-linker.h: $(elf-objpfx)runtime-linker.st; @:
-$(elf-objpfx)runtime-linker.st: $(common-objpfx)config.make
- $(make-target-directory)
- echo '#define RUNTIME_LINKER "$(rtlddir)/$(rtld-installed-name)"' \
- > ${@:st=T}
- $(move-if-change) ${@:st=T} ${@:st=h}
- touch $@
+$(objpfx)interp.os: $(common-objpfx)runtime-linker.h
+endif
ifneq (ld.so,$(rtld-installed-name))
# Make sure ld.so.1 exists in the build directory so we can link
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <elf/runtime-linker.h>
+#include <runtime-linker.h>
const char __invoke_dynamic_linker__[] __attribute__ ((section (".interp")))
= RUNTIME_LINKER;