Module Name:    src
Committed By:   matt
Date:           Sat Sep  5 18:53:58 UTC 2009

Modified Files:
        src/libexec/ld.elf_so/arch/mips [matt-nb5-mips64]: Makefile.inc
        src/usr.bin/elf2ecoff [matt-nb5-mips64]: Makefile
        src/usr.bin/ldd [matt-nb5-mips64]: Makefile
        src/usr.bin/ldd/elf64 [matt-nb5-mips64]: Makefile

Log Message:
Fix build problems with CPUFLAGS.


To generate a diff of this commit:
cvs rdiff -u -r1.15.32.2 -r1.15.32.3 \
    src/libexec/ld.elf_so/arch/mips/Makefile.inc
cvs rdiff -u -r1.10.46.2 -r1.10.46.3 src/usr.bin/elf2ecoff/Makefile
cvs rdiff -u -r1.7.52.1.4.1 -r1.7.52.1.4.2 src/usr.bin/ldd/Makefile
cvs rdiff -u -r1.4.2.2.4.1 -r1.4.2.2.4.2 src/usr.bin/ldd/elf64/Makefile

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/arch/mips/Makefile.inc
diff -u src/libexec/ld.elf_so/arch/mips/Makefile.inc:1.15.32.2 src/libexec/ld.elf_so/arch/mips/Makefile.inc:1.15.32.3
--- src/libexec/ld.elf_so/arch/mips/Makefile.inc:1.15.32.2	Sat Sep  5 03:49:02 2009
+++ src/libexec/ld.elf_so/arch/mips/Makefile.inc	Sat Sep  5 18:53:58 2009
@@ -1,11 +1,12 @@
-#	$NetBSD: Makefile.inc,v 1.15.32.2 2009/09/05 03:49:02 matt Exp $
+#	$NetBSD: Makefile.inc,v 1.15.32.3 2009/09/05 18:53:58 matt Exp $
 
 SRCS+=		rtld_start.S mips_reloc.c
 
 # XXX Should not be in CPPFLAGS!
 CPUFLAGS+=	-G0
 
-.if (${CPUFLAGS:M-mabi=64} != "")
+ABI64:= ${CPUFLAGS:M-mabi=64:M-mabi=o64}
+.if !empty(ABI64)
 CPPFLAGS+=	-DELFSIZE=64
 .else
 CPPFLAGS+=	-DELFSIZE=32

Index: src/usr.bin/elf2ecoff/Makefile
diff -u src/usr.bin/elf2ecoff/Makefile:1.10.46.2 src/usr.bin/elf2ecoff/Makefile:1.10.46.3
--- src/usr.bin/elf2ecoff/Makefile:1.10.46.2	Sat Sep  5 03:48:22 2009
+++ src/usr.bin/elf2ecoff/Makefile	Sat Sep  5 18:53:57 2009
@@ -1,12 +1,13 @@
-#	$NetBSD: Makefile,v 1.10.46.2 2009/09/05 03:48:22 matt Exp $
+#	$NetBSD: Makefile,v 1.10.46.3 2009/09/05 18:53:57 matt Exp $
 #	from: @(#)Makefile	5.4 (Berkeley) 5/11/90
 
 .include <bsd.own.mk>
 
+ABI64:=  ${CPUFLAGS:M-mabi=64:M-mabi=o64}
 # Build ELF to {ecoff, aout} tools on mips, for old bootblocks/PROMs.
 .if (${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb" || \
      ((${MACHINE_ARCH} == "mips64el" || ${MACHINE_ARCH} == "mips64eb") && \
-      ${CPUFLAGS:M-mabi=64} == ""))
+      !defined(HOSTPROG) && empty(ABI64)))
 
 PROG=	elf2ecoff
 

Index: src/usr.bin/ldd/Makefile
diff -u src/usr.bin/ldd/Makefile:1.7.52.1.4.1 src/usr.bin/ldd/Makefile:1.7.52.1.4.2
--- src/usr.bin/ldd/Makefile:1.7.52.1.4.1	Sat Sep  5 03:39:26 2009
+++ src/usr.bin/ldd/Makefile	Sat Sep  5 18:53:57 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.7.52.1.4.1 2009/09/05 03:39:26 matt Exp $
+#	$NetBSD: Makefile,v 1.7.52.1.4.2 2009/09/05 18:53:57 matt Exp $
 
 .include <bsd.own.mk>		# for MKDYNAMICROOT definition
 
@@ -15,10 +15,13 @@
 EXTRA_LIBS+=	${LIB_ELF32DIR}/libldd_elf32.a
 .endif
 
+.if (${MACHINE_ARCH} == "mips64eb") || (${MACHINE_ARCH} == "mips64el")
+ABI64:= ${CPUFLAGS:M-mabi=64:M-mabi=o64}
+.endif
+
 .if (${MACHINE_ARCH} == "alpha") || (${MACHINE_ARCH} == "sparc64") || \
     (${MACHINE_ARCH} == "x86_64") || (${MACHINE_ARCH} == "powerpc64") || \
-    ((${MACHINE_ARCH} == "mips64eb") || (${MACHINE_ARCH} == "mips64el") \
-     && ${CPUFLAGS:-mabi=64} != "")
+    ((${MACHINE_ARCH:Mmips64*} != "") && !empty(ABI64))
 LIB_ELF64DIR!=	cd ${.CURDIR}/elf64 && ${PRINTOBJDIR}
 EXTRA_LIBS+=	${LIB_ELF64DIR}/libldd_elf64.a
 CPPFLAGS.ldd.c= -DELFSIZE=64

Index: src/usr.bin/ldd/elf64/Makefile
diff -u src/usr.bin/ldd/elf64/Makefile:1.4.2.2.4.1 src/usr.bin/ldd/elf64/Makefile:1.4.2.2.4.2
--- src/usr.bin/ldd/elf64/Makefile:1.4.2.2.4.1	Sat Sep  5 03:39:26 2009
+++ src/usr.bin/ldd/elf64/Makefile	Sat Sep  5 18:53:58 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4.2.2.4.1 2009/09/05 03:39:26 matt Exp $
+#	$NetBSD: Makefile,v 1.4.2.2.4.2 2009/09/05 18:53:58 matt Exp $
 
 CPPFLAGS+=	-DELFSIZE=64
 LIB=	ldd_elf64
@@ -9,10 +9,13 @@
 LIBISPRIVATE=	yes
 .PATH: ${.CURDIR}/..
 
+.if ${MACHINE_ARCH:Mmips64*} != ""
+ABI64:= ${CPUFLAGS:M-mabi=64:M-mabi=o64}
+.endif
+
 .if (${MACHINE_ARCH} == "alpha") || (${MACHINE_ARCH} == "sparc64") || \
     (${MACHINE_ARCH} == "x86_64") || (${MACHINE_ARCH} == "powerpc64") || \
-    ((${MACHINE_ARCH} == "mips64eb") || (${MACHINE_ARCH} == "mips64el") \
-     && ${CPUFLAGS:M-mabi=64} != "")
+    (${MACHINE_ARCH:Mmips64*} != "" && !empty(ABI64))
 
 # XXX we need to make sure that we don't accidentally get the elf32
 # XXX versions of these.

Reply via email to