Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/make make: fix -fno-common build



details:   https://anonhg.NetBSD.org/src/rev/abbaa5322fdf
branches:  trunk
changeset: 1008655:abbaa5322fdf
user:      sjg <sjg%NetBSD.org@localhost>
date:      Mon Mar 30 02:41:06 2020 +0000

description:
make: fix -fno-common build

debug was declared extern, but debug_file was not; correct this and define
debug_file in main.c (as debug is) to fix the -fno-common build.

-fno-common will become the default with GCC10/LLVM11.

Patch from kevans at freebsd

diffstat:

 usr.bin/make/main.c |  8 +++++---
 usr.bin/make/make.h |  4 ++--
 2 files changed, 7 insertions(+), 5 deletions(-)

diffs (54 lines):

diff -r 7a3f56e3445e -r abbaa5322fdf usr.bin/make/main.c
--- a/usr.bin/make/main.c       Mon Mar 30 02:12:38 2020 +0000
+++ b/usr.bin/make/main.c       Mon Mar 30 02:41:06 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.273 2017/10/28 21:54:54 sjg Exp $   */
+/*     $NetBSD: main.c,v 1.274 2020/03/30 02:41:06 sjg Exp $   */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,7 +69,7 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: main.c,v 1.273 2017/10/28 21:54:54 sjg Exp $";
+static char rcsid[] = "$NetBSD: main.c,v 1.274 2020/03/30 02:41:06 sjg Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
@@ -81,7 +81,7 @@
 #if 0
 static char sccsid[] = "@(#)main.c     8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: main.c,v 1.273 2017/10/28 21:54:54 sjg Exp $");
+__RCSID("$NetBSD: main.c,v 1.274 2020/03/30 02:41:06 sjg Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -195,6 +195,8 @@
 pid_t myPid;
 int makelevel;
 
+FILE *debug_file;
+
 Boolean forceJobs = FALSE;
 
 extern Lst parseIncPath;
diff -r 7a3f56e3445e -r abbaa5322fdf usr.bin/make/make.h
--- a/usr.bin/make/make.h       Mon Mar 30 02:12:38 2020 +0000
+++ b/usr.bin/make/make.h       Mon Mar 30 02:41:06 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: make.h,v 1.104 2018/02/12 21:38:09 sjg Exp $   */
+/*     $NetBSD: make.h,v 1.105 2020/03/30 02:41:06 sjg Exp $   */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -448,7 +448,7 @@
  *     There is one bit per module.  It is up to the module what debug
  *     information to print.
  */
-FILE *debug_file;              /* Output written here - default stdout */
+extern FILE *debug_file;       /* Output written here - default stdout */
 extern int debug;
 #define        DEBUG_ARCH      0x00001
 #define        DEBUG_COND      0x00002



Home | Main Index | Thread Index | Old Index