Source-Changes-HG archive

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

[src/trunk]: src/external/gpl3/gcc/usr.bin - move various stuff into Makefile...



details:   https://anonhg.NetBSD.org/src/rev/4f77ace704f7
branches:  trunk
changeset: 448394:4f77ace704f7
user:      mrg <mrg%NetBSD.org@localhost>
date:      Fri Feb 01 10:34:18 2019 +0000

description:
- move various stuff into Makefile.prog
- make sure VER_CPPFLAGS is applied to all required files
- add ADD_FRONTEND_LIBRARY to avoid linking libfrontend, while
  using the rest of this fragment

diffstat:

 external/gpl3/gcc/usr.bin/Makefile.backend     |  16 ++--------------
 external/gpl3/gcc/usr.bin/Makefile.frontend    |  13 ++++---------
 external/gpl3/gcc/usr.bin/Makefile.gcc-tool    |  11 +++--------
 external/gpl3/gcc/usr.bin/Makefile.prog        |  21 +++++++++++++++++++++
 external/gpl3/gcc/usr.bin/cc1/Makefile         |   6 +-----
 external/gpl3/gcc/usr.bin/cc1obj/Makefile      |   6 +-----
 external/gpl3/gcc/usr.bin/cc1plus/Makefile     |   6 +-----
 external/gpl3/gcc/usr.bin/gcov-dump/Makefile   |  13 +++----------
 external/gpl3/gcc/usr.bin/gcov/Makefile        |  11 ++---------
 external/gpl3/gcc/usr.bin/lto-wrapper/Makefile |  26 ++++++++++++++------------
 10 files changed, 52 insertions(+), 77 deletions(-)

diffs (282 lines):

diff -r 166d343e43c1 -r 4f77ace704f7 external/gpl3/gcc/usr.bin/Makefile.backend
--- a/external/gpl3/gcc/usr.bin/Makefile.backend        Fri Feb 01 10:32:32 2019 +0000
+++ b/external/gpl3/gcc/usr.bin/Makefile.backend        Fri Feb 01 10:34:18 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.backend,v 1.7 2018/02/11 02:12:28 christos Exp $
+#      $NetBSD: Makefile.backend,v 1.8 2019/02/01 10:34:18 mrg Exp $
 
 .ifndef _EXTERNAL_GPL3_GCC_USR_BIN_MAKEFILE_BACKEND_
 _EXTERNAL_GPL3_GCC_USR_BIN_MAKEFILE_BACKEND_=1
@@ -17,19 +17,7 @@
 
 .include "../Makefile.common"
 .include "../Makefile.libiberty"
-
-HOSTPROG_CXX=  1
-
-.include <bsd.prog.mk>
-
-# Force using C++ for this
-HOST_CC:=      ${HOST_CXX}
-CC:=           ${CXX}
-CFLAGS:=       ${CXXFLAGS}
-
-# Don't auto-frob .y or .l files.
-.l.c .y.c .y.h:
-       @true
+.include "../Makefile.prog"
 
 # Find our (local) libraries
 LIBGMPDIR!=    cd ${GMPDISTDIR}/lib/libgmp && ${PRINTOBJDIR}
diff -r 166d343e43c1 -r 4f77ace704f7 external/gpl3/gcc/usr.bin/Makefile.frontend
--- a/external/gpl3/gcc/usr.bin/Makefile.frontend       Fri Feb 01 10:32:32 2019 +0000
+++ b/external/gpl3/gcc/usr.bin/Makefile.frontend       Fri Feb 01 10:34:18 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.frontend,v 1.5 2018/02/11 02:12:28 christos Exp $
+#      $NetBSD: Makefile.frontend,v 1.6 2019/02/01 10:34:18 mrg Exp $
 
 BINDIR=                /usr/bin
 
@@ -9,8 +9,10 @@
 NOCTF=         # defined
 .include <bsd.init.mk>
 
+.if ${ADD_FRONTEND_LIBRARY:Uyes} != "no"
 DPADD+=                        ${FRONTENDOBJ}/libfrontend.a
 LDADD+=                        -L${FRONTENDOBJ} -lfrontend
+.endif
 
 .include "../Makefile.common"
 .include "../Makefile.common-target"
@@ -19,14 +21,7 @@
 .include "../Makefile.libiberty"
 .include "../Makefile.libdecnumber"
 
-HOSTPROG_CXX=  1
-
-.include <bsd.prog.mk>
-
-# Force using C++ for this
-HOST_CC:=      ${HOST_CXX}
-CC:=           ${CXX}
-CFLAGS:=       ${CXXFLAGS}
+.include "../Makefile.prog"
 
 gcc-vers.texi:
        (echo "@set version-GCC $(BASEVER)"; \
diff -r 166d343e43c1 -r 4f77ace704f7 external/gpl3/gcc/usr.bin/Makefile.gcc-tool
--- a/external/gpl3/gcc/usr.bin/Makefile.gcc-tool       Fri Feb 01 10:32:32 2019 +0000
+++ b/external/gpl3/gcc/usr.bin/Makefile.gcc-tool       Fri Feb 01 10:34:18 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.gcc-tool,v 1.2 2014/05/31 22:55:16 mrg Exp $
+#      $NetBSD: Makefile.gcc-tool,v 1.3 2019/02/01 10:34:18 mrg Exp $
 
 PROG=  gcc-${GCC_TOOL}
 SRCS=  gcc-ar.c file-find.c
@@ -23,19 +23,14 @@
 BINDIR=                /usr/bin
 NOMAN=         # defined
 
-.include <bsd.prog.mk>
-
-# Force using C++ for this
-HOST_CC:=      ${HOST_CXX}
-CC:=           ${CXX}
-CFLAGS:=       ${CXXFLAGS}
-
 .include "../Makefile.common"
 .include "../Makefile.libcpp"
 .include "../Makefile.backtrace"
 .include "../Makefile.libiberty"
 .include "../Makefile.libdecnumber"
 
+.include "../Makefile.prog"
+
 COPTS+=                -Wno-stack-protector
 
 .PATH: ${DIST}/gcc
diff -r 166d343e43c1 -r 4f77ace704f7 external/gpl3/gcc/usr.bin/Makefile.prog
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gcc/usr.bin/Makefile.prog   Fri Feb 01 10:34:18 2019 +0000
@@ -0,0 +1,21 @@
+#      $NetBSD: Makefile.prog,v 1.1 2019/02/01 10:34:18 mrg Exp $
+
+# common fragment for any thing linking with C++
+
+.ifndef _EXTERNAL_GPL3_GCC_USR_BIN_MAKEFILE_PROG_
+_EXTERNAL_GPL3_GCC_USR_BIN_MAKEFILE_PROG_=1
+
+HOSTPROG_CXX=  1
+
+.include <bsd.prog.mk>
+
+# Force using C++ for this
+HOST_CC:=      ${HOST_CXX}
+CC:=           ${CXX}
+CFLAGS:=       ${CXXFLAGS}
+
+# Don't auto-frob .y or .l files.
+.l.c .y.c .y.h:
+       @true
+
+.endif
diff -r 166d343e43c1 -r 4f77ace704f7 external/gpl3/gcc/usr.bin/cc1/Makefile
--- a/external/gpl3/gcc/usr.bin/cc1/Makefile    Fri Feb 01 10:32:32 2019 +0000
+++ b/external/gpl3/gcc/usr.bin/cc1/Makefile    Fri Feb 01 10:34:18 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.12 2016/03/24 00:02:52 christos Exp $
+#      $NetBSD: Makefile,v 1.13 2019/02/01 10:34:18 mrg Exp $
 
 PROG=          cc1
 SRCS=          ${G_C_OBJS:S,c-family/,,:S,c/,,:Nlibcpp.a:.o=.c} main.c ${PROG}-checksum.c
@@ -28,10 +28,6 @@
 # XXX check this out, probably need it for plugins?
 # LDFLAGS+=    -rdynamic
 
-# VER_CPPFLAGS from Makefile.inc
-CPPFLAGS.c-cppbuiltin.c=       ${VER_CPPFLAGS}
-c-cppbuiltin.c: ${GCCARCH}/defs.mk
-
 COPTS.c-ada-spec.c=    -Wno-stack-protector
 COPTS.c-aux-info.c=    -Wno-stack-protector
 COPTS.c-common.c=      -Wno-stack-protector
diff -r 166d343e43c1 -r 4f77ace704f7 external/gpl3/gcc/usr.bin/cc1obj/Makefile
--- a/external/gpl3/gcc/usr.bin/cc1obj/Makefile Fri Feb 01 10:32:32 2019 +0000
+++ b/external/gpl3/gcc/usr.bin/cc1obj/Makefile Fri Feb 01 10:34:18 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.10 2016/03/24 00:02:52 christos Exp $
+#      $NetBSD: Makefile,v 1.11 2019/02/01 10:34:18 mrg Exp $
 
 MYOBJS=                ${G_OBJC_OBJS} ${G_C_AND_OBJC_OBJS} 
 PROG=          cc1obj
@@ -31,10 +31,6 @@
 # XXX check this out
 # LDFLAGS+=    -rdynamic
 
-# VER_CPPFLAGS from Makefile.inc
-CPPFLAGS.c-cppbuiltin.c=       ${VER_CPPFLAGS}
-c-cppbuiltin.c: ${GCCARCH}/defs.mk
-
 COPTS.c-ada-spec.c+=                   -Wno-stack-protector
 COPTS.c-aux-info.c+=                   -Wno-stack-protector
 COPTS.c-common.c+=                     -Wno-stack-protector
diff -r 166d343e43c1 -r 4f77ace704f7 external/gpl3/gcc/usr.bin/cc1plus/Makefile
--- a/external/gpl3/gcc/usr.bin/cc1plus/Makefile        Fri Feb 01 10:32:32 2019 +0000
+++ b/external/gpl3/gcc/usr.bin/cc1plus/Makefile        Fri Feb 01 10:34:18 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.10 2016/03/24 00:02:52 christos Exp $
+#      $NetBSD: Makefile,v 1.11 2019/02/01 10:34:18 mrg Exp $
 
 PROG=          cc1plus
 SRCS=          ${G_CXX_OBJS:S,c-family/,,:S,cp/,,:Nlibcpp.a:.o=.c} main.c ${PROG}-checksum.c
@@ -31,10 +31,6 @@
 # XXX check this out
 # LDFLAGS+=   -rdynamic
 
-## VER_CPPFLAGS from Makefile.inc
-#CPPFLAGS.c-cppbuiltin.c=      ${VER_CPPFLAGS}
-#c-cppbuiltin.c: ${GCCARCH}/defs.mk
-
 # YUCK.  but see timevar.h:POP_TIMEVAR_AND_RETURN
 CFLAGS+=       -Wno-error # not good enough: -Wno-return-type
 COPTS+=                -Wno-stack-protector
diff -r 166d343e43c1 -r 4f77ace704f7 external/gpl3/gcc/usr.bin/gcov-dump/Makefile
--- a/external/gpl3/gcc/usr.bin/gcov-dump/Makefile      Fri Feb 01 10:32:32 2019 +0000
+++ b/external/gpl3/gcc/usr.bin/gcov-dump/Makefile      Fri Feb 01 10:34:18 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.2 2018/02/11 02:12:29 christos Exp $
+#      $NetBSD: Makefile,v 1.3 2019/02/01 10:34:19 mrg Exp $
 
 .include <bsd.init.mk>
 
@@ -11,21 +11,14 @@
 
 MAN=           gcov-dump.1
 
-HOSTPROG_CXX=  1
-
-.include <bsd.prog.mk>
-
-# Force using C++ for this
-HOST_CC:=      ${HOST_CXX}
-CC:=           ${CXX}
-CFLAGS:=       ${CXXFLAGS} -Wno-stack-protector
-
 .include "../Makefile.common"
 .include "../Makefile.libcpp"
 .include "../Makefile.backtrace"
 .include "../Makefile.libiberty"
 .include "../Makefile.libdecnumber"
 
+.include "../Makefile.prog"
+
 LDADD+=                -lintl
 DPADD+=                ${LIBINTL}
 
diff -r 166d343e43c1 -r 4f77ace704f7 external/gpl3/gcc/usr.bin/gcov/Makefile
--- a/external/gpl3/gcc/usr.bin/gcov/Makefile   Fri Feb 01 10:32:32 2019 +0000
+++ b/external/gpl3/gcc/usr.bin/gcov/Makefile   Fri Feb 01 10:34:18 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.7 2018/02/11 02:12:29 christos Exp $
+#      $NetBSD: Makefile,v 1.8 2019/02/01 10:34:18 mrg Exp $
 
 .include <bsd.init.mk>
 
@@ -11,14 +11,7 @@
 
 MAN=           gcov.1
 
-HOSTPROG_CXX=  1
-
-.include <bsd.prog.mk>
-
-# Force using C++ for this
-HOST_CC:=      ${HOST_CXX}
-CC:=           ${CXX}
-CFLAGS:=       ${CXXFLAGS} -Wno-stack-protector
+.include "../Makefile.prog"
 
 .include "../Makefile.common"
 .include "../Makefile.libcpp"
diff -r 166d343e43c1 -r 4f77ace704f7 external/gpl3/gcc/usr.bin/lto-wrapper/Makefile
--- a/external/gpl3/gcc/usr.bin/lto-wrapper/Makefile    Fri Feb 01 10:32:32 2019 +0000
+++ b/external/gpl3/gcc/usr.bin/lto-wrapper/Makefile    Fri Feb 01 10:34:18 2019 +0000
@@ -1,24 +1,26 @@
-#      $NetBSD: Makefile,v 1.3 2016/03/18 17:52:30 christos Exp $
+#      $NetBSD: Makefile,v 1.4 2019/02/01 10:34:19 mrg Exp $
 
 NOMAN=1
 PROG=          lto-wrapper
+# XXX pullout from LTO_WRAPPER_OBJS
 SRCS=          lto-wrapper.c \
-               collect-utils.c
-CPPFLAGS+=     -DPREFIX=\"/usr\"
+               collect-utils.c \
+               ggc-none.o
+
+BINDIR=                /usr/libexec
 
-.include "../Makefile.backend"
+CPPFLAGS+=     -DPREFIX=\"/usr\" -I${GCCARCH} -I${G_ALL_CPPFLAGS}
+
+.include "../Makefile.prog"
+.include "../Makefile.target-defines"
+.include "../Makefile.common-target"
+.include "../Makefile.common"
+.include "../Makefile.libcpp"
 .include "../Makefile.backtrace"
-.include "../Makefile.common-target"
-.include "../Makefile.libcpp"
+.include "../Makefile.libiberty"
 
 COPTS.lto-wrapper.c=   -Wno-stack-protector
 
-
-DPADD+=                 ${LIBIBERTYOBJ}/libiberty.a
-LDADD+=                 ${LIBIBERTYOBJ}/libiberty.a
-
-# VER_CPPFLAGS from Makefile.inc
-
 LDADD+=        ${LIBMPC} ${LIBMPFR} ${LIBGMP} -lintl -lz -lm
 DPADD+=        ${LIBMPC} ${LIBMPFR} ${LIBGMP} ${LIBINTL} ${LIBZ} ${LIBM}
 



Home | Main Index | Thread Index | Old Index