From dc75a614e2b5408c40b7c409d926d47ab90ab8d8 Mon Sep 17 00:00:00 2001 From: lukem Date: Fri, 28 Dec 2001 05:44:22 +0000 Subject: [PATCH] - Allow RTLD_DEFAULT_LIBRARY_PATH to be overridden. - If ${SHLIBDIR} != ${LIBDIR}, then set RTLD_DEFAULT_LIBRARY_PATH to ${SHLIBDIR}:${LIBDIR} --- libexec/ld.elf_so/Makefile | 6 +++++- libexec/ld.elf_so/rtld.h | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libexec/ld.elf_so/Makefile b/libexec/ld.elf_so/Makefile index 61eb8db943d6..b076e50521a0 100644 --- a/libexec/ld.elf_so/Makefile +++ b/libexec/ld.elf_so/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.42 2001/12/28 05:30:24 lukem Exp $ +# $NetBSD: Makefile,v 1.43 2001/12/28 05:44:22 lukem Exp $ .include # for OBJECT_FMT definition @@ -38,6 +38,10 @@ CPPFLAGS+= -D_RTLD_SOURCE #CPPFLAGS+= -DRTLD_DEBUG_RELOC #DBG= -g +.if ${SHLIBDIR} != ${LIBDIR} +CPPFLAGS+= -DRTLD_DEFAULT_LIBRARY_PATH=\"${SHLIBDIR}:${LIBDIR}\" +.endif + LDADD+= -non_shared -L${DESTDIR}${LIBDIR} -lc_pic DPADD+= ${LIBC_PIC} diff --git a/libexec/ld.elf_so/rtld.h b/libexec/ld.elf_so/rtld.h index a169290f4511..975bd5ab619a 100644 --- a/libexec/ld.elf_so/rtld.h +++ b/libexec/ld.elf_so/rtld.h @@ -1,4 +1,4 @@ -/* $NetBSD: rtld.h,v 1.32 2001/12/14 00:53:07 thorpej Exp $ */ +/* $NetBSD: rtld.h,v 1.33 2001/12/28 05:44:22 lukem Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -45,7 +45,9 @@ #if defined(_RTLD_SOURCE) +#ifndef RTLD_DEFAULT_LIBRARY_PATH #define RTLD_DEFAULT_LIBRARY_PATH "/usr/lib" +#endif #define _PATH_LD_HINTS "/etc/ld.so.conf" #if 0