Source-Changes-HG archive

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

[src/trunk]: src/gnu/lib/libgcc4 Enable the new style build if the new style ...



details:   https://anonhg.NetBSD.org/src/rev/296056179a60
branches:  trunk
changeset: 749471:296056179a60
user:      uebayasi <uebayasi%NetBSD.org@localhost>
date:      Mon Nov 30 13:07:38 2009 +0000

description:
Enable the new style build if the new style generated makefiles exist.

diffstat:

 gnu/lib/libgcc4/Makefile.inc       |  48 ++++++++++++++++++++++++++++++-------
 gnu/lib/libgcc4/libgcc/Makefile    |  18 +++++++++++++-
 gnu/lib/libgcc4/libgcc_eh/Makefile |  14 ++++++++++-
 gnu/lib/libgcc4/libgcc_s/Makefile  |  14 ++++++++++-
 gnu/lib/libgcc4/libgcov/Makefile   |  16 +++++++++++-
 5 files changed, 96 insertions(+), 14 deletions(-)

diffs (223 lines):

diff -r b1cb773f3878 -r 296056179a60 gnu/lib/libgcc4/Makefile.inc
--- a/gnu/lib/libgcc4/Makefile.inc      Mon Nov 30 12:32:13 2009 +0000
+++ b/gnu/lib/libgcc4/Makefile.inc      Mon Nov 30 13:07:38 2009 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.inc,v 1.16 2009/11/30 12:07:28 uebayasi Exp $
+#      $NetBSD: Makefile.inc,v 1.17 2009/11/30 13:07:38 uebayasi Exp $
 
 .if ${MKGCC} != "no"
 .if exists(${.CURDIR}/../arch/${MACHINE_ARCH}.mk)
@@ -16,7 +16,21 @@
 CPPFLAGS+=     -I${.CURDIR} -I${GCCARCHLIBGCC}
 CPPFLAGS+=     -I${GCCARCH} ${GCPPFLAGS:M-D*} ${GCPPFLAGS:M-I*:N-I.*}
 CPPFLAGS+=     -I${G_EXTRA_HEADERS:M/*:H:u}
-CPPFLAGS+=     -I${DIST}/gcc/cp -I${DIST}/gcc/config -I${GCCARCHXX} -I.
+CPPFLAGS+=     -I${DIST} -I${DIST}/gcc/cp -I${DIST}/gcc/config -I${GCCARCHXX} -I.
+
+.if ${MACHINE_ARCH} == "powerpc" || \
+    ${MACHINE_ARCH} == "sh3el" || \
+    ${MACHINE_ARCH} == "sh3eb" || \
+    ${MACHINE_ARCH} == "m68000"
+_TRADITIONAL_CPP=
+COMPILE.S=     ${CC} ${AFLAGS} ${CPPFLAGS} -c
+.endif
+
+.if !exists(${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.srcs.mk)
+
+#
+# Old style libgcc build procedure.
+#
 
 # This is copied from gcc/mklibgcc.in:$lib2funcs
 LIB2FUNCS_ALL= _muldi3 _negdi2 _lshrdi3 _ashldi3 _ashrdi3 \
@@ -65,14 +79,6 @@
 CPPFLAGS.xfgnulib.c+=-DEXTFLOAT=1
 .endif
 
-.if ${MACHINE_ARCH} == "powerpc" || \
-    ${MACHINE_ARCH} == "sh3el" || \
-    ${MACHINE_ARCH} == "sh3eb" || \
-    ${MACHINE_ARCH} == "m68000"
-_TRADITIONAL_CPP=
-COMPILE.S=     ${CC} ${AFLAGS} ${CPPFLAGS} -c
-.endif
-
 .if ${MACHINE_ARCH} == "powerpc64"
 COPTS+=        -mlong-double-128
 .endif
@@ -111,6 +117,28 @@
        ${_MKTARGET_CREATE}
        printf '#define FLOAT\n#include <fp-bit.c>\n' >${.TARGET}
 
+.else  # exists(${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.srcs.mk)
+
+#
+# New style libgcc build procedure.
+#
+
+.include "${.CURDIR}/../arch/${MACHINE_ARCH}/srcs.tmplsrcs.mk"
+.include "${.CURDIR}/../arch/${MACHINE_ARCH}/srcs.cppflags.mk"
+.include "${.CURDIR}/../arch/${MACHINE_ARCH}/srcs.copts.mk"
+.include "${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.srcs.mk"
+.include "${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.tmplsrcs.tmplsrcs.mk"
+.include "${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.tmplsrcs.tmplfpsrcs.mk"
+.include "${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.tmplsrcs.tmplasmsrcs.mk"
+
+.include "${.CURDIR}/../Makefile.wrapper"
+
+.endif # exists(${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.srcs.mk)
+
+#
+# Common rules.
+#
+
 .PATH: ${DIST}/gcc ${DIST}/gcc/cp ${DIST}/gcc/cp/inc ${DIST}/gcc/config \
        ${G_CONFIGDIR}
 
diff -r b1cb773f3878 -r 296056179a60 gnu/lib/libgcc4/libgcc/Makefile
--- a/gnu/lib/libgcc4/libgcc/Makefile   Mon Nov 30 12:32:13 2009 +0000
+++ b/gnu/lib/libgcc4/libgcc/Makefile   Mon Nov 30 13:07:38 2009 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.7 2008/10/26 07:04:04 mrg Exp $
+#      $NetBSD: Makefile,v 1.8 2009/11/30 13:07:38 uebayasi Exp $
 
 REQUIRETOOLS=  yes
 NOLINT=                # defined
@@ -11,14 +11,28 @@
 
 .cc: # disable .cc->NULL transform
 
+.if !exists(${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.srcs.mk)
+
 SRCS+=         ${LIB2FUNCS} ${LIB2FUNCS_ST} ${LIB2DIVMOD} \
                ${G_LIB2ADD:T:S/.asm/.S/} ${LIB1ASMFUNCS}
 .if ${MKPIC} == "no"
 SRCS+=         ${LIB2_EH}
 .endif
 
+.else  # exists(${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.srcs.mk)
+
+# New style.
+TMPLSRCS=      ${TMPLSRCS.libgcc.a}
+TMPLFPSRCS=    ${TMPLFPSRCS.libgcc.a}
+TMPLASMSRCS=   ${TMPLASMSRCS.libgcc.a}
+SRCS=          ${SRCS.libgcc.a}
+
+.endif # exists(${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.srcs.mk)
+
 .include <bsd.lib.mk>
 
+.if !exists(${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.srcs.mk)
+
 CLEANFILES+=   ${SOBJS:=.tmp1} ${SOBJS:=.tmp2}
 
 .c.so:
@@ -49,6 +63,8 @@
 .endif
        rm -f ${.TARGET}.tmp1
 
+.endif # !exists(${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.srcs.mk)
+
 .else
 .include <bsd.prog.mk> # do nothing
 .endif
diff -r b1cb773f3878 -r 296056179a60 gnu/lib/libgcc4/libgcc_eh/Makefile
--- a/gnu/lib/libgcc4/libgcc_eh/Makefile        Mon Nov 30 12:32:13 2009 +0000
+++ b/gnu/lib/libgcc4/libgcc_eh/Makefile        Mon Nov 30 13:07:38 2009 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.5 2008/09/18 12:20:19 skrll Exp $
+#      $NetBSD: Makefile,v 1.6 2009/11/30 13:07:38 uebayasi Exp $
 
 REQUIRETOOLS=  yes
 NOLINT=                # defined
@@ -11,9 +11,21 @@
 
 .cc: # disable .cc->NULL transform
 
+.if !exists(${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.srcs.mk)
+
 SRCS+=         ${LIB2_EH}
 COPTS.unwind-dw2.c = -Wno-stack-protector
 
+.else  # exists(${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.srcs.mk)
+
+# New style.
+TMPLSRCS=      ${TMPLSRCS.libgcc_eh.a}
+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)
+
 .include <bsd.lib.mk>
 
 .else
diff -r b1cb773f3878 -r 296056179a60 gnu/lib/libgcc4/libgcc_s/Makefile
--- a/gnu/lib/libgcc4/libgcc_s/Makefile Mon Nov 30 12:32:13 2009 +0000
+++ b/gnu/lib/libgcc4/libgcc_s/Makefile Mon Nov 30 13:07:38 2009 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.8 2009/05/01 15:27:20 christos Exp $
+#      $NetBSD: Makefile,v 1.9 2009/11/30 13:07:38 uebayasi Exp $
 
 USE_SHLIBDIR=  yes
 REQUIRETOOLS=  yes
@@ -21,9 +21,21 @@
 LDFLAGS+=      -nodefaultlibs
 LDFLAGS+=      -Wl,--version-script=${.OBJDIR}/libgcc.map
 
+.if !exists(${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.srcs.mk)
+
 SRCS+=         ${LIB2FUNCS} ${LIB2DIVMOD} ${LIB2_EH} \
                ${G_LIB2ADD:T:S/.asm/.S/} ${LIB1ASMFUNCS}
 
+.else  # exists(${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.srcs.mk)
+
+# New style.
+TMPLSRCS=      ${TMPLSRCS.libgcc_s.so}
+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)
+
 COPTS.unwind-dw2.c = -Wno-stack-protector
 
 DPADD+=                libgcc.map
diff -r b1cb773f3878 -r 296056179a60 gnu/lib/libgcc4/libgcov/Makefile
--- a/gnu/lib/libgcc4/libgcov/Makefile  Mon Nov 30 12:32:13 2009 +0000
+++ b/gnu/lib/libgcc4/libgcov/Makefile  Mon Nov 30 13:07:38 2009 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.3 2008/10/06 14:20:12 tron Exp $
+#      $NetBSD: Makefile,v 1.4 2009/11/30 13:07:38 uebayasi Exp $
 
 REQUIRETOOLS=  yes
 NOPIC=         # defined
@@ -18,14 +18,28 @@
 CPPFLAGS+=     -I${.CURDIR}/arch/${MACHINE_ARCH}
 CPPFLAGS+=     -Wno-stack-protector
 
+.if !exists(${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.srcs.mk)
+
 DPSRCS+=       ${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk
 SRCS+=         ${LIBGCOVSRCS}
 
+.else  # exists(${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.srcs.mk)
+
+# New style.
+SRCS=          ${SRCS.libgcov.a}
+TMPLSRCS=      ${TMPLSRCS.libgcov.a}
+TMPLFPSRCS=    ${TMPLFPSRCS.libgcov.a}
+TMPLASMSRCS=   ${TMPLASMSRCS.libgcov.a}
+
+.endif # exists(${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.srcs.mk)
+
 CLEANFILES+=   ${LIBGCOVSRCS}
 
+.if !exists(${.CURDIR}/../arch/${MACHINE_ARCH}/libs.lib${LIB}.srcs.mk)
 ${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)
 
 .include <bsd.lib.mk>
 .else



Home | Main Index | Thread Index | Old Index