summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-runtime.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-runtime.inc')
-rw-r--r--meta/recipes-devtools/gcc/gcc-runtime.inc195
1 files changed, 195 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc
new file mode 100644
index 0000000..fc178cb
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -0,0 +1,195 @@
1require gcc-configure-common.inc
2
3CXXFLAGS := "${@oe_filter_out('-fvisibility-inlines-hidden', '${CXXFLAGS}', d)}"
4
5EXTRA_OECONF_PATHS = " \
6 --with-gxx-include-dir=${includedir}/c++/ \
7 --with-sysroot=${STAGING_DIR_TARGET} \
8 --with-build-sysroot=${STAGING_DIR_TARGET}"
9
10ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
11
12EXTRA_OECONF += "--disable-libunwind-exceptions \
13 ${@base_contains('DISTRO_FEATURES', 'ptest', 1, 0, d)}"
14EXTRA_OECONF_append_linuxstdbase = " --enable-clocale=gnu"
15
16RUNTIMETARGET = "libssp libstdc++-v3 libgomp libatomic"
17# ?
18# libiberty
19# libmudflap
20# libgfortran needs separate recipe due to libquadmath dependency
21
22do_configure () {
23 export CXX="${CXX} -nostdinc++ -nostdlib++"
24 mtarget=`echo ${MULTIMACH_TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
25 target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
26 cp -fpPR ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$mtarget/* ${B}
27 for d in libgcc ${RUNTIMETARGET}; do
28 echo "Configuring $d"
29 rm -rf ${B}/$target/$d/
30 mkdir -p ${B}/$target/$d/
31 cd ${B}/$target/$d/
32 chmod a+x ${S}/$d/configure
33 ${S}/$d/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
34 done
35}
36
37do_compile () {
38 target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
39 for d in libgcc ${RUNTIMETARGET}; do
40 cd ${B}/$target/$d/
41 oe_runmake MULTIBUILDTOP=${B}/$target/$d/
42 done
43}
44
45do_install () {
46 target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
47 for d in ${RUNTIMETARGET}; do
48 cd ${B}/$target/$d/
49 oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/$d/ install
50 done
51 rm -rf ${D}${infodir}/libgomp.info ${D}${infodir}/dir
52 rm -rf ${D}${infodir}/libquadmath.info ${D}${infodir}/dir
53 if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude ]; then
54 rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude
55 fi
56 if [ -d ${D}${infodir} ]; then
57 rmdir --ignore-fail-on-non-empty -p ${D}${infodir}
58 fi
59 chown -R root:root ${D}
60}
61
62RDEPENDS_${PN}-ptest = "dejagnu make"
63
64do_configure_ptest() {
65 if [ "${PN}" = "${BPN}" ]; then
66 mkdir -p ${D}${PTEST_PATH}
67 cp ${S}/../run-ptest ${WORKDIR}
68 fi
69}
70
71do_compile_ptest() {
72 oe_runmake -C ${B}/${TARGET_SYS}/libstdc++-v3/testsuite buildtest-TESTS
73}
74
75do_install_ptest() {
76 oe_runmake -C ${B}/${TARGET_SYS}/libstdc++-v3 install-ptest DEST_DIR=${D}${PTEST_PATH} SOURCE_DIR=${S} BUILD_DIR=${B}/${TARGET_SYS} REPLACE_DIR=${PTEST_PATH}
77}
78
79INHIBIT_DEFAULT_DEPS = "1"
80DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++ libgcc"
81PROVIDES = "virtual/${TARGET_PREFIX}compilerlibs"
82
83BBCLASSEXTEND = "nativesdk"
84
85PACKAGES = "\
86 ${PN}-dbg \
87 libstdc++ \
88 libstdc++-precompile-dev \
89 libstdc++-dev \
90 libstdc++-staticdev \
91 libg2c \
92 libg2c-dev \
93 libssp \
94 libssp-dev \
95 libssp-staticdev \
96 libgfortran \
97 libgfortran-dev \
98 libgfortran-staticdev \
99 libmudflap \
100 libmudflap-dev \
101 libmudflap-staticdev \
102 libquadmath \
103 libquadmath-dev \
104 libquadmath-staticdev \
105 libgomp \
106 libgomp-dev \
107 libgomp-staticdev \
108 libatomic \
109 libatomic-dev \
110 libatomic-staticdev \
111 ${@base_contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', d)} \
112"
113# The base package doesn't exist, so we clear the recommends.
114RRECOMMENDS_${PN}-dbg = ""
115
116# include python debugging scripts
117FILES_${PN}-dbg += "\
118 ${libdir}/libstdc++.so.*-gdb.py \
119 ${datadir}/gcc-${BINV}/python/libstdcxx"
120
121FILES_libg2c = "${target_libdir}/libg2c.so.*"
122FILES_libg2c-dev = "\
123 ${libdir}/libg2c.so \
124 ${libdir}/libg2c.a \
125 ${libdir}/libfrtbegin.a"
126
127FILES_libstdc++ = "${libdir}/libstdc++.so.*"
128FILES_libstdc++-dev = "\
129 ${includedir}/c++/ \
130 ${libdir}/libstdc++.so \
131 ${libdir}/libstdc++.la \
132 ${libdir}/libsupc++.la"
133FILES_libstdc++-staticdev = "\
134 ${libdir}/libstdc++.a \
135 ${libdir}/libsupc++.a"
136
137FILES_libstdc++-precompile-dev = "${includedir}/c++/${TARGET_SYS}/bits/*.gch"
138
139FILES_libssp = "${libdir}/libssp.so.*"
140FILES_libssp-dev = " \
141 ${libdir}/libssp*.so \
142 ${libdir}/libssp*_nonshared.a \
143 ${libdir}/libssp*.la \
144 ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ssp"
145FILES_libssp-staticdev = " \
146 ${libdir}/libssp*.a"
147
148FILES_libgfortran = "${libdir}/libgfortran.so.*"
149FILES_libgfortran-dev = " \
150 ${libdir}/libgfortran*.so \
151 ${libdir}/libgfortran.spec \
152 ${libdir}/libgfortran.la \
153 ${libdir}/gcc/${TARGET_SYS}/${BINV}/libgfortranbegin.* \
154 ${libdir}/gcc/${TARGET_SYS}/${BINV}/libcaf_single*"
155FILES_libgfortran-staticdev = " \
156 ${libdir}/libgfortran.a"
157
158INSANE_SKIP_${MLPREFIX}libgfortran-dev = "staticdev"
159
160FILES_libquadmath = "${libdir}/libquadmath*.so.*"
161FILES_libquadmath-dev = "\
162 ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/quadmath* \
163 ${libdir}/libquadmath*.so \
164 ${libdir}/libquadmath.la"
165FILES_libquadmath-staticdev = "\
166 ${libdir}/libquadmath.a"
167
168FILES_libmudflap = "${libdir}/libmudflap*.so.*"
169FILES_libmudflap-dev = "\
170 ${libdir}/libmudflap*.so \
171 ${libdir}/libmudflap.la"
172FILES_libmudflap-staticdev = "\
173 ${libdir}/libmudflap.a"
174
175FILES_libgomp = "${libdir}/libgomp*${SOLIBS}"
176FILES_libgomp-dev = "\
177 ${libdir}/libgomp*${SOLIBSDEV} \
178 ${libdir}/libgomp*.la \
179 ${libdir}/libgomp.spec \
180 ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/omp.h \
181 "
182FILES_libgomp-staticdev = "\
183 ${libdir}/libgomp*.a \
184 "
185
186FILES_libatomic = "${libdir}/libatomic.so.*"
187FILES_libatomic-dev = " \
188 ${libdir}/libatomic.so \
189 ${libdir}/libatomic.la"
190FILES_libatomic-staticdev = " \
191 ${libdir}/libatomic.a"
192
193do_package_write_ipk[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
194do_package_write_deb[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
195do_package_write_rpm[depends] += "virtual/${MLPREFIX}libc:do_packagedata"