Fri Dec 2 22:28:47 2011 UTC ()
actually pass $COPTS to the compiler
ok mrg@


(macallan)
diff -r1.5 -r1.6 src/external/gpl3/gcc/lib/crtstuff/Makefile

cvs diff -r1.5 -r1.6 src/external/gpl3/gcc/lib/crtstuff/Makefile (switch to unified diff)

--- src/external/gpl3/gcc/lib/crtstuff/Makefile 2011/07/01 05:07:46 1.5
+++ src/external/gpl3/gcc/lib/crtstuff/Makefile 2011/12/02 22:28:47 1.6
@@ -1,80 +1,80 @@ @@ -1,80 +1,80 @@
1# $NetBSD: Makefile,v 1.5 2011/07/01 05:07:46 mrg Exp $ 1# $NetBSD: Makefile,v 1.6 2011/12/02 22:28:47 macallan Exp $
2 2
3REQUIRETOOLS= yes 3REQUIRETOOLS= yes
4NOLINT= # defined 4NOLINT= # defined
5 5
6.include <bsd.own.mk> 6.include <bsd.own.mk>
7 7
8# If using an external toolchain, we expect crtbegin/crtend to be 8# If using an external toolchain, we expect crtbegin/crtend to be
9# supplied by that toolchain's run-time support. 9# supplied by that toolchain's run-time support.
10.if !defined(EXTERNAL_TOOLCHAIN) && ${MKGCC} != "no" 10.if !defined(EXTERNAL_TOOLCHAIN) && ${MKGCC} != "no"
11 11
12DIST= ${NETBSDSRCDIR}/external/gpl3/gcc/dist 12DIST= ${NETBSDSRCDIR}/external/gpl3/gcc/dist
13GNUHOSTDIST= ${DIST} 13GNUHOSTDIST= ${DIST}
14GCCARCH= ${NETBSDSRCDIR}/external/gpl3/gcc/usr.bin/gcc/arch/${MACHINE_ARCH} 14GCCARCH= ${NETBSDSRCDIR}/external/gpl3/gcc/usr.bin/gcc/arch/${MACHINE_ARCH}
15 15
16GALLCFLAGS= ${G_CRTSTUFF_CFLAGS} ${G_CRTSTUFF_T_CFLAGS} 16GALLCFLAGS= ${G_CRTSTUFF_CFLAGS} ${G_CRTSTUFF_T_CFLAGS}
17 17
18CPPFLAGS+= -I${GCCARCH} ${GALLCFLAGS:M-D*} ${GALLCFLAGS:M-I*:N-I.*} 18CPPFLAGS+= -I${GCCARCH} ${GALLCFLAGS:M-D*} ${GALLCFLAGS:M-I*:N-I.*}
19CPPFLAGS+= -I. 19CPPFLAGS+= -I.
20COPTS+= -finhibit-size-directive \ 20COPTS+= -finhibit-size-directive \
21 -fno-inline \ 21 -fno-inline \
22 -fno-exceptions \ 22 -fno-exceptions \
23 -fno-zero-initialized-in-bss \ 23 -fno-zero-initialized-in-bss \
24 -fno-toplevel-reorder \ 24 -fno-toplevel-reorder \
25 -fno-tree-vectorize \ 25 -fno-tree-vectorize \
26 -fno-omit-frame-pointer \ 26 -fno-omit-frame-pointer \
27 -fno-asynchronous-unwind-tables 27 -fno-asynchronous-unwind-tables
28 28
29GCFLAGS= ${GALLCFLAGS:N-D*:N-I*:N-i*:N./*} 29GCFLAGS= ${GALLCFLAGS:N-D*:N-I*:N-i*:N./*}
30 30
31DPSRCS+= ${.CURDIR}/arch/${MACHINE_ARCH}.mk tconfig.h 31DPSRCS+= ${.CURDIR}/arch/${MACHINE_ARCH}.mk tconfig.h
32 32
33.include "${.CURDIR}/arch/${MACHINE_ARCH}.mk" 33.include "${.CURDIR}/arch/${MACHINE_ARCH}.mk"
34 34
35SRCS+= crtbegin.c crtend.c 35SRCS+= crtbegin.c crtend.c
36OBJS+= crtbegin.o crtend.o 36OBJS+= crtbegin.o crtend.o
37.if ${MKPIC} != "no" 37.if ${MKPIC} != "no"
38SRCS+= crtbeginS.c crtendS.c 38SRCS+= crtbeginS.c crtendS.c
39OBJS+= crtbeginS.o crtendS.o # for shared libraries 39OBJS+= crtbeginS.o crtendS.o # for shared libraries
40CPPFLAGS.crtbeginS.o+= -fPIC -DPIC 40CPPFLAGS.crtbeginS.o+= -fPIC -DPIC
41CPPFLAGS.crtendS.o+= -fPIC -DPIC 41CPPFLAGS.crtendS.o+= -fPIC -DPIC
42SRCS+= crtbeginT.c 42SRCS+= crtbeginT.c
43OBJS+= crtbeginT.o # for -static links 43OBJS+= crtbeginT.o # for -static links
44.endif 44.endif
45 45
46realall: ${OBJS} 46realall: ${OBJS}
47 47
48FILES=${OBJS} 48FILES=${OBJS}
49FILESDIR=${LIBDIR} 49FILESDIR=${LIBDIR}
50 50
51.PATH: ${DIST}/gcc ${DIST}/gcc/config ${G_CONFIGDIR} 51.PATH: ${DIST}/gcc ${DIST}/gcc/config ${G_CONFIGDIR}
52 52
53.include "../Makefile.tconfigh" 53.include "../Makefile.tconfigh"
54EXTRA_FAKEHEADERS= options.h 54EXTRA_FAKEHEADERS= options.h
55.include "../Makefile.hacks" 55.include "../Makefile.hacks"
56 56
57${OBJS}: ${DPSRCS} 57${OBJS}: ${DPSRCS}
58 58
59.include <bsd.prog.mk> 59.include <bsd.prog.mk>
60 60
61# Override the default .c -> .o rule. 61# Override the default .c -> .o rule.
62.c.o: 62.c.o:
63 ${_MKTARGET_COMPILE} 63 ${_MKTARGET_COMPILE}
64 ${CC} ${CPPFLAGS} ${CPPFLAGS.${.TARGET}} ${GCFLAGS} ${CPUFLAGS} -c ${.IMPSRC} -o ${.TARGET}.o 64 ${CC} ${CPPFLAGS} ${CPPFLAGS.${.TARGET}} ${GCFLAGS} ${COPTS} ${COPTS.${.TARGET}} ${CPUFLAGS} -c ${.IMPSRC} -o ${.TARGET}.o
65 mv ${.TARGET}.o ${.TARGET} 65 mv ${.TARGET}.o ${.TARGET}
66 66
67.if (${MACHINE_ARCH} == "mips64eb") || (${MACHINE_ARCH} == "mips64el") 67.if (${MACHINE_ARCH} == "mips64eb") || (${MACHINE_ARCH} == "mips64el")
68# Turn off as(1) warnings on MIPS, since warnings are fatal with WARNS>0 68# Turn off as(1) warnings on MIPS, since warnings are fatal with WARNS>0
69# and GCC configury passes -finhibit-size-directive which causes mips-gas 69# and GCC configury passes -finhibit-size-directive which causes mips-gas
70# to barf. Don't know what the real fix for this is... 70# to barf. Don't know what the real fix for this is...
71# 71#
72# XXX should be COPTS, but that's too early 72# XXX should be COPTS, but that's too early
73CPUFLAGS+=-Wa,--no-warn 73CPUFLAGS+=-Wa,--no-warn
74.endif 74.endif
75 75
76.else 76.else
77 77
78.include <bsd.prog.mk> # do nothing 78.include <bsd.prog.mk> # do nothing
79 79
80.endif # ! EXTERNAL_TOOLCHAIN && MKGCC != no 80.endif # ! EXTERNAL_TOOLCHAIN && MKGCC != no