Switch to new style only if is explicitly set.

This commit is contained in:
uebayasi 2009-12-09 06:20:13 +00:00
parent 311d76439d
commit bf65171399
5 changed files with 25 additions and 25 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.17 2009/11/30 13:07:38 uebayasi Exp $
# $NetBSD: Makefile.inc,v 1.18 2009/12/09 06:20:13 uebayasi Exp $
.if ${MKGCC} != "no"
.if exists(${.CURDIR}/../arch/${MACHINE_ARCH}.mk)
@ -26,7 +26,7 @@ _TRADITIONAL_CPP=
COMPILE.S= ${CC} ${AFLAGS} ${CPPFLAGS} -c
.endif
.if !exists(${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.srcs.mk)
.if !defined(MKNATIVE_LIBGCC_NEW)
#
# Old style libgcc build procedure.
@ -117,7 +117,7 @@ dp-bit.c: ${.CURDIR}/Makefile
${_MKTARGET_CREATE}
printf '#define FLOAT\n#include <fp-bit.c>\n' >${.TARGET}
.else # exists(${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.srcs.mk)
.else # defined(MKNATIVE_LIBGCC_NEW)
#
# New style libgcc build procedure.
@ -133,7 +133,7 @@ dp-bit.c: ${.CURDIR}/Makefile
.include "${.CURDIR}/../Makefile.wrapper"
.endif # exists(${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.srcs.mk)
.endif # defined(MKNATIVE_LIBGCC_NEW)
#
# Common rules.

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.8 2009/11/30 13:07:38 uebayasi Exp $
# $NetBSD: Makefile,v 1.9 2009/12/09 06:20:13 uebayasi Exp $
REQUIRETOOLS= yes
NOLINT= # defined
@ -11,7 +11,7 @@ LIB= gcc
.cc: # disable .cc->NULL transform
.if !exists(${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.srcs.mk)
.if !defined(MKNATIVE_LIBGCC_NEW)
SRCS+= ${LIB2FUNCS} ${LIB2FUNCS_ST} ${LIB2DIVMOD} \
${G_LIB2ADD:T:S/.asm/.S/} ${LIB1ASMFUNCS}
@ -19,7 +19,7 @@ SRCS+= ${LIB2FUNCS} ${LIB2FUNCS_ST} ${LIB2DIVMOD} \
SRCS+= ${LIB2_EH}
.endif
.else # exists(${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.srcs.mk)
.else # defined(MKNATIVE_LIBGCC_NEW)
# New style.
TMPLSRCS= ${TMPLSRCS.libgcc.a}
@ -27,11 +27,11 @@ TMPLFPSRCS= ${TMPLFPSRCS.libgcc.a}
TMPLASMSRCS= ${TMPLASMSRCS.libgcc.a}
SRCS= ${SRCS.libgcc.a}
.endif # exists(${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.srcs.mk)
.endif # defined(MKNATIVE_LIBGCC_NEW)
.include <bsd.lib.mk>
.if !exists(${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.srcs.mk)
.if !defined(MKNATIVE_LIBGCC_NEW)
CLEANFILES+= ${SOBJS:=.tmp1} ${SOBJS:=.tmp2}
@ -63,7 +63,7 @@ CLEANFILES+= ${SOBJS:=.tmp1} ${SOBJS:=.tmp2}
.endif
rm -f ${.TARGET}.tmp1
.endif # !exists(${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.srcs.mk)
.endif # !defined(MKNATIVE_LIBGCC_NEW)
.else
.include <bsd.prog.mk> # do nothing

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.6 2009/11/30 13:07:38 uebayasi Exp $
# $NetBSD: Makefile,v 1.7 2009/12/09 06:20:14 uebayasi Exp $
REQUIRETOOLS= yes
NOLINT= # defined
@ -11,12 +11,12 @@ LIB= gcc_eh
.cc: # disable .cc->NULL transform
.if !exists(${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.srcs.mk)
.if !defined(MKNATIVE_LIBGCC_NEW)
SRCS+= ${LIB2_EH}
COPTS.unwind-dw2.c = -Wno-stack-protector
.else # exists(${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.srcs.mk)
.else # defined(MKNATIVE_LIBGCC_NEW)
# New style.
TMPLSRCS= ${TMPLSRCS.libgcc_eh.a}
@ -24,7 +24,7 @@ TMPLFPSRCS= ${TMPLFPSRCS.libgcc_eh.a}
TMPLASMSRCS= ${TMPLASMSRCS.libgcc_eh.a}
SRCS= ${SRCS.libgcc_eh.a}
.endif # exists(${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.srcs.mk)
.endif # defined(MKNATIVE_LIBGCC_NEW)
.include <bsd.lib.mk>

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.9 2009/11/30 13:07:38 uebayasi Exp $
# $NetBSD: Makefile,v 1.10 2009/12/09 06:20:14 uebayasi Exp $
USE_SHLIBDIR= yes
REQUIRETOOLS= yes
@ -21,12 +21,12 @@ SHLIB_MINOR= 0
LDFLAGS+= -nodefaultlibs
LDFLAGS+= -Wl,--version-script=${.OBJDIR}/libgcc.map
.if !exists(${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.srcs.mk)
.if !defined(MKNATIVE_LIBGCC_NEW)
SRCS+= ${LIB2FUNCS} ${LIB2DIVMOD} ${LIB2_EH} \
${G_LIB2ADD:T:S/.asm/.S/} ${LIB1ASMFUNCS}
.else # exists(${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.srcs.mk)
.else # defined(MKNATIVE_LIBGCC_NEW)
# New style.
TMPLSRCS= ${TMPLSRCS.libgcc_s.so}
@ -34,7 +34,7 @@ TMPLFPSRCS= ${TMPLFPSRCS.libgcc_s.so}
TMPLASMSRCS= ${TMPLASMSRCS.libgcc_s.so}
SRCS= ${SRCS.libgcc_s.so}
.endif # exists(${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.srcs.mk)
.endif # defined(MKNATIVE_LIBGCC_NEW)
COPTS.unwind-dw2.c = -Wno-stack-protector

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.5 2009/11/30 13:24:32 uebayasi Exp $
# $NetBSD: Makefile,v 1.6 2009/12/09 06:20:14 uebayasi Exp $
REQUIRETOOLS= yes
NOPIC= # defined
@ -9,7 +9,7 @@ LIB= gcov
.include <bsd.own.mk>
.if exists(${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk) && ${MKGCC} != "no"
.if defined(MKNATIVE_LIBGCC_NEW) && ${MKGCC} != "no"
.include "${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk"
@ -18,12 +18,12 @@ LIBGCOVSRCS= ${G_LIBGCOV:=.c}
CPPFLAGS+= -I${.CURDIR}/arch/${MACHINE_ARCH}
CPPFLAGS+= -Wno-stack-protector
.if !exists(${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.srcs.mk)
.if !defined(MKNATIVE_LIBGCC_NEW)
DPSRCS+= ${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk
SRCS+= ${LIBGCOVSRCS}
.else # exists(${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.srcs.mk)
.else # defined(MKNATIVE_LIBGCC_NEW)
# New style.
SRCS= ${SRCS.libgcov.a}
@ -31,9 +31,9 @@ TMPLSRCS= ${TMPLSRCS.libgcov.a}
TMPLFPSRCS= ${TMPLFPSRCS.libgcov.a}
TMPLASMSRCS= ${TMPLASMSRCS.libgcov.a}
.endif # exists(${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.srcs.mk)
.endif # defined(MKNATIVE_LIBGCC_NEW)
.if !exists(${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.srcs.mk)
.if !defined(MKNATIVE_LIBGCC_NEW)
CLEANFILES+= ${LIBGCOVSRCS}
@ -41,7 +41,7 @@ ${LIBGCOVSRCS}: ${.CURDIR}/Makefile
${_MKTARGET_CREATE}
printf '#define L${.PREFIX}\n#include <libgcov.c>\n' >${.TARGET}
.endif # !exists(${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.srcs.mk)
.endif # !defined(MKNATIVE_LIBGCC_NEW)
.include <bsd.lib.mk>
.else