summaryrefslogtreecommitdiff
path: root/Makeconfig
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1995-10-25 02:19:39 +0000
committerRoland McGrath <roland@gnu.org>1995-10-25 02:19:39 +0000
commit03a75825763563a80bb35d89688d8b0d451e11f2 (patch)
tree086c5a961b1cfbcd381342f66f5306fcbfd2bbe9 /Makeconfig
parente97ec51d01087c2f8468a1bf83cfdb26b7040c30 (diff)
* 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.
Diffstat (limited to 'Makeconfig')
-rw-r--r--Makeconfig17
1 files changed, 17 insertions, 0 deletions
diff --git a/Makeconfig b/Makeconfig
index cbb2db0102..47c48d4615 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