Module Name: src Committed By: joerg Date: Wed Apr 22 23:32:25 UTC 2020
Modified Files: src/lib/csu: Makefile src/lib/libc/gen: Makefile.inc src/lib/libc/misc: Makefile.inc Log Message: Explicitly use -fcommon for globals shared between libc and CSU. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/lib/csu/Makefile cvs rdiff -u -r1.200 -r1.201 src/lib/libc/gen/Makefile.inc cvs rdiff -u -r1.3 -r1.4 src/lib/libc/misc/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/csu/Makefile diff -u src/lib/csu/Makefile:1.39 src/lib/csu/Makefile:1.40 --- src/lib/csu/Makefile:1.39 Sun Jan 27 04:35:25 2019 +++ src/lib/csu/Makefile Wed Apr 22 23:32:25 2020 @@ -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 @@ ARCHDIR:= ${.CURDIR}/arch/${CSU_MACHINE_ .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" Index: src/lib/libc/gen/Makefile.inc diff -u src/lib/libc/gen/Makefile.inc:1.200 src/lib/libc/gen/Makefile.inc:1.201 --- src/lib/libc/gen/Makefile.inc:1.200 Sat Sep 9 18:18:28 2017 +++ src/lib/libc/gen/Makefile.inc Wed Apr 22 23:32:25 2020 @@ -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 @@ errlist.c: errlist.awk ${NETBSDSRCDIR}/s ${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 Index: src/lib/libc/misc/Makefile.inc diff -u src/lib/libc/misc/Makefile.inc:1.3 src/lib/libc/misc/Makefile.inc:1.4 --- src/lib/libc/misc/Makefile.inc:1.3 Fri Aug 3 04:29:35 2018 +++ src/lib/libc/misc/Makefile.inc Wed Apr 22 23:32:25 2020 @@ -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 @@ SRCS+= initfini.c # for -fstack-protector SRCS+= stack_protector.c + +# Ownership of globals from crt0.o is shared with libc for historic reasons +COPTS.initfini.c+= -fcommon