summaryrefslogtreecommitdiffstats
path: root/meta/packages/gcc/gcc_3.3.4.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/gcc/gcc_3.3.4.bb')
-rw-r--r--meta/packages/gcc/gcc_3.3.4.bb176
1 files changed, 176 insertions, 0 deletions
diff --git a/meta/packages/gcc/gcc_3.3.4.bb b/meta/packages/gcc/gcc_3.3.4.bb
new file mode 100644
index 0000000000..dc3a66cd29
--- /dev/null
+++ b/meta/packages/gcc/gcc_3.3.4.bb
@@ -0,0 +1,176 @@
1SECTION = "devel"
2PR = "r2"
3inherit autotools gettext
4
5DESCRIPTION = "The GNU cc and gcc C compilers."
6HOMEPAGE = "http://www.gnu.org/software/gcc/"
7LICENSE = "GPL"
8MAINTAINER = "Gerald Britton <gbritton@doomcom.org>"
9
10# libgcc libstdc++ libg2c are listed in our FILES_*, but are actually
11# packaged in the respective cross packages.
12PACKAGES = "${PN} ${PN}-symlinks \
13 ${PN}-c++ ${PN}-c++-symlinks \
14 ${PN}-f77 ${PN}-f77-symlinks \
15 libstdc++-dev libg2c-dev \
16 ${PN}-doc"
17
18FILES_${PN} = "${bindir}/${TARGET_PREFIX}gcc \
19 ${bindir}/${TARGET_PREFIX}cpp \
20 ${bindir}/${TARGET_PREFIX}gcov \
21 ${bindir}/${TARGET_PREFIX}gccbug \
22 ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/cc1 \
23 ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/collect2 \
24 ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/crt* \
25 ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/specs \
26 ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/lib* \
27 ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/include"
28
29FILES_${PN}-symlinks = "${bindir}/cc \
30 ${bindir}/gcc \
31 ${bindir}/cpp \
32 ${bindir}/gcov \
33 ${bindir}/gccbug"
34
35FILES_${PN}-c++ = "${bindir}/${TARGET_PREFIX}g++ \
36 ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/cc1plus"
37
38FILES_${PN}-c++-symlinks = "${bindir}/c++ \
39 ${bindir}/g++"
40
41PACKAGE_ARCH_libgcc = "${TARGET_ARCH}"
42FILES_libgcc = "/lib/libgcc_s.so.*"
43
44PACKAGE_ARCH_libstdc++ = "${TARGET_ARCH}"
45PACKAGE_ARCH_libstdc++-dev = "${TARGET_ARCH}"
46# Called from within gcc-cross, so libdir is set wrong
47#FILES_libstdc++ = "${libdir}/libstdc++.so.*"
48FILES_libstdc++ = "${libdir}/libstdc++.so.*"
49
50FILES_libstdc++-dev = "${includedir}/c++/${PV} \
51 ${libdir}/libstdc++.so \
52 ${libdir}/libstdc++.la \
53 ${libdir}/libstdc++.a \
54 ${libdir}/libsupc++.la \
55 ${libdir}/libsupc++.a"
56
57FILES_${PN}-doc = "${infodir} \
58 ${mandir} \
59 ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/include/README"
60
61SRC_URI = "${GNU_MIRROR}/gcc/releases/gcc-${PV}/gcc-${PV}.tar.bz2 \
62 file://arm-gotoff.dpatch;patch=1;pnum=0 \
63 file://arm-ldm.dpatch;patch=1;pnum=0 \
64 file://arm-tune.patch;patch=1;pnum=0 \
65 file://arm-ldm-peephole.patch;patch=1;pnum=0 \
66 file://libibery-crosstool.patch;patch=1;pnum=1 \
67 file://reverse-compare.patch;patch=1 \
68 file://gcc34-15089.patch;patch=1 \
69 file://gcc-uclibc-3.3-100-conf.patch;patch=1 \
70 file://gcc-uclibc-3.3-110-conf.patch;patch=1 \
71 file://gcc-uclibc-3.3-120-softfloat.patch;patch=1 \
72 file://gcc-uclibc-3.3-200-code.patch;patch=1 \
73 file://bash3.patch;patch=1"
74
75PREMIRRORS_prepend () {
76${GNU_MIRROR}/gcc/releases/ ftp://gcc.gnu.org/pub/gcc/releases/
77${GNU_MIRROR}/gcc/releases/ http://gcc.get-software.com/releases/
78}
79
80S = "${WORKDIR}/gcc-${PV}"
81B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
82
83EXTRA_OECONF = "${@['--enable-clocale=generic', ''][bb.data.getVar('USE_NLS', d, 1) != 'no']} \
84 --with-gnu-ld \
85 --enable-shared \
86 --enable-multilib \
87 --enable-target-optspace \
88 --enable-languages=c,c++,f77 \
89 --enable-threads=posix \
90 --enable-c99 \
91 --enable-long-long \
92 --enable-symvers=gnu \
93 --program-prefix=${TARGET_PREFIX} \
94 ${EXTRA_OECONF_PATHS} \
95 ${EXTRA_OECONF_DEP}"
96
97EXTRA_OECONF_PATHS = "--with-local-prefix=${prefix}/local \
98 --with-gxx-include-dir=${includedir}/c++/${PV}"
99
100EXTRA_OECONF_DEP = ""
101EXTRA_OECONF_uclibc = "--disable-__cxa_atexit"
102EXTRA_OECONF_glibc = "--enable-__cxa_atexit"
103EXTRA_OECONF += "${@get_gcc_fpu_setting(bb, d)}"
104
105def get_gcc_fpu_setting(bb, d):
106 if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
107 return "--with-float=soft"
108 return ""
109
110python __anonymous () {
111 import bb, re
112 if (re.match('linux-uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None):
113 bb.data.setVar('EXTRA_OECONF_DEP', '${EXTRA_OECONF_uclibc}', d)
114 elif (re.match('linux$', bb.data.getVar('TARGET_OS', d, 1)) != None):
115 bb.data.setVar('EXTRA_OECONF_DEP', '${EXTRA_OECONF_glibc}', d)
116}
117
118do_configure () {
119 # Setup these vars for cross building only
120 if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
121 export CC_FOR_TARGET="${CCACHE} ${HOST_PREFIX}gcc"
122 export GCC_FOR_TARGET="${CCACHE} ${HOST_PREFIX}gcc"
123 export CXX_FOR_TARGET="${CCACHE} ${HOST_PREFIX}g++"
124 export AS_FOR_TARGET="${HOST_PREFIX}as"
125 export LD_FOR_TARGET="${HOST_PREFIX}ld"
126 export NM_FOR_TARGET="${HOST_PREFIX}nm"
127 export AR_FOR_TARGET="${HOST_PREFIX}ar"
128 export RANLIB_FOR_TARGET="${HOST_PREFIX}ranlib"
129 fi
130 (cd ${S} && gnu-configize) || die "failure running gnu-configize"
131 oe_runconf
132}
133
134do_install () {
135 autotools_do_install
136
137 # Cleanup some of the gcc-lib stuff
138 rm -rf ${D}${libdir}/gcc-lib/${TARGET_SYS}/${PV}/install-tools
139
140 # Move libgcc_s into /lib
141 mkdir -p ${D}${base_libdir}
142 mv -f ${D}${libdir}/libgcc_s.so.* ${D}${base_libdir}
143 rm -f ${D}${libdir}/libgcc_s.so
144 ln -sf `echo ${libdir}/gcc-lib/${TARGET_SYS}/${PV} | tr -s / |
145 sed -e 's,^/,,' -e 's,[^/]*,..,g'`/lib/libgcc_s.so.? \
146 ${D}${libdir}/gcc-lib/${TARGET_SYS}/${PV}/libgcc_s.so
147
148 # Cleanup manpages..
149 rm -rf ${D}${mandir}/man7
150 mv ${D}${mandir}/man1/cpp.1 \
151 ${D}${mandir}/man1/${TARGET_SYS}-cpp.1
152 mv ${D}${mandir}/man1/gcov.1 \
153 ${D}${mandir}/man1/${TARGET_SYS}-gcov.1
154
155 # We use libiberty from binutils
156 rm -f ${D}${libdir}/libiberty.a
157
158 cd ${D}${bindir}
159
160 # We care about g++ not c++
161 rm -f *c++
162
163 # We don't care about the gcc-<version> ones for this
164 rm -f *gcc-?.?*
165
166 # These sometimes show up, they are strange, we remove them
167 rm -f ${TARGET_ARCH}-*${TARGET_ARCH}-*
168
169 # Symlinks so we can use these trivially on the target
170 ln -sf ${TARGET_SYS}-g77 g77
171 ln -sf ${TARGET_SYS}-g++ g++
172 ln -sf ${TARGET_SYS}-gcc gcc
173 ln -sf g77 f77
174 ln -sf g++ c++
175 ln -sf gcc cc
176}