blob: cdfcae670b19b08126c990fc507df0fe94ab3f1c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
# $NetBSD: Makefile,v 1.25 2021/08/16 06:56:27 mrg Exp $
.include <bsd.init.mk>
.include "${.CURDIR}/../../arch/${GCC_MACHINE_ARCH}/defs.mk"
.cc: # disable .cc->NULL transform
GNUHOSTDIST= ${DIST}
GTHRINCS= gthr.h gthr-single.h gthr-posix.h
BUILDINCS= basic_file.h c++allocator.h c++io.h c++locale.h
BUILDINCS+= messages_members.h time_members.h opt_random.h
BUILDINCS+= ${GTHRINCS}
INCS= ${G_bits_headers} ${G_c_base_headers_extra} ${G_host_headers}
INCS+= ${BUILDINCS}
# These are handled with special rules
#INCS+= ${G_bits_host_headers} ${G_host_headers_extra}
# libsupc++
# XXX use bits_sup_headers from libstdc++/include/Makefile.am
INCS+= atomic_lockfree_defines.h \
cxxabi_forced.h \
cxxabi_init_exception.h \
exception.h \
exception_defines.h \
exception_ptr.h \
hash_bytes.h \
nested_exception.h
# Build the gthr*.h files
gthr.h: ${DIST}/libgcc/gthr.h Makefile
${TOOL_SED} \
-e '/^#pragma/b' \
-e '/^#/s/\([A-Z_][A-Z_]*\)/_GLIBCXX_\1/g' \
-e 's/_GLIBCXX_SUPPORTS_WEAK/__GXX_WEAK__/g' \
-e 's/_GLIBCXX___MINGW32_GLIBCXX___/__MINGW32__/g' \
-e 's,^#include "\(.*\)",#include <bits/\1>,g' \
< ${DIST}/libgcc/gthr.h > ${.TARGET}.tmp && mv ${.TARGET}.tmp ${.TARGET}
gthr-single.h: ${DIST}/libgcc/gthr-single.h Makefile
${TOOL_SED} \
-e 's/\(UNUSED\)/_GLIBCXX_\1/g' \
-e 's/\(GCC[A-Z_]*_H\)/_GLIBCXX_\1/g' \
< ${DIST}/libgcc/gthr-single.h > ${.TARGET}.tmp && mv ${.TARGET}.tmp ${.TARGET}
gthr-posix.h: ${DIST}/libgcc/gthr-posix.h Makefile
${TOOL_SED} \
-e 's/\(UNUSED\)/_GLIBCXX_\1/g' \
-e 's/\(GCC[A-Z_]*_H\)/_GLIBCXX_\1/g' \
-e 's/SUPPORTS_WEAK/__GXX_WEAK__/g' \
-e 's/\([A-Z_]*USE_WEAK\)/_GLIBCXX_\1/g' \
< ${DIST}/libgcc/gthr-posix.h > ${.TARGET}.tmp && mv ${.TARGET}.tmp ${.TARGET}
.for _f in ${GTHRINCS}
CLEANFILES+= ${.TARGET} ${.TARGET}.tmp
.endfor
.if ${MKCOMPAT} != no && !empty(MACHINE_ARCH:M*64*)
SUBDIR+= arch
.else
INCS+= c++config.h
.endif
INCSDIR= /usr/include/g++/bits
INCSYMLINKS+= gthr-posix.h ${INCSDIR}/gthr-default.h
.include "${.CURDIR}/../Makefile.includes"
CLEANFILES+= ${BUILDINCS}
CXXDIST= ${DIST}/libstdc++-v3
COPYHEADERS= \
opt_random.h ${CXXDIST}/${G_CPU_OPT_BITS_RANDOM} \
basic_file.h ${CXXDIST}/${G_BASIC_FILE_H} \
c++allocator.h ${CXXDIST}/${G_ALLOCATOR_H} \
c++locale.h ${CXXDIST}/${G_CLOCALE_H} \
c++io.h ${CXXDIST}/${G_CSTDIO_H} \
messages_members.h ${CXXDIST}/${G_CMESSAGES_H} \
time_members.h ${CXXDIST}/${G_CTIME_H}
.for _h _s in ${COPYHEADERS}
${_h}: ${_s}
cp -pf ${.ALLSRC} ${.TARGET}
.endfor
.PATH: ${.CURDIR}/../../arch/${GCC_MACHINE_ARCH} \
${DIST}/libstdc++-v3/include \
${DIST}/libstdc++-v3/config \
${DIST}/libstdc++-v3/ \
${DIST}/libstdc++-v3/libsupc++
.include <bsd.subdir.mk>
|