summaryrefslogtreecommitdiffstats
path: root/meta/packages/gcc/gcc-package-target.inc
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2008-03-18 10:41:39 +0000
committerRichard Purdie <richard@openedhand.com>2008-03-18 10:41:39 +0000
commit1255ee64ee58fb5f0acd0bdbf4f0a54afd5ceeaf (patch)
tree293d34ede70b906b04967ac077e32a8fee4e855b /meta/packages/gcc/gcc-package-target.inc
parent402c7dcb2790bd51de9436befe8c273e538be441 (diff)
downloadpoky-1255ee64ee58fb5f0acd0bdbf4f0a54afd5ceeaf.tar.gz
gcc: Merge in the major cleanup I made in OE.dev
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4038 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/gcc/gcc-package-target.inc')
-rw-r--r--meta/packages/gcc/gcc-package-target.inc157
1 files changed, 157 insertions, 0 deletions
diff --git a/meta/packages/gcc/gcc-package-target.inc b/meta/packages/gcc/gcc-package-target.inc
new file mode 100644
index 0000000000..2c19c5ecc7
--- /dev/null
+++ b/meta/packages/gcc/gcc-package-target.inc
@@ -0,0 +1,157 @@
1PACKAGES = "\
2 ${PN} ${PN}-symlinks \
3 g++ g++-symlinks \
4 cpp cpp-symlinks \
5 g77 g77-symlinks \
6 gfortran gfortran-symlinks \
7 gcov gcov-symlinks \
8 libmudflap libmudflap-dev \
9 libgcc-dev \
10 libstdc++-dev \
11 libg2c-dev \
12 libgfortran-dev \
13 ${PN}-doc \
14"
15
16FILES_${PN} = "\
17 ${bindir}/${TARGET_PREFIX}gcc \
18 ${bindir}/${TARGET_PREFIX}gccbug \
19 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/collect2 \
20 ${gcclibdir}/${TARGET_SYS}/${BINV}/*.o \
21 ${gcclibdir}/${TARGET_SYS}/${BINV}/specs \
22 ${gcclibdir}/${TARGET_SYS}/${BINV}/lib* \
23 ${gcclibdir}/${TARGET_SYS}/${BINV}/include \
24"
25FILES_${PN}-symlinks = "\
26 ${bindir}/cc \
27 ${bindir}/gcc \
28 ${bindir}/gccbug \
29"
30
31FILES_g77 = "\
32 ${bindir}/${TARGET_PREFIX}g77 \
33 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f771 \
34"
35FILES_g77-symlinks = "\
36 ${bindir}/g77 \
37 ${bindir}/f77 \
38"
39FILES_gfortran = "\
40 ${bindir}/${TARGET_PREFIX}gfortran \
41 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f951 \
42"
43FILES_gfortran-symlinks = "\
44 ${bindir}/gfortran \
45 ${bindir}/f95"
46
47FILES_cpp = "\
48 ${bindir}/${TARGET_PREFIX}cpp \
49 ${base_libdir}/cpp \
50 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1"
51FILES_cpp-symlinks = "${bindir}/cpp"
52
53FILES_gcov = "${bindir}/${TARGET_PREFIX}gcov"
54FILES_gcov-symlinks = "${bindir}/gcov"
55
56FILES_libgcc = "${base_libdir}/libgcc*.so.*"
57FILES_libgcc-dev = "${base_libdir}/libgcc*.so"
58
59# Called from within gcc-cross, so libdir is set wrong
60FILES_libg2c = "${target_libdir}/libg2c.so.*"
61FILES_libg2c-dev = "\
62 ${libdir}/libg2c.so \
63 ${libdir}/libg2c.a \
64 ${libdir}/libfrtbegin.a \
65"
66
67FILES_g++ = "\
68 ${bindir}/${TARGET_PREFIX}g++ \
69 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1plus \
70"
71FILES_g++-symlinks = "\
72 ${bindir}/c++ \
73 ${bindir}/g++ \
74"
75
76FILES_libstdc++ = "${libdir}/libstdc++.so.*"
77FILES_libstdc++-dev = "\
78 ${includedir}/c++/${BINV} \
79 ${libdir}/libstdc++.so \
80 ${libdir}/libstdc++.la \
81 ${libdir}/libstdc++.a \
82 ${libdir}/libsupc++.la \
83 ${libdir}/libsupc++.a \
84"
85
86FILES_libgfortran-dev = "${libdir}/libgfortran.a \
87 ${libdir}/libgfortran.so \
88 ${libdir}/libgfortranbegin.a"
89
90FILES_libmudflap = "${libdir}/libmudflap*.so.*"
91FILES_libmudflap-dev = "\
92 ${libdir}/libmudflap*.so \
93 ${libdir}/libmudflap*.a \
94 ${libdir}/libmudflap*.a \
95"
96
97FILES_${PN}-doc = "\
98 ${infodir} \
99 ${mandir} \
100 ${gcclibdir}/${TARGET_SYS}/${BINV}/include/README \
101"
102
103do_install () {
104 autotools_do_install
105
106 # Cleanup some of the ${libdir}{,exec}/gcc stuff ...
107 rm -r ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/install-tools
108 rm -r ${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/install-tools
109
110 # Hack around specs file assumptions
111 test -f ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/specs && sed -i -e '/^*cross_compile:$/ { n; s/1/0/; }' ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/specs
112
113 # Move libgcc_s into /lib
114 mkdir -p ${D}${base_libdir}
115 if [ -f ${D}${libdir}/nof/libgcc_s.so ]; then
116 mv ${D}${libdir}/nof/libgcc_s.so.* ${D}${base_libdir}
117 else
118 mv ${D}${libdir}/libgcc_s.so.* ${D}${base_libdir}
119 fi
120 rm -f ${D}${libdir}/libgcc_s.so
121 ln -sf `echo ${libdir}/gcc/${TARGET_SYS}/${BINV} \
122 | tr -s / \
123 | sed -e 's,^/,,' -e 's,[^/]*,..,g'`/lib/libgcc_s.so.1 \
124 ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/libgcc_s.so
125
126 # We don't need libtool libraries
127 rm -f ${D}${libdir}/libg2c.la &>/dev/null || true
128
129 # Cleanup manpages..
130 rm -rf ${D}${mandir}/man7
131
132 # We use libiberty from binutils
133 rm -f ${D}${libdir}/libiberty.a
134
135 cd ${D}${bindir}
136
137 # We care about g++ not c++
138 rm -f *c++
139
140 # We don't care about the gcc-<version> ones for this
141 rm -f *gcc-?.?*
142
143 # These sometimes show up, they are strange, we remove them
144 rm -f ${TARGET_ARCH}-*${TARGET_ARCH}-*
145
146 # Symlinks so we can use these trivially on the target
147 ln -sf ${TARGET_SYS}-g77 g77 || true
148 ln -sf ${TARGET_SYS}-gfortran gfortran || true
149 ln -sf ${TARGET_SYS}-g++ g++
150 ln -sf ${TARGET_SYS}-gcc gcc
151 ln -sf g77 f77 || true
152 ln -sf gfortran f95 || true
153 ln -sf g++ c++
154 ln -sf gcc cc
155 ln -sf ${bindir}/${TARGET_SYS}-cpp ${D}${base_libdir}/cpp
156 ln -sf ${bindir}/${TARGET_SYS}-cpp ${D}${bindir}/cpp
157}