1 # $NetBSD: Makefile,v 1.13 2014/06/01 19:51:01 mrg Exp $
5 UNSUPPORTED_COMPILER.clang
= # defined
9 # If using an external toolchain, we expect crtbegin/crtend to be
10 # supplied by that toolchain's run-time support.
11 .if
!defined
(EXTERNAL_TOOLCHAIN
) && ${MKGCC} != "no"
15 GCCARCH
= ${EXTERNAL_GCC_SUBDIR}/usr.bin
/gcc
/arch
/${MACHINE_ARCH}
17 GALLCFLAGS
= ${G_CRTSTUFF_CFLAGS} ${G_CRTSTUFF_T_CFLAGS}
19 CPPFLAGS
+= -I
${GCCARCH} ${GALLCFLAGS
:M-D
*} ${GALLCFLAGS
:M-I
*:N-I.
*}
20 CPPFLAGS
+= -I.
-I
${DIST}/libgcc
-I
${DIST}/gcc
-I
${DIST}/include
22 COPTS
+= -finhibit-size-directive \
25 -fno-zero-initialized-in-bss \
26 -fno-toplevel-reorder \
28 -fno-omit-frame-pointer \
29 -fno-asynchronous-unwind-tables
31 GCFLAGS
= ${GALLCFLAGS
:N-D
*:N-I
*:N-i
*:N.
/*}
33 DPSRCS
+= ${.CURDIR
}/arch
/${MACHINE_ARCH}.mk tconfig.h
35 .
include "${.CURDIR}/arch/${MACHINE_ARCH}.mk"
37 SRCS
+= crtbegin.c crtend.c
38 OBJS
+= crtbegin.o crtend.o
40 SRCS
+= crtbeginS.c crtendS.c
41 OBJS
+= crtbeginS.o crtendS.o
# for shared libraries
42 CPPFLAGS.crtbeginS.o
+= -fPIC
-DPIC
43 CPPFLAGS.crtendS.o
+= -fPIC
-DPIC
45 OBJS
+= crtbeginT.o
# for -static links
53 .PATH
: ${DIST}/libgcc
${DIST}/libgcc
/config
55 .
include "../Makefile.tconfigh"
56 EXTRA_FAKEHEADERS
= options.h libgcc_tm.h
57 .
include "../Makefile.hacks"
61 .
include <bsd.prog.mk
>
63 # Override the default .c -> .o rule.
66 ${CC} ${CPPFLAGS} ${CPPFLAGS.
${.TARGET
}} ${GCFLAGS} ${COPTS} ${COPTS.
${.TARGET
}} ${CPUFLAGS} -c
${.IMPSRC
} -o
${.TARGET
}.o
67 mv
${.TARGET
}.o
${.TARGET
}
69 .if
(${MACHINE_ARCH} == "mips64eb") ||
(${MACHINE_ARCH} == "mips64el")
70 # Turn off as(1) warnings on MIPS, since warnings are fatal with WARNS>0
71 # and GCC configury passes -finhibit-size-directive which causes mips-gas
72 # to barf. Don't know what the real fix for this is...
74 # XXX should be COPTS, but that's too early
75 CPUFLAGS
+=-Wa
,--no-warn
80 .
include <bsd.prog.mk
> # do nothing
82 .
endif # ! EXTERNAL_TOOLCHAIN && MKGCC != no