Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Revert last, it breaks the tricks xsrc uses.



details:   https://anonhg.NetBSD.org/src/rev/a00abdbb3fb2
branches:  trunk
changeset: 781164:a00abdbb3fb2
user:      joerg <joerg%NetBSD.org@localhost>
date:      Thu Aug 23 21:21:14 2012 +0000

description:
Revert last, it breaks the tricks xsrc uses.

diffstat:

 compat/Makefile.compat       |   6 +++++-
 lib/i18n_module/Makefile.inc |   4 +++-
 libexec/ld.elf_so/Makefile   |  21 +++++++++++----------
 sbin/ldconfig/Makefile       |   6 +++++-
 share/mk/bsd.README          |  15 ++++++++++++---
 share/mk/bsd.lib.mk          |   8 ++++++--
 share/mk/bsd.prog.mk         |   5 ++++-
 share/mk/bsd.shlib.mk        |  20 ++++++++++++++++++--
 8 files changed, 64 insertions(+), 21 deletions(-)

diffs (247 lines):

diff -r 817da851483f -r a00abdbb3fb2 compat/Makefile.compat
--- a/compat/Makefile.compat    Thu Aug 23 15:45:02 2012 +0000
+++ b/compat/Makefile.compat    Thu Aug 23 21:21:14 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.compat,v 1.8 2012/08/23 15:45:02 joerg Exp $
+#      $NetBSD: Makefile.compat,v 1.9 2012/08/23 21:21:14 joerg Exp $
 
 #
 # Makefile fragment to help implement a multilib set of libraries
@@ -11,6 +11,7 @@
 
 LIBDIR=                        /usr/lib/${MLIBDIR}
 SHLIBDIR=              /usr/lib/${MLIBDIR}
+SHLIBINSTALLDIR=       /usr/lib/${MLIBDIR}
 
 _GCC_CRTBEGIN=         ${DESTDIR}/usr/lib/${MLIBDIR}/crtbegin.o
 _GCC_CRTBEGINS=                ${DESTDIR}/usr/lib/${MLIBDIR}/crtbeginS.o
@@ -26,4 +27,7 @@
 NOINFO=                # defined
 NOCHECKVER=    # defined
 
+# ld.elf_so
+SHLINKINSTALLDIR=      /libexec
+
 .endif # _COMPAT_OPTIONS_MK_ }
diff -r 817da851483f -r a00abdbb3fb2 lib/i18n_module/Makefile.inc
--- a/lib/i18n_module/Makefile.inc      Thu Aug 23 15:45:02 2012 +0000
+++ b/lib/i18n_module/Makefile.inc      Thu Aug 23 21:21:14 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.inc,v 1.13 2012/08/23 15:45:02 joerg Exp $
+#      $NetBSD: Makefile.inc,v 1.14 2012/08/23 21:21:15 joerg Exp $
 
 NOLINT=                # defined
 NOPICINSTALL=  # defined
@@ -12,9 +12,11 @@
 .if defined(MLIBDIR)
 LIBDIR=                /usr/lib/${MLIBDIR}/i18n
 SHLIBDIR=      /usr/lib/${MLIBDIR}/i18n
+SHLIBINSTALLDIR=/usr/lib/${MLIBDIR}/i18n
 .else
 LIBDIR=                /usr/lib/i18n
 SHLIBDIR=      /usr/lib/i18n
+SHLIBINSTALLDIR=/usr/lib/i18n
 .endif
 CPPFLAGS+=     -I${NETBSDSRCDIR}/lib/libc/citrus
 CPPFLAGS+=     -DLOCALEMOD_MAJOR=${SHLIB_MAJOR}
diff -r 817da851483f -r a00abdbb3fb2 libexec/ld.elf_so/Makefile
--- a/libexec/ld.elf_so/Makefile        Thu Aug 23 15:45:02 2012 +0000
+++ b/libexec/ld.elf_so/Makefile        Thu Aug 23 21:21:14 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.113 2012/08/23 15:45:02 joerg Exp $
+#      $NetBSD: Makefile,v 1.114 2012/08/23 21:21:15 joerg Exp $
 #
 # NOTE: when changing ld.so, ensure that ldd still compiles.
 #
@@ -14,6 +14,7 @@
 PIE_CFLAGS=
 PIE_LDFLAGS=
 .include <bsd.init.mk>                 # for MKPIC definition
+.include <bsd.shlib.mk>                        # for SHLINKINSTALLDIR definition
 
 .if defined(LDELFSO_MACHINE_CPU) && !empty(LDELFSO_MACHINE_CPU) && \
     exists(${.CURDIR}/arch/${LDELFSO_MACHINE_CPU})
@@ -80,6 +81,8 @@
 
 CLEANFILES+=   errlist_concat.h
 
+BINDIR=                ${SHLINKINSTALLDIR}
+
 CPPFLAGS+=     -DLIBDIR=\"${LIBDIR}\" -D_PATH_RTLD=\"${BINDIR}/${PROG}\"
 CPPFLAGS+=     -I${.CURDIR} -I.
 CPPFLAGS+=     -DRTLD_LOADER
@@ -95,6 +98,11 @@
 COPTS+=                -mno-3dnow -mno-mmx -mno-sse -mno-sse2 -mno-sse3
 .endif
 
+
+.if ${SHLIBDIR} != ${LIBDIR}
+CPPFLAGS+=     -DRTLD_DEFAULT_LIBRARY_PATH=\"${SHLIBDIR}:${LIBDIR}\"
+.endif
+
 # rtld.c and symbol.c use alloca, so disable SSP warnings.
 COPTS.rtld.c+= -Wno-stack-protector
 COPTS.symbol.c+=-Wno-stack-protector
@@ -125,15 +133,8 @@
        ${_MKMSG_LINK} ${PROG}
        ${CC} ${LDFLAGS} -o ${PROG} ${OBJS} ${LDADD}
 
-.if ${MKDYNAMICROOT} == "no"
-BINDIR=                /usr/libexec
-.else
-BINDIR=                /libexec
-.endif
-SHLINKDIR=     ${BINDIR}
-
-.if ${SHLINKDIR} != "/usr/libexec"
-SYMLINKS+=     ${SHLINKDIR}/${PROG} /usr/libexec/${PROG}
+.if ${SHLINKINSTALLDIR} != "/usr/libexec"
+SYMLINKS+=     ${SHLINKINSTALLDIR}/${PROG} /usr/libexec/${PROG}
 .endif
 
 .include <bsd.prog.mk>
diff -r 817da851483f -r a00abdbb3fb2 sbin/ldconfig/Makefile
--- a/sbin/ldconfig/Makefile    Thu Aug 23 15:45:02 2012 +0000
+++ b/sbin/ldconfig/Makefile    Thu Aug 23 21:21:14 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.24 2012/08/23 15:45:03 joerg Exp $
+#      $NetBSD: Makefile,v 1.25 2012/08/23 21:21:16 joerg Exp $
 
 .include <bsd.own.mk>   # For MKPIC
 .include <bsd.shlib.mk>
@@ -13,6 +13,10 @@
 PROG=  ldconfig
 SRCS=  ldconfig.c shlib.c
 
+.if ${SHLIBINSTALLDIR} != ${LIBDIR}
+CPPFLAGS+=-DSTANDARD_SEARCH_DIRS=\"${SHLIBINSTALLDIR}\",\"${LIBDIR}\"
+.endif
+
 .endif
 
 MAN=   ldconfig.8
diff -r 817da851483f -r a00abdbb3fb2 share/mk/bsd.README
--- a/share/mk/bsd.README       Thu Aug 23 15:45:02 2012 +0000
+++ b/share/mk/bsd.README       Thu Aug 23 21:21:14 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.README,v 1.299 2012/08/23 15:45:03 joerg Exp $
+#      $NetBSD: bsd.README,v 1.300 2012/08/23 21:21:16 joerg Exp $
 #      @(#)bsd.README  8.2 (Berkeley) 4/2/94
 
 This is the README file for the make "include" files for the NetBSD
@@ -1068,11 +1068,14 @@
                permissions to be set to 644. This allows .a files
                from different builds to be bit identical.
 
+SHLIBINSTALLDIR        Target directory for shared libraries if ${USE_SHLIBDIR}
+               is not "no".
+
 SHLIB_MAJOR
 SHLIB_MINOR
 SHLIB_TEENY    Major, minor, and teeny version numbers of shared library
 
-USE_SHLIBDIR   If not "no", use ${SHLIBDIR} instead of ${LIBDIR}
+USE_SHLIBDIR   If not "no", use ${SHLIBINSTALLDIR} instead of ${LIBDIR}
                as the path to install shared libraries to.
                USE_SHLIBDIR must be defined before <bsd.own.mk> is included.
                Default: no
@@ -1610,13 +1613,19 @@
 <bsd.own.mk> sets the following variables, if they are not already defined
 (defaults are in brackets):
 
+SHLIBINSTALLDIR        If ${USE_SHLIBDIR} is not "no", use ${SHLIBINSTALLDIR}
+               instead of ${LIBDIR} as the base path for shared library
+               installation.  [/lib]
+
 SHLIBDIR       The path to USE_SHLIBDIR shared libraries to use when building
                a program.  [/lib for programs in /bin and /sbin, /usr/lib
                for all others.]
 
-_LIBSODIR      Set to ${SHLIBDIR} if ${USE_SHLIBDIR} is not "no",
+_LIBSODIR      Set to ${SHLIBINSTALLDIR} if ${USE_SHLIBDIR} is not "no",
                otherwise set to ${LIBDIR}
 
+SHLINKINSTALLDIR Base path for shared linker.  [/libexec]
+
 SHLINKDIR      Path to use for shared linker when building a program.
                [/libexec for programs in /bin and /sbin, /usr/libexec for
                all others.]
diff -r 817da851483f -r a00abdbb3fb2 share/mk/bsd.lib.mk
--- a/share/mk/bsd.lib.mk       Thu Aug 23 15:45:02 2012 +0000
+++ b/share/mk/bsd.lib.mk       Thu Aug 23 21:21:14 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.lib.mk,v 1.323 2012/08/23 15:45:03 joerg Exp $
+#      $NetBSD: bsd.lib.mk,v 1.324 2012/08/23 21:21:16 joerg Exp $
 #      @(#)bsd.lib.mk  8.3 (Berkeley) 4/22/94
 
 .include <bsd.init.mk>
@@ -540,7 +540,11 @@
 
 _LIBLDOPTS=
 .if ${SHLIBDIR} != "/usr/lib"
-_LIBLDOPTS+=   -Wl,-rpath,${SHLIBDIR} -L=${SHLIBDIR}
+_LIBLDOPTS+=   -Wl,-rpath,${SHLIBDIR} \
+               -L=${SHLIBDIR}
+.elif ${SHLIBINSTALLDIR} != "/usr/lib"
+_LIBLDOPTS+=   -Wl,-rpath-link,${DESTDIR}${SHLIBINSTALLDIR} \
+               -L=${SHLIBINSTALLDIR}
 .endif
 
 # gcc -shared now adds -lc automatically. For libraries other than libc and
diff -r 817da851483f -r a00abdbb3fb2 share/mk/bsd.prog.mk
--- a/share/mk/bsd.prog.mk      Thu Aug 23 15:45:02 2012 +0000
+++ b/share/mk/bsd.prog.mk      Thu Aug 23 21:21:14 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.prog.mk,v 1.276 2012/08/23 15:45:03 joerg Exp $
+#      $NetBSD: bsd.prog.mk,v 1.277 2012/08/23 21:21:16 joerg Exp $
 #      @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94
 
 .ifndef HOSTPROG
@@ -271,6 +271,9 @@
 .if ${SHLIBDIR} != "/usr/lib"
 _PROGLDOPTS+=  -Wl,-rpath,${SHLIBDIR} \
                -L=${SHLIBDIR}
+.elif ${SHLIBINSTALLDIR} != "/usr/lib"
+_PROGLDOPTS+=  -Wl,-rpath-link,${DESTDIR}${SHLIBINSTALLDIR} \
+               -L=${SHLIBINSTALLDIR}
 .endif
 
 __proginstall: .USE
diff -r 817da851483f -r a00abdbb3fb2 share/mk/bsd.shlib.mk
--- a/share/mk/bsd.shlib.mk     Thu Aug 23 15:45:02 2012 +0000
+++ b/share/mk/bsd.shlib.mk     Thu Aug 23 21:21:14 2012 +0000
@@ -1,8 +1,14 @@
-#      $NetBSD: bsd.shlib.mk,v 1.7 2012/08/23 15:45:03 joerg Exp $
+#      $NetBSD: bsd.shlib.mk,v 1.8 2012/08/23 21:21:17 joerg Exp $
 
 .if !defined(_BSD_SHLIB_MK_)
 _BSD_SHLIB_MK_=1
 
+.if ${MKDYNAMICROOT} == "no"
+SHLIBINSTALLDIR?= /usr/lib
+.else
+SHLIBINSTALLDIR?= /lib
+.endif
+
 .if ${MKDYNAMICROOT} == "no" || \
     (${BINDIR:Ux} != "/bin" && ${BINDIR:Ux} != "/sbin" && \
      ${BINDIR:Ux} != "/libexec" && ${USE_SHLIBDIR:Uno} == "no")
@@ -11,7 +17,17 @@
 SHLIBDIR?=     /lib
 .endif
 
-_LIBSODIR?=    ${SHLIBDIR}
+.if ${USE_SHLIBDIR:Uno} != "no"
+_LIBSODIR?=    ${SHLIBINSTALLDIR}
+.else
+_LIBSODIR?=    ${LIBDIR}
+.endif
+
+.if ${MKDYNAMICROOT} == "no"
+SHLINKINSTALLDIR?= /usr/libexec
+.else
+SHLINKINSTALLDIR?= /libexec
+.endif
 
 .if ${MKDYNAMICROOT} == "no" || \
     (${BINDIR:Ux} != "/bin" && ${BINDIR:Ux} != "/sbin" && \



Home | Main Index | Thread Index | Old Index