Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/csu/common Undo previous; breaks macppc/m68k (at least)
details: https://anonhg.NetBSD.org/src/rev/8e02f49eb8bd
branches: trunk
changeset: 995578:8e02f49eb8bd
user: christos <christos%NetBSD.org@localhost>
date: Fri Dec 28 18:17:10 2018 +0000
description:
Undo previous; breaks macppc/m68k (at least)
diffstat:
lib/csu/arch/aarch64/Makefile.inc | 3 ++-
lib/csu/arch/arm/Makefile.inc | 5 ++++-
lib/csu/arch/earm/Makefile.inc | 3 ++-
lib/csu/arch/or1k/Makefile.inc | 3 ++-
lib/csu/arch/riscv/Makefile.inc | 3 ++-
lib/csu/common/Makefile.inc | 3 +--
lib/csu/common/crt0-common.c | 15 ++++++---------
lib/csu/common/crtbegin.c | 2 +-
8 files changed, 20 insertions(+), 17 deletions(-)
diffs (140 lines):
diff -r b8f1d043323a -r 8e02f49eb8bd lib/csu/arch/aarch64/Makefile.inc
--- a/lib/csu/arch/aarch64/Makefile.inc Fri Dec 28 16:01:53 2018 +0000
+++ b/lib/csu/arch/aarch64/Makefile.inc Fri Dec 28 18:17:10 2018 +0000
@@ -1,4 +1,5 @@
-# $NetBSD: Makefile.inc,v 1.2 2018/12/27 18:57:14 christos Exp $
+# $NetBSD: Makefile.inc,v 1.3 2018/12/28 18:17:10 christos Exp $
CPPFLAGS+= -I${ARCHDIR}
+CPPFLAGS+= -DHAVE_INITFINI_ARRAY
#CPPFLAGS+= -DELF_NOTE_MARCH_DESC=\"${CSU_MACHINE_ARCH}\"
diff -r b8f1d043323a -r 8e02f49eb8bd lib/csu/arch/arm/Makefile.inc
--- a/lib/csu/arch/arm/Makefile.inc Fri Dec 28 16:01:53 2018 +0000
+++ b/lib/csu/arch/arm/Makefile.inc Fri Dec 28 18:17:10 2018 +0000
@@ -1,4 +1,7 @@
-# $NetBSD: Makefile.inc,v 1.8 2018/12/27 18:57:15 christos Exp $
+# $NetBSD: Makefile.inc,v 1.9 2018/12/28 18:17:10 christos Exp $
CPPFLAGS+= -I${ARCHDIR}
+.if (!empty(CPUFLAGS) && ${CPUFLAGS:M-mabi=aapcs*} != "")
+CPPFLAGS+= -DHAVE_INITFINI_ARRAY
+.endif
CPPFLAGS+= -DELF_NOTE_MARCH_DESC=\"${CSU_MACHINE_ARCH}\"
diff -r b8f1d043323a -r 8e02f49eb8bd lib/csu/arch/earm/Makefile.inc
--- a/lib/csu/arch/earm/Makefile.inc Fri Dec 28 16:01:53 2018 +0000
+++ b/lib/csu/arch/earm/Makefile.inc Fri Dec 28 18:17:10 2018 +0000
@@ -1,4 +1,5 @@
-# $NetBSD: Makefile.inc,v 1.4 2018/12/27 18:57:15 christos Exp $
+# $NetBSD: Makefile.inc,v 1.5 2018/12/28 18:17:10 christos Exp $
CPPFLAGS+= -I${ARCHDIR}
+CPPFLAGS+= -DHAVE_INITFINI_ARRAY
CPPFLAGS+= -DELF_NOTE_MARCH_DESC=\"${CSU_MACHINE_ARCH}\"
diff -r b8f1d043323a -r 8e02f49eb8bd lib/csu/arch/or1k/Makefile.inc
--- a/lib/csu/arch/or1k/Makefile.inc Fri Dec 28 16:01:53 2018 +0000
+++ b/lib/csu/arch/or1k/Makefile.inc Fri Dec 28 18:17:10 2018 +0000
@@ -1,4 +1,5 @@
-# $NetBSD: Makefile.inc,v 1.2 2018/12/27 18:57:15 christos Exp $
+# $NetBSD: Makefile.inc,v 1.3 2018/12/28 18:17:11 christos Exp $
CPPFLAGS+= -I${ARCHDIR}
+CPPFLAGS+= -DHAVE_INITFINI_ARRAY
#CPPFLAGS+= -DELF_NOTE_MARCH_DESC=\"${CSU_MACHINE_ARCH}\"
diff -r b8f1d043323a -r 8e02f49eb8bd lib/csu/arch/riscv/Makefile.inc
--- a/lib/csu/arch/riscv/Makefile.inc Fri Dec 28 16:01:53 2018 +0000
+++ b/lib/csu/arch/riscv/Makefile.inc Fri Dec 28 18:17:10 2018 +0000
@@ -1,4 +1,5 @@
-# $NetBSD: Makefile.inc,v 1.2 2018/12/27 18:57:15 christos Exp $
+# $NetBSD: Makefile.inc,v 1.3 2018/12/28 18:17:11 christos Exp $
CPPFLAGS+= -I${ARCHDIR}
+CPPFLAGS+= -DHAVE_INITFINI_ARRAY
#CPPFLAGS+= -DELF_NOTE_MARCH_DESC=\"${CSU_MACHINE_ARCH}\"
diff -r b8f1d043323a -r 8e02f49eb8bd lib/csu/common/Makefile.inc
--- a/lib/csu/common/Makefile.inc Fri Dec 28 16:01:53 2018 +0000
+++ b/lib/csu/common/Makefile.inc Fri Dec 28 18:17:10 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.34 2018/12/27 18:57:15 christos Exp $
+# $NetBSD: Makefile.inc,v 1.35 2018/12/28 18:17:11 christos Exp $
.include <bsd.own.mk>
@@ -9,7 +9,6 @@
.PATH: ${COMMON_DIR}
CPPFLAGS+= -I${COMMON_DIR} -I.
-CPPFLAGS+= -DHAVE_INITFINI_ARRAY
OBJS+= crt0.o gcrt0.o crti.o crtn.o
OBJS+= crtbegin.o crtend.o
diff -r b8f1d043323a -r 8e02f49eb8bd lib/csu/common/crt0-common.c
--- a/lib/csu/common/crt0-common.c Fri Dec 28 16:01:53 2018 +0000
+++ b/lib/csu/common/crt0-common.c Fri Dec 28 18:17:10 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: crt0-common.c,v 1.21 2018/12/27 19:32:32 christos Exp $ */
+/* $NetBSD: crt0-common.c,v 1.22 2018/12/28 18:17:11 christos Exp $ */
/*
* Copyright (c) 1998 Christos Zoulas
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: crt0-common.c,v 1.21 2018/12/27 19:32:32 christos Exp $");
+__RCSID("$NetBSD: crt0-common.c,v 1.22 2018/12/28 18:17:11 christos Exp $");
#include <sys/types.h>
#include <sys/exec.h>
@@ -50,9 +50,10 @@
#ifdef HAVE_INITFINI_ARRAY
typedef void (*fptr_t)(void);
-#endif
+#else
extern void _init(void);
extern void _fini(void);
+#endif
extern void _libc_init(void);
/*
@@ -110,7 +111,7 @@
}
static inline void
-_initarray(void)
+_init(void)
{
for (const fptr_t *f = __init_array_start; f < __init_array_end; f++) {
(*f)();
@@ -118,7 +119,7 @@
}
static void
-_finiarray(void)
+_fini(void)
{
for (const fptr_t *f = __fini_array_start; f < __fini_array_end; f++) {
(*f)();
@@ -336,10 +337,6 @@
#endif
atexit(_fini);
-#ifdef HAVE_INITFINI_ARRAY
- atexit(_finiarray);
- _initarray();
-#endif
_init();
exit(main(ps_strings->ps_nargvstr, ps_strings->ps_argvstr, environ));
diff -r b8f1d043323a -r 8e02f49eb8bd lib/csu/common/crtbegin.c
--- a/lib/csu/common/crtbegin.c Fri Dec 28 16:01:53 2018 +0000
+++ b/lib/csu/common/crtbegin.c Fri Dec 28 18:17:10 2018 +0000
@@ -27,7 +27,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: crtbegin.c,v 1.16 2018/12/28 13:53:17 christos Exp $");
+__RCSID("$NetBSD: crtbegin.c,v 1.17 2018/12/28 18:17:11 christos Exp $");
#include "crtbegin.h"
Home |
Main Index |
Thread Index |
Old Index