From 8147e6c899bb8d1c7c5db7a6bdd1ed5f3b83c32d Mon Sep 17 00:00:00 2001 From: mrg Date: Fri, 23 Apr 2021 01:56:14 +0000 Subject: [PATCH] build new GCC 10 lto-dump(1) tool. --- distrib/sets/lists/comp/mi | 6 +++- external/gpl3/gcc/usr.bin/Makefile | 4 +-- external/gpl3/gcc/usr.bin/Makefile.backend | 4 ++- external/gpl3/gcc/usr.bin/gcov-dump/Makefile | 4 +-- external/gpl3/gcc/usr.bin/lto-dump/Makefile | 35 ++++++++++++++++++++ 5 files changed, 46 insertions(+), 7 deletions(-) create mode 100644 external/gpl3/gcc/usr.bin/lto-dump/Makefile diff --git a/distrib/sets/lists/comp/mi b/distrib/sets/lists/comp/mi index 8217d5cb8a72..8a7054dc5046 100644 --- a/distrib/sets/lists/comp/mi +++ b/distrib/sets/lists/comp/mi @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.2381 2021/04/23 01:53:55 mrg Exp $ +# $NetBSD: mi,v 1.2382 2021/04/23 01:56:14 mrg Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. ./etc/mtree/set.comp comp-sys-root @@ -55,6 +55,7 @@ ./usr/bin/llvm-symbolizer comp-c-bin llvm ./usr/bin/llvm-tblgen comp-c-bin llvm ./usr/bin/lorder comp-util-bin +./usr/bin/lto-dump comp-c-bin gcccmds,gcc=10 ./usr/bin/luac comp-util-bin ./usr/bin/menuc comp-c-bin ./usr/bin/mkstr comp-c-bin @@ -4386,6 +4387,7 @@ ./usr/share/man/cat1/lexdoc.0 comp-obsolete obsolete ./usr/share/man/cat1/lint.0 comp-c-catman .cat ./usr/share/man/cat1/lorder.0 comp-util-catman .cat +./usr/share/man/cat1/lto-dump.0 comp-c-catman gcccmds,.cat,gcc=10 ./usr/share/man/cat1/luac.0 comp-util-catman .cat ./usr/share/man/cat1/menuc.0 comp-c-catman .cat ./usr/share/man/cat1/mkstr.0 comp-c-catman .cat @@ -12726,6 +12728,7 @@ ./usr/share/man/html1/lex.html comp-c-htmlman html ./usr/share/man/html1/lint.html comp-c-htmlman html ./usr/share/man/html1/lorder.html comp-util-htmlman html +./usr/share/man/html1/lto-dump.html comp-c-htmlman gcccmds,html,gcc=10 ./usr/share/man/html1/luac.html comp-util-htmlman html ./usr/share/man/html1/menuc.html comp-c-htmlman html ./usr/share/man/html1/mkstr.html comp-c-htmlman html @@ -20855,6 +20858,7 @@ ./usr/share/man/man1/lex.1 comp-c-man .man ./usr/share/man/man1/lint.1 comp-c-man .man ./usr/share/man/man1/lorder.1 comp-util-man .man +./usr/share/man/man1/lto-dump.1 comp-c-man gcccmds,.man,gcc=10 ./usr/share/man/man1/luac.1 comp-util-man .man ./usr/share/man/man1/menuc.1 comp-c-man .man ./usr/share/man/man1/mkstr.1 comp-c-man .man diff --git a/external/gpl3/gcc/usr.bin/Makefile b/external/gpl3/gcc/usr.bin/Makefile index fed8b0896f83..237aee659e3f 100644 --- a/external/gpl3/gcc/usr.bin/Makefile +++ b/external/gpl3/gcc/usr.bin/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2019/01/18 17:31:55 christos Exp $ +# $NetBSD: Makefile,v 1.12 2021/04/23 01:56:14 mrg Exp $ NOOBJ=# defined @@ -18,7 +18,7 @@ SUBDIR+= host-libiberty .WAIT \ common common-target .WAIT \ libcpp libdecnumber .WAIT \ gcov gcov-dump cc1 cc1obj cc1plus cpp g++ gcc \ - lto1 lto-wrapper \ + lto1 lto-wrapper lto-dump \ include .endif diff --git a/external/gpl3/gcc/usr.bin/Makefile.backend b/external/gpl3/gcc/usr.bin/Makefile.backend index bfeaec08d111..59a9e20e74cd 100644 --- a/external/gpl3/gcc/usr.bin/Makefile.backend +++ b/external/gpl3/gcc/usr.bin/Makefile.backend @@ -1,11 +1,13 @@ -# $NetBSD: Makefile.backend,v 1.9 2020/09/05 14:24:25 mrg Exp $ +# $NetBSD: Makefile.backend,v 1.10 2021/04/23 01:56:14 mrg Exp $ .ifndef _EXTERNAL_GPL3_GCC_USR_BIN_MAKEFILE_BACKEND_ _EXTERNAL_GPL3_GCC_USR_BIN_MAKEFILE_BACKEND_=1 +.if ${PROG} != "lto-dump" NOMAN= # defined NOCTF= # defined BINDIR= /usr/libexec +.endif CPPFLAGS+= -I${GCCARCH} -I${BACKENDOBJ} \ ${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*} diff --git a/external/gpl3/gcc/usr.bin/gcov-dump/Makefile b/external/gpl3/gcc/usr.bin/gcov-dump/Makefile index c21ee1c77ea0..8351096a4ba8 100644 --- a/external/gpl3/gcc/usr.bin/gcov-dump/Makefile +++ b/external/gpl3/gcc/usr.bin/gcov-dump/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2019/02/01 10:34:19 mrg Exp $ +# $NetBSD: Makefile,v 1.4 2021/04/23 01:56:14 mrg Exp $ .include @@ -9,8 +9,6 @@ CPPFLAGS+= -I${GCCARCH} -I${BACKENDOBJ} ${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N BINDIR= /usr/bin -MAN= gcov-dump.1 - .include "../Makefile.common" .include "../Makefile.libcpp" .include "../Makefile.backtrace" diff --git a/external/gpl3/gcc/usr.bin/lto-dump/Makefile b/external/gpl3/gcc/usr.bin/lto-dump/Makefile new file mode 100644 index 000000000000..51aea0139441 --- /dev/null +++ b/external/gpl3/gcc/usr.bin/lto-dump/Makefile @@ -0,0 +1,35 @@ +# $NetBSD: Makefile,v 1.1 2021/04/23 01:56:14 mrg Exp $ + +PROG= lto-dump +# XXX pullout from LTO_DUMP_OBJS +SRCS= lto-lang.c \ + lto-object.c \ + attribs.c \ + lto-partition.c \ + lto-symtab.c \ + lto-dump.c \ + lto-common.c \ + main.c + +BINDIR= /usr/bin + +CPPFLAGS+= -DPREFIX=\"/usr\" + +COPTS.lto-lang.c+= -Wno-stack-protector +COPTS.lto-common.c+= -Wno-stack-protector + +.include "../Makefile.backend" +.include "../Makefile.target-defines" +.include "../Makefile.libcpp" +.include "../Makefile.backtrace" +.include "../Makefile.libdecnumber" + +.if ${MACHINE_ARCH} == "vax" +COPTS.lto-lang.c+=-O0 +COPTS.lto-symtab.c+=-O0 +.endif + +LDADD+= ${LIBIBERTY} ${LIBMPC} ${LIBMPFR} ${LIBGMP} -lintl -lz -lm +DPADD+= ${LIBIBERTY} ${LIBMPC} ${LIBMPFR} ${LIBGMP} ${LIBINTL} ${LIBZ} ${LIBM} + +.PATH: ${DIST}/gcc/lto ${DIST}/gcc ${DIST}/gcc/doc