Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib Explicitly use -fcommon for globals shared between libc ...
details: https://anonhg.NetBSD.org/src/rev/282a08ef024c
branches: trunk
changeset: 1009402:282a08ef024c
user: joerg <joerg%NetBSD.org@localhost>
date: Wed Apr 22 23:32:25 2020 +0000
description:
Explicitly use -fcommon for globals shared between libc and CSU.
diffstat:
lib/csu/Makefile | 4 +++-
lib/libc/gen/Makefile.inc | 6 +++++-
lib/libc/misc/Makefile.inc | 5 ++++-
3 files changed, 12 insertions(+), 3 deletions(-)
diffs (51 lines):
diff -r b4e519f03f2f -r 282a08ef024c lib/csu/Makefile
--- a/lib/csu/Makefile Wed Apr 22 22:56:12 2020 +0000
+++ b/lib/csu/Makefile Wed Apr 22 23:32:25 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.39 2019/01/27 04:35:25 dholland Exp $
+# $NetBSD: Makefile,v 1.40 2020/04/22 23:32:25 joerg Exp $
NOLIBCSANITIZER= # defined
NOSANITIZER= # defined
@@ -18,6 +18,8 @@
.error Architecture (${CSU_MACHINE_ARCH} or ${CSU_MACHINE_CPU}) unsupported
.endif
+# Ownership of globals from crt0.o is shared with libc for historic reasons
+COPTS+= -fcommon
.PATH: ${ARCHDIR}
.include "${ARCHDIR}/Makefile.inc"
diff -r b4e519f03f2f -r 282a08ef024c lib/libc/gen/Makefile.inc
--- a/lib/libc/gen/Makefile.inc Wed Apr 22 22:56:12 2020 +0000
+++ b/lib/libc/gen/Makefile.inc Wed Apr 22 23:32:25 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.200 2017/09/09 18:18:28 kamil Exp $
+# $NetBSD: Makefile.inc,v 1.201 2020/04/22 23:32:25 joerg Exp $
# from: @(#)Makefile.inc 8.6 (Berkeley) 5/4/95
# gen sources
@@ -203,3 +203,7 @@
${TOOL_AWK} -f ${.ALLSRC} > ${.TARGET}
CLEANFILES+= errlist.c
+
+# Ownership of globals from crt0.o is shared with libc for historic reasons.
+# __progname is also necessary as global here for the nbcompat case.
+COPTS.getprogname.c+= -fcommon
diff -r b4e519f03f2f -r 282a08ef024c lib/libc/misc/Makefile.inc
--- a/lib/libc/misc/Makefile.inc Wed Apr 22 22:56:12 2020 +0000
+++ b/lib/libc/misc/Makefile.inc Wed Apr 22 23:32:25 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.3 2018/08/03 04:29:35 kamil Exp $
+# $NetBSD: Makefile.inc,v 1.4 2020/04/22 23:32:25 joerg Exp $
# @(#)Makefile.inc 8.3 (Berkeley) 10/24/94
.PATH: ${ARCHDIR}/misc ${.CURDIR}/misc
@@ -13,3 +13,6 @@
# for -fstack-protector
SRCS+= stack_protector.c
+
+# Ownership of globals from crt0.o is shared with libc for historic reasons
+COPTS.initfini.c+= -fcommon
Home |
Main Index |
Thread Index |
Old Index