with GCC4 we *need* to pass -fno-unit-at-a-time otherwise GCC
reorders things breaking _init() and _fini(). for i386, the {init,fini}_fallthru() functions were being output _before_ the _init()/ _fini(), and instead of falling through to the rest of the .init/.fini section, it would fall through to _init()/_fini() again, and again, and again, until the stack was exhausted. now i386 works, but i have not checked that this works for sparc64 as well.
This commit is contained in:
parent
a281677257
commit
169832563d
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile.inc,v 1.25 2004/08/28 00:18:38 thorpej Exp $
|
||||
# $NetBSD: Makefile.inc,v 1.26 2006/05/13 01:40:34 mrg Exp $
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
|
@ -16,6 +16,10 @@ CPPFLAGS+= -DDWARF2_EH
|
|||
CPPFLAGS+= -DJCR
|
||||
CPPFLAGS+= -DDSO_HANDLE
|
||||
|
||||
.if ${HAVE_GCC} > 3
|
||||
CFLAGS+= -fno-unit-at-a-time
|
||||
.endif
|
||||
|
||||
.PATH: ${.CURDIR}/../common_elf
|
||||
|
||||
SRCS+= crt0.c crti.c crtn.c
|
||||
|
|
Loading…
Reference in New Issue