From 03a75825763563a80bb35d89688d8b0d451e11f2 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 25 Oct 1995 02:19:39 +0000 Subject: * sysdeps/unix/sysv/linux/i386/sysdep.h (SYSCALL_ERROR_HANDLER): New macro. (PSEUDO): Use it instead of SYSCALL_PIC_SETUP and jmp syscall_error. * sysdeps/unix/sysv/linux/i386/sysdep.S (__syscall_error): Define only #ifndef PIC. * Makeconfig (built-program-cmd): New variable. * sunrpc/Makefile (rpcgen-cmd): Use $(built-program-cmd). * time/Makefile (zic-cmd): Likewise. * hurd/Makefile (user-interfaces): Add hurd/exec_startup. --- Makeconfig | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'Makeconfig') diff --git a/Makeconfig b/Makeconfig index cbb2db0..47c48d4 100644 --- a/Makeconfig +++ b/Makeconfig @@ -301,8 +301,10 @@ ifeq ($(elf),yes) endif ifdef objpfx csu-objpfx = $(objpfx) +elf-objpfx = $(objpfx) else csu-objpfx = $(..)csu/ +elf-objpfx = $(..)elf/ endif ifeq (yes,$(build-shared)) @@ -311,6 +313,21 @@ rtld-installed-name = ld.so endif endif +# 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 +, = , +define built-program-cmd +LD_LIBRARY_PATH=$(common-objdir)$(patsubst -Wl$,-rpath-link=%,:%,\ + $(filter -Wl$,-rpath-link=%,\ + $(sysdep-LDFLAGS))) \ +$(elf-objpfx)ld.so $(built-program-file) +endef +endif + ifndef LD LD := ld -X endif -- cgit v1.1