freebsd-dev/lib/csu/Makefile.inc
Dimitry Andric 28845ae1ab Use -fno-asynchronous-unwind-tables to compile lib/csu
Summary:
In r209294 kib added -fno-asynchronous-unwind-tables to the compile
flags for the GNU C startup components. This was done to work around a
BFD ld assertion, "no .eh_frame_hdr table will be created", which is
produced because of the layout of the startup objects.

Add the same flag to lib/csu too, for the same reason. And similarly to
r209294, also add -fno-omit-frame-pointer.

This is primarily meant to quickly MFC to stable/11, so it can end up in
the 11.4 release, as a fix for https://bugs.freebsd.org/246322.

PR:		246322
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D24797
2020-05-11 19:36:38 +00:00

37 lines
711 B
Makefile

# $FreeBSD$
SSP_CFLAGS=
SED_FIX_NOTE = -i "" -e '/\.note\.tag/s/progbits/note/'
NO_WMISSING_VARIABLE_DECLARATIONS=
.include <src.opts.mk>
.if !defined(BUILDING_TESTS)
OBJS+= crtbegin.o crtbeginS.o crtbeginT.o
OBJS+= crtend.o crtendS.o
CFLAGS+= -fno-asynchronous-unwind-tables
CFLAGS+= -fno-omit-frame-pointer
CFLAGS_CRTS= -DSHARED ${PICFLAG}
crtbegin.o: crtbegin.c
crtbeginS.o: crtbegin.c
crtbeginT.o: crtbegin.c
crtend.o: crtend.c
crtendS.o: crtend.c
crtbegin.o crtend.o crtbeginT.o:
${CC} ${CFLAGS} -I${.CURDIR} -c -o ${.TARGET} ${.ALLSRC:N*.h:[1]}
crtbeginS.o crtendS.o:
${CC} ${CFLAGS} -I${.CURDIR} ${CFLAGS_CRTS} -c -o ${.TARGET} \
${.ALLSRC:N*.h:[1]}
.endif
.include "../Makefile.inc"