1 # $NetBSD: Makefile,v 1.13 2014/06/01 19:51:01 mrg Exp $
6 UNSUPPORTED_COMPILER.clang
= # defined
11 GCC_MACHINE_ARCH?
= ${MACHINE_ARCH
:S
/earmv5
/earm
/}
18 # XXX just while all platforms defs.mk are updated..
19 .if exists
(${.CURDIR
}/arch
/${GCC_MACHINE_ARCH}/defs.mk
)
20 # Machine-dependent definitions (include file names).
21 .
include "${.CURDIR}/arch/${GCC_MACHINE_ARCH}/defs.mk"
24 # Machine-independent definitions (include file names).
25 .
include "${.CURDIR}/defs.mk"
29 LIBGCCOBJ
!= cd
${.CURDIR
}/..
/libgcc
/libgcc
&& ${PRINTOBJDIR}
33 GCCARCH
= ${GCC_SUBDIR}/usr.bin
/gcc
/arch
/${GCC_MACHINE_ARCH}
34 LIBOBJCARCH
= ${GCC_SUBDIR}/lib
/libobjc
/arch
/${GCC_MACHINE_ARCH}
35 GCCLIBXX
= ${GCC_SUBDIR}/lib
/libstdc
++-v3
/arch
/${GCC_MACHINE_ARCH}
37 SRCS
= ${G_OBJC_SOURCE_FILES} ${G_C_SOURCE_FILES}
39 GCPPFLAGS
= ${G_ALL_CFLAGS} ${G_INCLUDES}
40 CPPFLAGS
+= -I.
-I
${.CURDIR
}/arch
/${GCC_MACHINE_ARCH}
41 CPPFLAGS
+= -I
${GCCARCH} ${GCPPFLAGS
:M-D
*} ${GCPPFLAGS
:M-I
*:N-I.
*}
42 CPPFLAGS
+= -I
${GCCLIBXX}
43 CPPFLAGS
+= -I
${DIST}/libobjc
/objc-private
45 BUILDSYMLINKS
= ${.CURDIR
}/..
/libstdc
++-v3
/arch
/${GCC_MACHINE_ARCH} bits
48 .for f in Protocol.m Object.m NXConstStr.m linking.m
49 OBJCOPTS.
${f}= -fgnu-runtime
52 .for f in thr.c thr-objc.c
53 COPTS.
${f}= -Wno-missing-noreturn
56 COPTS
+= -fno-strict-aliasing
-fexceptions
57 OBJCOPTS
+= -fno-strict-aliasing
-fexceptions
59 OBJCOPTS.Object.m
= -Wno-stack-protector
60 COPTS.sendmsg.c
= -Wno-stack-protector
61 COPTS.objc-act.c
= -Wno-stack-protector
64 INCSDIR
= /usr
/include/objc
66 DPSRCS
+= runtime-info.h
67 CLEANFILES
+= rtscratch rtscratch.s runtime-info.h
71 `${OBJC} --print-prog-name=cc1obj` -print-objc-runtime-info rtscratch
>$@
73 ${OBJS} ${POBJS} ${SOBJS}: runtime-info.h
75 ${SRCS}: tconfig.h options.h
77 .if
${HAVE_LIBGCC_EH} == "no"
78 G_CONFIGLINKS
:= ${G_CONFIGLINKS
:S
,libgcc
/config
/arm
/unwind-arm.h
,libgcc
/unwind-generic.h
,}
82 .if defined
(G_CONFIGLINKS
) && !empty
(G_CONFIGLINKS
)
83 BUILDSYMLINKS
+= ${G_CONFIGLINKS}
84 .for _src _dst in
${G_CONFIGLINKS}
90 .
include "../Makefile.tconfigh"
91 .
include "../Makefile.hacks"
93 # XXX just while all platforms defs.mk are updated..
94 .if exists
(${.CURDIR
}/arch
/${GCC_MACHINE_ARCH}/defs.mk
)
95 optionlist
: ${G_ALL_OPT_FILES} ${LIBOBJCARCH}/defs.mk Makefile
${DIST}/gcc
/opt-gather.awk
96 ${TOOL_AWK} -f
${DIST}/gcc
/opt-gather.awk
${G_ALL_OPT_FILES} \
99 .if
${MACHINE_ARCH} == "vax" ||
${MACHINE_ARCH} == "mipseb"
100 OPTION_FLAGS
=-v header_name
="config.h system.h coretypes.h options.h tm.h" \
101 -f
${DIST}/gcc
/opt-read.awk
102 OPTION_DEPS
=${DIST}/gcc
/opt-read.awk
105 options.h
: optionlist
${DIST}/gcc
/opt-functions.awk
${DIST}/gcc
/opth-gen.awk \
107 ${TOOL_AWK} -f
${DIST}/gcc
/opt-functions.awk \
108 -f
${DIST}/gcc
/opth-gen.awk
${OPTION_FLAGS} \
109 < optionlist
> ${.TARGET
}
111 CLEANFILES
+= options.h optionlist
114 .
include <bsd.lib.mk
>
116 .PATH
: ${DIST}/libobjc
${DIST}/libobjc
/objc
${DIST}/libobjc
/objc-private
119 .
include <bsd.prog.mk
> # do nothing
122 COPTS.archive.c
+= -Wno-error
123 COPTS.sendmsg.c
+= -Wno-error