Source-Changes-HG archive

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

[src/trunk]: src/lib MKCOMPAT fixes for when compat MACHINE_CPU != normal MAC...



details:   https://anonhg.NetBSD.org/src/rev/166202784a09
branches:  trunk
changeset: 331446:166202784a09
user:      matt <matt%NetBSD.org@localhost>
date:      Sun Aug 10 23:39:08 2014 +0000

description:
MKCOMPAT fixes for when compat MACHINE_CPU != normal MACHINE_CPU

diffstat:

 lib/libc/Makefile                 |   4 +---
 lib/libc/compiler_rt/Makefile.inc |  18 +++++++++---------
 lib/libc/libcincludes.mk          |  13 +++++++------
 lib/libc/softfloat/Makefile.inc   |   8 ++++----
 lib/libkvm/Makefile               |   4 +++-
 5 files changed, 24 insertions(+), 23 deletions(-)

diffs (154 lines):

diff -r 572164f3acd8 -r 166202784a09 lib/libc/Makefile
--- a/lib/libc/Makefile Sun Aug 10 23:35:26 2014 +0000
+++ b/lib/libc/Makefile Sun Aug 10 23:39:08 2014 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.165 2014/03/04 14:58:14 joerg Exp $
+#      $NetBSD: Makefile,v 1.166 2014/08/10 23:39:08 matt Exp $
 #      @(#)Makefile    8.2 (Berkeley) 2/3/94
 #
 # All library objects contain sccsid strings by default; they may be
@@ -19,8 +19,6 @@
 
 .include "Makefile.inc"
 
-LIBC_MACHINE_ARCH?=    ${MACHINE_ARCH}         # for MKCOMPAT
-
 LIB=           c
 CPPFLAGS+=     -I${.CURDIR}/include -I${.CURDIR}
 
diff -r 572164f3acd8 -r 166202784a09 lib/libc/compiler_rt/Makefile.inc
--- a/lib/libc/compiler_rt/Makefile.inc Sun Aug 10 23:35:26 2014 +0000
+++ b/lib/libc/compiler_rt/Makefile.inc Sun Aug 10 23:39:08 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.23 2014/08/10 10:15:39 joerg Exp $
+# $NetBSD: Makefile.inc,v 1.24 2014/08/10 23:39:08 matt Exp $
 
 COMPILER_RT_SRCDIR=    ${NETBSDSRCDIR}/sys/external/bsd/compiler_rt/dist
 
@@ -6,7 +6,7 @@
 COMPILER_RT_CPU_DIR=   ${COMPILER_RT_SRCDIR}/lib/builtins/ppc
 COMPILER_RT_ARCH_DIR=  ${COMPILER_RT_SRCDIR}/lib/builtins/ppc
 .else
-COMPILER_RT_CPU_DIR=   ${COMPILER_RT_SRCDIR}/lib/builtins/${MACHINE_CPU}
+COMPILER_RT_CPU_DIR=   ${COMPILER_RT_SRCDIR}/lib/builtins/${LIBC_MACHINE_CPU}
 COMPILER_RT_ARCH_DIR=  ${COMPILER_RT_SRCDIR}/lib/builtins/${LIBC_MACHINE_ARCH}
 .endif
 
@@ -135,8 +135,8 @@
 .endif
 
 # These have h/w instructions which are always used.
-.if ${MACHINE_ARCH} != "alpha" && ${MACHINE_CPU} != "powerpc" \
-    && ${MACHINE_CPU} != "aarch64" && ${MACHINE_ARCH} != "vax"
+.if ${LIBC_MACHINE_ARCH} != "alpha" && ${LIBC_MACHINE_CPU} != "powerpc" \
+    && ${LIBC_MACHINE_CPU} != "aarch64" && ${LIBC_MACHINE_ARCH} != "vax"
 GENERIC_SRCS+= \
        clzsi2.c \
        ctzsi2.c \
@@ -146,7 +146,7 @@
        udivmodsi4.c \
        umodsi3.c
 
-. if ${MACHINE_CPU} != "sh3"
+. if ${LIBC_MACHINE_CPU} != "sh3"
 # On sh3 __udivsi3 is gcc "millicode" with special calling convention
 # (less registers clobbered than usual).  Each DSO that needs it gets
 # its own hidden copy from libgcc.a.
@@ -167,8 +167,8 @@
        subvdi3.c
 
 # These have h/w instructions which are always used.
-.if ${MACHINE_ARCH} != "alpha" && ${MACHINE_CPU} != "powerpc64" \
-    && ${MACHINE_ARCH} != "aarch64"
+.if ${LIBC_MACHINE_ARCH} != "alpha" && ${LIBC_MACHINE_CPU} != "powerpc64" \
+    && ${LIBC_MACHINE_ARCH} != "aarch64"
 GENERIC_SRCS+= \
        clzdi2.c \
        ctzdi2.c \
@@ -212,12 +212,12 @@
        gcc_qsub.c
 .endif
 
-.if ${MACHINE_CPU} == "aarch64"
+.if ${LIBC_MACHINE_CPU} == "aarch64"
 GENERIC_SRCS+= \
        clear_cache.c
 .endif
 
-.if ${MACHINE_CPU} == "arm"
+.if ${LIBC_MACHINE_CPU} == "arm"
 .if !empty(LIBC_MACHINE_ARCH:Mearm*)
 GENERIC_SRCS+= \
        aeabi_idivmod.S \
diff -r 572164f3acd8 -r 166202784a09 lib/libc/libcincludes.mk
--- a/lib/libc/libcincludes.mk  Sun Aug 10 23:35:26 2014 +0000
+++ b/lib/libc/libcincludes.mk  Sun Aug 10 23:39:08 2014 +0000
@@ -1,18 +1,19 @@
-#      $NetBSD: libcincludes.mk,v 1.1 2008/10/26 07:28:06 mrg Exp $
+#      $NetBSD: libcincludes.mk,v 1.2 2014/08/10 23:39:08 matt Exp $
 
 # Makefile fragment shared across several parts that want to look
 # inside libc's include tree.
 
+LIBC_MACHINE_ARCH?=    ${MACHINE_ARCH}
+LIBC_MACHINE_CPU?=     ${MACHINE_CPU}
+
 .if defined(LIBC_MACHINE_ARCH) && \
     exists(${NETBSDSRCDIR}/lib/libc/arch/${LIBC_MACHINE_ARCH}/SYS.h)
 ARCHSUBDIR=    ${LIBC_MACHINE_ARCH}
-.elif exists(${NETBSDSRCDIR}/lib/libc/arch/${MACHINE_ARCH}/SYS.h)
-ARCHSUBDIR=    ${MACHINE_ARCH}
-.elif exists(${NETBSDSRCDIR}/lib/libc/arch/${MACHINE_CPU}/SYS.h)
-ARCHSUBDIR=    ${MACHINE_CPU}
+.elif exists(${NETBSDSRCDIR}/lib/libc/arch/${LIBC_MACHINE_CPU}/SYS.h)
+ARCHSUBDIR=    ${LIBC_MACHINE_CPU}
 .else
 .BEGIN:
-       @echo no ARCHDIR for ${MACHINE_ARCH} nor ${MACHINE_CPU}
+       @echo no ARCHDIR for ${LIBC_MACHINE_ARCH} nor ${LIBC_MACHINE_CPU}
        @false
 .endif
 
diff -r 572164f3acd8 -r 166202784a09 lib/libc/softfloat/Makefile.inc
--- a/lib/libc/softfloat/Makefile.inc   Sun Aug 10 23:35:26 2014 +0000
+++ b/lib/libc/softfloat/Makefile.inc   Sun Aug 10 23:39:08 2014 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.inc,v 1.18 2014/06/14 20:49:37 mrg Exp $
+#      $NetBSD: Makefile.inc,v 1.19 2014/08/10 23:39:08 matt Exp $
 
 SOFTFLOAT_BITS?=64
 .PATH:         ${ARCHDIR}/softfloat \
@@ -31,12 +31,12 @@
 
 # XXX
 .if defined(HAVE_GCC)
-. if (${MACHINE_CPU} == "arm")
+. if (${LIBC_MACHINE_CPU} == "arm")
 # See doc/HACKS for more information.
 COPTS.softfloat.c+=    -Wno-enum-compare
 COPTS.softfloat.c+=    ${${ACTIVE_CXX} == "gcc":? -fno-tree-vrp :}
-.elif (${MACHINE_CPU} == "mips" || \
-     ${MACHINE_CPU} == "sh3")
+.elif (${LIBC_MACHINE_CPU} == "mips" || \
+     ${LIBC_MACHINE_CPU} == "sh3")
 COPTS.softfloat.c+=    -Wno-enum-compare
 . endif
 .endif
diff -r 572164f3acd8 -r 166202784a09 lib/libkvm/Makefile
--- a/lib/libkvm/Makefile       Sun Aug 10 23:35:26 2014 +0000
+++ b/lib/libkvm/Makefile       Sun Aug 10 23:39:08 2014 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.49 2012/03/21 10:08:30 matt Exp $
+#      $NetBSD: Makefile,v 1.50 2014/08/10 23:39:08 matt Exp $
 #      from: @(#)Makefile      8.1 (Berkeley) 6/4/93
 
 WARNS= 3
@@ -20,6 +20,8 @@
 .include <bsd.own.mk>
 .if exists(kvm_${KVM_MACHINE_ARCH}.c)
 SRCS+= kvm_${KVM_MACHINE_ARCH}.c
+.elif exists(kvm_${KVM_MACHINE_CPU}.c)
+SRCS+= kvm_${KVM_MACHINE_CPU}.c
 .elif exists(kvm_${MACHINE_ARCH}.c)
 SRCS+= kvm_${MACHINE_ARCH}.c
 .elif  exists(kvm_${MACHINE_CPU}.c)



Home | Main Index | Thread Index | Old Index