Module Name:    src
Committed By:   mrg
Date:           Mon Dec 14 06:57:17 UTC 2009

Modified Files:
        src/libexec/ld.elf_so [matt-nb5-mips64]: Makefile
        src/libexec/ld.elf_so/arch/i386 [matt-nb5-mips64]: Makefile.inc
        src/libexec/ld.elf_so/arch/mips [matt-nb5-mips64]: Makefile.inc
        src/libexec/ld.elf_so/arch/sparc [matt-nb5-mips64]: Makefile.inc
Removed Files:
        src/libexec/ld.elf_so/arch/i386 [matt-nb5-mips64]: Makefile.ld32
        src/libexec/ld.elf_so/arch/sparc [matt-nb5-mips64]: Makefile.ld32

Log Message:
merge from -current:
>rename LD32DIR to MLIBDIR.

>- adjust the logic for compat ldd: add an elf32_compat module and arrange
>  for mips64 to build this with MLIBDIR set to o32
>- make mips64 ldd call elf32_compat_ldd as well
>- make mips64 elf64 set MLIBDIR to 64
>- don't need ld.elf_so's Makefile.ld32 files anymore (they are going away
>  soon anyway)
>
>tested on amd64 and sparc64, and an earlier version tested on mips64.

>if BSD_MK_COMPAT_FILE is defined, .include it.

>simplify the logic for compat ld.elf_so and move it here.  we now can
>find the libc objdir for multiple compat ld.elf_so's, too.


To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.87.8.1 src/libexec/ld.elf_so/Makefile
cvs rdiff -u -r1.11.2.1 -r1.11.2.1.4.1 \
    src/libexec/ld.elf_so/arch/i386/Makefile.inc
cvs rdiff -u -r1.1.2.2 -r0 src/libexec/ld.elf_so/arch/i386/Makefile.ld32
cvs rdiff -u -r1.15.32.4 -r1.15.32.5 \
    src/libexec/ld.elf_so/arch/mips/Makefile.inc
cvs rdiff -u -r1.11.2.1 -r1.11.2.1.4.1 \
    src/libexec/ld.elf_so/arch/sparc/Makefile.inc
cvs rdiff -u -r1.1.2.2 -r0 src/libexec/ld.elf_so/arch/sparc/Makefile.ld32

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/libexec/ld.elf_so/Makefile
diff -u src/libexec/ld.elf_so/Makefile:1.87 src/libexec/ld.elf_so/Makefile:1.87.8.1
--- src/libexec/ld.elf_so/Makefile:1.87	Sun Oct 26 07:11:54 2008
+++ src/libexec/ld.elf_so/Makefile	Mon Dec 14 06:57:16 2009
@@ -1,4 +1,9 @@
-#	$NetBSD: Makefile,v 1.87 2008/10/26 07:11:54 mrg Exp $
+#	$NetBSD: Makefile,v 1.87.8.1 2009/12/14 06:57:16 mrg Exp $
+
+# This needs to be before bsd.init.mk
+.if defined(BSD_MK_COMPAT_FILE)
+.include <${BSD_MK_COMPAT_FILE}>
+.endif
 
 # We are not building this with PIE
 PIE_CFLAGS=
@@ -28,8 +33,6 @@
      (${MACHINE_ARCH} == "vax")) &&					\
     ${OBJECT_FMT} == "ELF" && ${MKPIC} != "no"
 
-PROG?=		ld.elf_so
-
 LDFLAGS+=	-shared -symbolic -nostartfiles
 LDFLAGS+=	-Wl,-static
 
@@ -39,13 +42,16 @@
 .include "$M/Makefile.inc"
 .endif
 
-# Support src/compat/libexec/ld.elf_so.
-.if defined(LD32DIR)
-CLIBOBJ!=	cd ${NETBSDSRCDIR}/compat/lib/libc && ${PRINTOBJDIR}
+# Support compat ld.elf_so.
+.if defined(MLIBDIR)
+PROG=		ld.elf_so-${MLIBDIR}
+CPPFLAGS+=	-DRTLD_ARCH_SUBDIR=\"${MLIBDIR}\"
 .else
-CLIBOBJ!=	cd ${NETBSDSRCDIR}/lib/libc && ${PRINTOBJDIR}
+PROG=		ld.elf_so
 .endif
 
+CLIBOBJ!=	cd ${NETBSDSRCDIR}/lib/libc && ${PRINTOBJDIR}
+
 SRCS+=		rtld.c reloc.c symbol.c xmalloc.c xprintf.c debug.c \
 		map_object.c load.c search.c headers.c paths.c expand.c
 

Index: src/libexec/ld.elf_so/arch/i386/Makefile.inc
diff -u src/libexec/ld.elf_so/arch/i386/Makefile.inc:1.11.2.1 src/libexec/ld.elf_so/arch/i386/Makefile.inc:1.11.2.1.4.1
--- src/libexec/ld.elf_so/arch/i386/Makefile.inc:1.11.2.1	Fri Jan 16 22:21:30 2009
+++ src/libexec/ld.elf_so/arch/i386/Makefile.inc	Mon Dec 14 06:57:16 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.11.2.1 2009/01/16 22:21:30 bouyer Exp $
+#	$NetBSD: Makefile.inc,v 1.11.2.1.4.1 2009/12/14 06:57:16 mrg Exp $
 
 SRCS+=		rtld_start.S mdreloc.c
 
@@ -8,7 +8,3 @@
 CPPFLAGS+=	-DELFSIZE=32
 
 LDFLAGS+=	-Wl,-e,.rtld_start
-
-.if defined(LD32DIR)
-.include "Makefile.ld32"
-.endif

Index: src/libexec/ld.elf_so/arch/mips/Makefile.inc
diff -u src/libexec/ld.elf_so/arch/mips/Makefile.inc:1.15.32.4 src/libexec/ld.elf_so/arch/mips/Makefile.inc:1.15.32.5
--- src/libexec/ld.elf_so/arch/mips/Makefile.inc:1.15.32.4	Sun Sep 13 21:21:57 2009
+++ src/libexec/ld.elf_so/arch/mips/Makefile.inc	Mon Dec 14 06:57:16 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.15.32.4 2009/09/13 21:21:57 matt Exp $
+#	$NetBSD: Makefile.inc,v 1.15.32.5 2009/12/14 06:57:16 mrg Exp $
 
 SRCS+=		rtld_start.S mips_reloc.c
 
@@ -6,7 +6,7 @@
 CPUFLAGS+=	-G0
 
 ABI64?= ${CPUFLAGS:M-mabi=64:M-mabi=o64}
-.if !empty(ABI64)
+.if !empty(ABI64) || (defined(MLIBDIR) && ${MLIBDIR} == 64)
 CPPFLAGS+=	-DELFSIZE=64
 .else
 CPPFLAGS+=	-DELFSIZE=32

Index: src/libexec/ld.elf_so/arch/sparc/Makefile.inc
diff -u src/libexec/ld.elf_so/arch/sparc/Makefile.inc:1.11.2.1 src/libexec/ld.elf_so/arch/sparc/Makefile.inc:1.11.2.1.4.1
--- src/libexec/ld.elf_so/arch/sparc/Makefile.inc:1.11.2.1	Fri Jan 16 22:21:30 2009
+++ src/libexec/ld.elf_so/arch/sparc/Makefile.inc	Mon Dec 14 06:57:17 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.11.2.1 2009/01/16 22:21:30 bouyer Exp $
+#	$NetBSD: Makefile.inc,v 1.11.2.1.4.1 2009/12/14 06:57:17 mrg Exp $
 
 SRCS+=		rtld_start.S mdreloc.c
 
@@ -8,7 +8,3 @@
 CPPFLAGS+=	-DELFSIZE=32
 
 LDFLAGS+=	-Wl,-e,_rtld_start
-
-.if defined(LD32DIR)
-.include "Makefile.ld32"
-.endif

Reply via email to