Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src MKCOMPAT fixes for when compat MACHINE_CPU != normal MACHINE...
details: https://anonhg.NetBSD.org/src/rev/5f25079408a6
branches: trunk
changeset: 331441:5f25079408a6
user: matt <matt%NetBSD.org@localhost>
date: Sun Aug 10 23:25:49 2014 +0000
description:
MKCOMPAT fixes for when compat MACHINE_CPU != normal MACHINE_CPU
diffstat:
common/lib/libc/Makefile.inc | 5 ++++-
lib/csu/Makefile | 9 +++++----
lib/libarch/Makefile | 8 +++++---
lib/libarch/arm/Makefile.inc | 6 ++++--
lib/libm/Makefile | 35 +++++++++++++++++++----------------
lib/libposix/Makefile | 4 ++--
lib/libpthread/Makefile | 5 ++++-
7 files changed, 43 insertions(+), 29 deletions(-)
diffs (250 lines):
diff -r 8a0a9a327908 -r 5f25079408a6 common/lib/libc/Makefile.inc
--- a/common/lib/libc/Makefile.inc Sun Aug 10 22:55:49 2014 +0000
+++ b/common/lib/libc/Makefile.inc Sun Aug 10 23:25:49 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.15 2014/01/29 23:37:18 joerg Exp $
+# $NetBSD: Makefile.inc,v 1.16 2014/08/10 23:25:49 matt Exp $
.include <bsd.own.mk>
@@ -9,6 +9,9 @@
.if defined(COMMON_MACHINE_ARCH) && !empty(COMMON_MACHINE_ARCH) && \
exists(${COMMON_DIR}/arch/${COMMON_MACHINE_ARCH})
COMMON_ARCHSUBDIR= ${COMMON_MACHINE_ARCH}
+.elif defined(COMMON_MACHINE_CPU) && !empty(COMMON_MACHINE_CPU) && \
+ exists(${COMMON_DIR}/arch/${COMMON_MACHINE_CPU})
+COMMON_ARCHSUBDIR= ${COMMON_MACHINE_CPU}
.elif defined(LIBKERN_ARCH) && !empty(LIBKERN_ARCH) && \
exists(${KERNDIR}/arch/${LIBKERN_ARCH})
COMMON_ARCHSUBDIR= ${LIBKERN_ARCH}
diff -r 8a0a9a327908 -r 5f25079408a6 lib/csu/Makefile
--- a/lib/csu/Makefile Sun Aug 10 22:55:49 2014 +0000
+++ b/lib/csu/Makefile Sun Aug 10 23:25:49 2014 +0000
@@ -1,17 +1,18 @@
-# $NetBSD: Makefile,v 1.34 2014/04/22 13:20:58 joerg Exp $
+# $NetBSD: Makefile,v 1.35 2014/08/10 23:25:49 matt Exp $
.include <bsd.own.mk>
CSU_MACHINE_ARCH?= ${MACHINE_ARCH}
+CSU_MACHINE_CPU?= ${MACHINE_CPU}
.if !empty(CSU_MACHINE_ARCH:Mearm*)
ARCHDIR:= ${.CURDIR}/arch/earm
.elif exists(${.CURDIR}/arch/${CSU_MACHINE_ARCH}/Makefile.inc)
ARCHDIR:= ${.CURDIR}/arch/${CSU_MACHINE_ARCH}
-.elif exists(${.CURDIR}/arch/${MACHINE_CPU}/Makefile.inc)
-ARCHDIR:= ${.CURDIR}/arch/${MACHINE_CPU}
+.elif exists(${.CURDIR}/arch/${CSU_MACHINE_CPU}/Makefile.inc)
+ARCHDIR:= ${.CURDIR}/arch/${CSU_MACHINE_CPU}
.else
-.error Architecture (${CSU_MACHINE_ARCH} or ${MACHINE_CPU}) unsupported
+.error Architecture (${CSU_MACHINE_ARCH} or ${CSU_MACHINE_CPU}) unsupported
.endif
diff -r 8a0a9a327908 -r 5f25079408a6 lib/libarch/Makefile
--- a/lib/libarch/Makefile Sun Aug 10 22:55:49 2014 +0000
+++ b/lib/libarch/Makefile Sun Aug 10 23:25:49 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.27 2014/03/18 18:20:36 riastradh Exp $
+# $NetBSD: Makefile,v 1.28 2014/08/10 23:25:49 matt Exp $
.include <bsd.own.mk>
@@ -14,12 +14,14 @@
POBJS+= ${ASM:.o=.po}
CLEANFILES+= ${ASM} ${POBJS}
+LIBC_MACHINE_CPU?= ${MACHINE_CPU}
+
# Build the library if SRCS is now defined ...
.if defined(SRCS)
-.if defined(MLIBDIR) && ${MLIBDIR} != "none" && ${MACHINE_CPU} != "arm"
+.if defined(MLIBDIR) && ${MLIBDIR} != "none" && ${LIBC_MACHINE_CPU} != "arm"
LIB= ${MLIBDIR}
.else
-LIB= ${MACHINE_CPU}
+LIB= ${LIBC_MACHINE_CPU}
.endif
SHLIB_VERSION_FILE= ${.CURDIR}/${LIB}/shlib_version
diff -r 8a0a9a327908 -r 5f25079408a6 lib/libarch/arm/Makefile.inc
--- a/lib/libarch/arm/Makefile.inc Sun Aug 10 22:55:49 2014 +0000
+++ b/lib/libarch/arm/Makefile.inc Sun Aug 10 23:25:49 2014 +0000
@@ -1,8 +1,10 @@
-# $NetBSD: Makefile.inc,v 1.1 2002/03/30 06:24:34 thorpej Exp $
+# $NetBSD: Makefile.inc,v 1.2 2014/08/10 23:25:50 matt Exp $
.include <bsd.own.mk>
-.if (${MACHINE_CPU} == "arm")
+LIBC_MACHINE_CPU?= ${MACHINE_CPU}
+
+.if (${LIBC_MACHINE_CPU} == "arm")
SRCS+= arm_sync_icache.c arm_drain_writebuf.c
.endif
diff -r 8a0a9a327908 -r 5f25079408a6 lib/libm/Makefile
--- a/lib/libm/Makefile Sun Aug 10 22:55:49 2014 +0000
+++ b/lib/libm/Makefile Sun Aug 10 23:25:49 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.162 2014/08/10 20:48:34 joerg Exp $
+# $NetBSD: Makefile,v 1.163 2014/08/10 23:25:50 matt Exp $
#
# @(#)Makefile 5.1beta 93/09/24
#
@@ -47,10 +47,13 @@
# require this for the value of I387_LIBM from mk.conf, if set.
.include <bsd.own.mk>
+LIBC_MACHINE_ARCH?= ${MACHINE_ARCH}
+LIBC_MACHINE_CPU?= ${MACHINE_CPU}
+
# compiler_rt uses typeof() and __extension__
LINTFLAGS += -g
-.if (${MACHINE_CPU} == "aarch64")
+.if (${LIBC_MACHINE_CPU} == "aarch64")
.PATH: ${.CURDIR}/arch/aarch64
ARCH_SRCS = e_sqrt.S e_sqrtf.S s_fabsf.S
ARCH_SRCS+= s_fma.S s_fmaf.S s_fmax.S s_fmaxf.S s_fmin.S s_fminf.S
@@ -58,11 +61,11 @@
COMMON_SRCS+= fenv.c
COMMON_SRCS+= e_sqrtl.c
COMMON_SRCS+= s_fma.c s_fmaf.c s_fmal.c
-.elif (${MACHINE_ARCH} == "alpha")
+.elif (${LIBC_MACHINE_ARCH} == "alpha")
.PATH: ${.CURDIR}/arch/alpha
ARCH_SRCS = s_copysign.S s_copysignf.S lrint.S
COPTS+= -mfloat-ieee -mieee-with-inexact -mfp-trap-mode=sui -mtrap-precision=i
-.elif (${MACHINE_CPU} == "arm")
+.elif (${LIBC_MACHINE_CPU} == "arm")
.PATH: ${.CURDIR}/arch/arm
COMMON_SRCS+= fenv.c s_nexttowardf.c \
s_nearbyint.c s_rintl.c
@@ -75,12 +78,12 @@
${i} ${i:.o=.po} ${i:.o=.pico} ${i:.o=.go} ${i:.o=.ln}: ${i:.o=.c}
.endfor
.endif
-.elif (${MACHINE_ARCH} == "sparc")
+.elif (${LIBC_MACHINE_ARCH} == "sparc")
.PATH: ${.CURDIR}/arch/sparc
COMMON_SRCS+= fenv.c
COPTS.e_sqrtl.c += -DHAVE_FENV_H
COMMON_SRCS+= s_fma.c s_fmaf.c s_fmal.c
-.elif (${MACHINE_ARCH} == "sparc64")
+.elif (${LIBC_MACHINE_ARCH} == "sparc64")
.PATH: ${.CURDIR}/arch/sparc64
COMMON_SRCS+= fenv.c s_nexttowardf.c \
s_nearbyint.c s_rintl.c
@@ -89,9 +92,9 @@
COMMON_SRCS+= s_nexttoward.c
.endif
COMMON_SRCS+= s_fma.c s_fmaf.c s_fmal.c
-.elif ((${MACHINE_ARCH} == "i386") || (${MACHINE_ARCH} == "x86_64"))
+.elif ((${LIBC_MACHINE_ARCH} == "i386") || (${LIBC_MACHINE_ARCH} == "x86_64"))
-.if (${MACHINE_ARCH} == "x86_64")
+.if (${LIBC_MACHINE_ARCH} == "x86_64")
.PATH: ${.CURDIR}/arch/x86_64
.endif
.PATH: ${.CURDIR}/arch/i387
@@ -113,10 +116,10 @@
# do not pick up the i387 asm version, it is incorrect
s_modf.o s_modf.pico s_modf.po s_modf.d: s_modf.c
-.if (${MACHINE_ARCH} == "i386")
+.if (${LIBC_MACHINE_ARCH} == "i386")
SUBDIR=arch/i387
.endif
-.elif (${MACHINE_ARCH} == "m68k")
+.elif (${LIBC_MACHINE_ARCH} == "m68k")
.if defined(M68060)
.PATH: ${.CURDIR}/arch/m68060
.include "${.CURDIR}/arch/m68060/Makefile.list"
@@ -137,7 +140,7 @@
.endif
.endif
# end of m68k
-.elif (${MACHINE_ARCH} == "vax")
+.elif (${LIBC_MACHINE_ARCH} == "vax")
.PATH: ${.CURDIR}/arch/vax
#NOIEEE_ARCH= n_infnan.S n_argred.S n_sqrt.S
@@ -154,11 +157,11 @@
.PATH: ${.CURDIR}/src
.PATH: ${.CURDIR}/noieee_src
-.if (${MACHINE_ARCH} == "alpha")
+.if (${LIBC_MACHINE_ARCH} == "alpha")
COPTS+= -mfp-rounding-mode=d
.endif
-.if (${MACHINE_ARCH} != "vax")
+.if (${LIBC_MACHINE_ARCH} != "vax")
CPPFLAGS+= -D_MULTI_LIBM -D_POSIX_MODE
# XXX noieee libm is gross
COPTS+= -fno-strict-aliasing
@@ -229,7 +232,7 @@
# NetBSD's C library supplies these functions:
#COMMON_SRCS+= s_fabs.c s_frexp.c s_isinf.c s_isnan.c s_ldexp.c s_modf.c
-.if (${MACHINE_ARCH} == "vax")
+.if (${LIBC_MACHINE_ARCH} == "vax")
SRCS= ${NOIEEE_SRCS} ${NOIEEE_ARCH}
.else
SRCS= ${COMMON_SRCS}
@@ -244,13 +247,13 @@
SRCS:=${SRCS:S/^${i:S/.S/.c/}/$i/}
.endfor
-.if (${MACHINE_ARCH} == "vax") # XXX until POLYD is written.
+.if (${LIBC_MACHINE_ARCH} == "vax") # XXX until POLYD is written.
.PATH: ${.CURDIR}/arch/vax
SRCS:=${SRCS} n_sqrt.S n_argred.S n_infnan.S n_atan2.S n_cabs.S n_cbrt.S \
n_support.S n_scalbn.S
.endif
-.if (${MACHINE_ARCH} == "i386")
+.if (${LIBC_MACHINE_ARCH} == "i386")
# XXX this gets miscompiled. There should be a better fix.
COPTS.s_tanh.c+= -O0
.endif
diff -r 8a0a9a327908 -r 5f25079408a6 lib/libposix/Makefile
--- a/lib/libposix/Makefile Sun Aug 10 22:55:49 2014 +0000
+++ b/lib/libposix/Makefile Sun Aug 10 23:25:49 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.16 2011/10/27 19:56:50 christos Exp $
+# $NetBSD: Makefile,v 1.17 2014/08/10 23:25:49 matt Exp $
LIB= posix
@@ -14,7 +14,7 @@
AFLAGS+=-I${ARCHDIR}
-.if ${MACHINE_ARCH} == "powerpc64"
+.if ${LIBC_MACHINE_ARCH} == "powerpc64"
# XXX: How come it does not resolve from libc?
.PATH.c: ${NETBSDSRCDIR}/lib/libc/gen
SRCS+= _errno.c
diff -r 8a0a9a327908 -r 5f25079408a6 lib/libpthread/Makefile
--- a/lib/libpthread/Makefile Sun Aug 10 22:55:49 2014 +0000
+++ b/lib/libpthread/Makefile Sun Aug 10 23:25:49 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.83 2013/10/09 22:33:41 matt Exp $
+# $NetBSD: Makefile,v 1.84 2014/08/10 23:25:49 matt Exp $
#
WARNS?= 5
@@ -8,6 +8,9 @@
.if defined(PTHREAD_MACHINE_ARCH) && !empty(PTHREAD_MACHINE_ARCH) && \
exists(${.CURDIR}/arch/${PTHREAD_MACHINE_ARCH})
ARCHSUBDIR= ${PTHREAD_MACHINE_ARCH}
+.elif defined(PTHREAD_MACHINE_CPU) && !empty(PTHREAD_MACHINE_CPU) && \
+ exists(${.CURDIR}/arch/${PTHREAD_MACHINE_CPU})
+ARCHSUBDIR= ${PTHREAD_MACHINE_CPU}
.elif exists(${.CURDIR}/arch/${MACHINE_ARCH})
ARCHSUBDIR= ${MACHINE_ARCH}
.elif exists(${.CURDIR}/arch/${MACHINE_CPU})
Home |
Main Index |
Thread Index |
Old Index