summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-runtime.inc
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-08-22 09:50:09 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-08-23 16:20:13 +0100
commitaa77ec7eef910635a5882aa83bbd96f13676d8d0 (patch)
tree16c56947a8bd1ce0935d405b236ea74612a6bcfa /meta/recipes-devtools/gcc/gcc-runtime.inc
parent2eb9c1cc75a0f39390ddfcc3688fa4893fb77991 (diff)
downloadpoky-aa77ec7eef910635a5882aa83bbd96f13676d8d0.tar.gz
gcc-*-runtime.inc: Fold configuration into gcc-runtime.inc
(From OE-Core rev: 9cdfd55de8dbdea3d5e5ed25fbc67d1f198a069a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-runtime.inc')
-rw-r--r--meta/recipes-devtools/gcc/gcc-runtime.inc145
1 files changed, 145 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 0000000000..b88288963e
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -0,0 +1,145 @@
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"
13EXTRA_OECONF_append_linuxstdbase = " --enable-clocale=gnu"
14
15RUNTIMETARGET = "libssp libstdc++-v3 libgomp"
16# ?
17# libiberty
18# libmudflap
19# libgfortran
20
21do_configure () {
22 export CXX="${CXX} -nostdinc++ -nostdlib++"
23 mtarget=`echo ${MULTIMACH_TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
24 target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
25 cp -fpPR ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$mtarget/* ${B}
26 for d in libgcc ${RUNTIMETARGET}; do
27 echo "Configuring $d"
28 rm -rf ${B}/$target/$d/
29 mkdir -p ${B}/$target/$d/
30 cd ${B}/$target/$d/
31 chmod a+x ${S}/$d/configure
32 ${S}/$d/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
33 done
34}
35
36do_compile () {
37 target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
38 for d in libgcc ${RUNTIMETARGET}; do
39 cd ${B}/$target/$d/
40 oe_runmake MULTIBUILDTOP=${B}/$target/$d/
41 done
42}
43
44do_install () {
45 target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
46 for d in ${RUNTIMETARGET}; do
47 cd ${B}/$target/$d/
48 oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/$d/ install
49 done
50 rm -rf ${D}${infodir}/libgomp.info ${D}${infodir}/dir
51 if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude ]; then
52 rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude
53 fi
54 if [ -d ${D}${infodir} ]; then
55 rmdir --ignore-fail-on-non-empty -p ${D}${infodir}
56 fi
57 chown -R root:root ${D}
58}
59
60INHIBIT_DEFAULT_DEPS = "1"
61DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++ libgcc"
62PROVIDES = "virtual/${TARGET_PREFIX}compilerlibs"
63
64BBCLASSEXTEND = "nativesdk"
65
66PACKAGES = "\
67 ${PN}-dbg \
68 libstdc++ \
69 libstdc++-precompile-dev \
70 libstdc++-dev \
71 libstdc++-staticdev \
72 libg2c \
73 libg2c-dev \
74 libssp \
75 libssp-dev \
76 libssp-staticdev \
77 libgfortran \
78 libgfortran-dev \
79 libmudflap \
80 libmudflap-dev \
81 libgomp \
82 libgomp-dev \
83 libgomp-staticdev \
84"
85# The base package doesn't exist, so we clear the recommends.
86RRECOMMENDS_${PN}-dbg = ""
87
88# include python debugging scripts
89FILES_${PN}-dbg += "\
90 ${libdir}/libstdc++.so.*-gdb.py \
91 ${datadir}/gcc-${BINV}/python/libstdcxx"
92
93FILES_libg2c = "${target_libdir}/libg2c.so.*"
94FILES_libg2c-dev = "\
95 ${libdir}/libg2c.so \
96 ${libdir}/libg2c.a \
97 ${libdir}/libfrtbegin.a"
98
99FILES_libstdc++ = "${libdir}/libstdc++.so.*"
100FILES_libstdc++-dev = "\
101 ${includedir}/c++/ \
102 ${libdir}/libstdc++.so \
103 ${libdir}/libstdc++.la \
104 ${libdir}/libsupc++.la"
105FILES_libstdc++-staticdev = "\
106 ${libdir}/libstdc++.a \
107 ${libdir}/libsupc++.a"
108
109FILES_libstdc++-precompile-dev = "${includedir}/c++/${TARGET_SYS}/bits/*.gch"
110
111FILES_libssp = "${libdir}/libssp.so.*"
112FILES_libssp-dev = " \
113 ${libdir}/libssp*.so \
114 ${libdir}/libssp*_nonshared.a \
115 ${libdir}/libssp*.la \
116 ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ssp"
117FILES_libssp-staticdev = " \
118 ${libdir}/libssp*.a"
119
120FILES_libgfortran = "${libdir}/libgfortran.so.*"
121FILES_libgfortran-dev = " \
122 ${libdir}/libgfortran.a \
123 ${libdir}/libgfortran.so \
124 ${libdir}/libgfortranbegin.a"
125
126FILES_libmudflap = "${libdir}/libmudflap*.so.*"
127FILES_libmudflap-dev = "\
128 ${libdir}/libmudflap*.so \
129 ${libdir}/libmudflap*.a \
130 ${libdir}/libmudflap*.la"
131
132FILES_libgomp = "${libdir}/libgomp*${SOLIBS}"
133FILES_libgomp-dev = "\
134 ${libdir}/libgomp*${SOLIBSDEV} \
135 ${libdir}/libgomp*.la \
136 ${libdir}/libgomp.spec \
137 ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/omp.h \
138 "
139FILES_libgomp-staticdev = "\
140 ${libdir}/libgomp*.a \
141 "
142
143do_package_write_ipk[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
144do_package_write_deb[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
145do_package_write_rpm[depends] += "virtual/${MLPREFIX}libc:do_packagedata"