summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/packages/gcc/gcc-configure-runtime.inc5
-rw-r--r--meta/packages/gcc/gcc-configure-target.inc1
-rw-r--r--meta/packages/gcc/gcc-cross-initial.inc4
-rw-r--r--meta/packages/gcc/gcc-cross-intermediate.inc4
-rw-r--r--meta/packages/gcc/gcc-cross_4.3.3.bb6
-rw-r--r--meta/packages/gcc/gcc-package-cross.inc46
-rw-r--r--meta/packages/gcc/gcc-package-runtime.inc70
-rw-r--r--meta/packages/gcc/gcc-package-sdk.inc12
-rw-r--r--meta/packages/gcc/gcc-package-target.inc63
-rw-r--r--meta/packages/gcc/gcc-runtime_4.3.3.bb46
10 files changed, 142 insertions, 115 deletions
diff --git a/meta/packages/gcc/gcc-configure-runtime.inc b/meta/packages/gcc/gcc-configure-runtime.inc
new file mode 100644
index 0000000000..2fd3114911
--- /dev/null
+++ b/meta/packages/gcc/gcc-configure-runtime.inc
@@ -0,0 +1,5 @@
1require gcc-configure-common.inc
2
3EXTRA_OECONF_PATHS = " \
4 --with-local-prefix=${STAGING_DIR_TARGET}${prefix} \
5 --with-gxx-include-dir=${includedir}/c++/${BINV}/"
diff --git a/meta/packages/gcc/gcc-configure-target.inc b/meta/packages/gcc/gcc-configure-target.inc
index 44d6136240..2fd3114911 100644
--- a/meta/packages/gcc/gcc-configure-target.inc
+++ b/meta/packages/gcc/gcc-configure-target.inc
@@ -3,4 +3,3 @@ require gcc-configure-common.inc
3EXTRA_OECONF_PATHS = " \ 3EXTRA_OECONF_PATHS = " \
4 --with-local-prefix=${STAGING_DIR_TARGET}${prefix} \ 4 --with-local-prefix=${STAGING_DIR_TARGET}${prefix} \
5 --with-gxx-include-dir=${includedir}/c++/${BINV}/" 5 --with-gxx-include-dir=${includedir}/c++/${BINV}/"
6
diff --git a/meta/packages/gcc/gcc-cross-initial.inc b/meta/packages/gcc/gcc-cross-initial.inc
index 4bd21232e1..a3545417ce 100644
--- a/meta/packages/gcc/gcc-cross-initial.inc
+++ b/meta/packages/gcc/gcc-cross-initial.inc
@@ -17,3 +17,7 @@ EXTRA_OECONF = "--with-local-prefix=${STAGING_DIR_TARGET}${target_prefix} \
17 --with-sysroot=${STAGING_DIR_TARGET} \ 17 --with-sysroot=${STAGING_DIR_TARGET} \
18 --with-build-sysroot=${STAGING_DIR_TARGET} \ 18 --with-build-sysroot=${STAGING_DIR_TARGET} \
19 ${@get_gcc_fpu_setting(bb, d)}" 19 ${@get_gcc_fpu_setting(bb, d)}"
20
21do_compile () {
22 oe_runmake
23}
diff --git a/meta/packages/gcc/gcc-cross-intermediate.inc b/meta/packages/gcc/gcc-cross-intermediate.inc
index e298307b67..169419f247 100644
--- a/meta/packages/gcc/gcc-cross-intermediate.inc
+++ b/meta/packages/gcc/gcc-cross-intermediate.inc
@@ -16,6 +16,10 @@ EXTRA_OECONF = "--with-local-prefix=${STAGING_DIR_TARGET}${target_prefix} \
16 --with-build-sysroot=${STAGING_DIR_TARGET} \ 16 --with-build-sysroot=${STAGING_DIR_TARGET} \
17 ${@get_gcc_fpu_setting(bb, d)}" 17 ${@get_gcc_fpu_setting(bb, d)}"
18 18
19do_compile () {
20 oe_runmake
21}
22
19do_install () { 23do_install () {
20 oe_runmake 'DESTDIR=${D}' install 24 oe_runmake 'DESTDIR=${D}' install
21} 25}
diff --git a/meta/packages/gcc/gcc-cross_4.3.3.bb b/meta/packages/gcc/gcc-cross_4.3.3.bb
index 22efffa539..6122d4c423 100644
--- a/meta/packages/gcc/gcc-cross_4.3.3.bb
+++ b/meta/packages/gcc/gcc-cross_4.3.3.bb
@@ -1,4 +1,4 @@
1PR = "r7" 1PR = "r10"
2 2
3require gcc-${PV}.inc 3require gcc-${PV}.inc
4require gcc-cross4.inc 4require gcc-cross4.inc
@@ -10,3 +10,7 @@ SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "
10EXTRA_OECONF += "--disable-libunwind-exceptions --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native}" 10EXTRA_OECONF += "--disable-libunwind-exceptions --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native}"
11 11
12ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_DIR_TARGET}${target_includedir}" 12ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_DIR_TARGET}${target_includedir}"
13
14do_compile () {
15 oe_runmake all-host
16}
diff --git a/meta/packages/gcc/gcc-package-cross.inc b/meta/packages/gcc/gcc-package-cross.inc
index cb23b23f22..6c56504828 100644
--- a/meta/packages/gcc/gcc-package-cross.inc
+++ b/meta/packages/gcc/gcc-package-cross.inc
@@ -1,42 +1,11 @@
1INHIBIT_PACKAGE_STRIP ?= ""
2OLD_INHIBIT_PACKAGE_STRIP := "${INHIBIT_PACKAGE_STRIP}"
3INHIBIT_PACKAGE_STRIP = "1" 1INHIBIT_PACKAGE_STRIP = "1"
4 2
5PACKAGES = "libgcc libssp libstdc++ libg2c libgfortran"
6
7# Called from within gcc-cross, so libdir is set wrong
8FILES_libg2c = "${target_libdir}/libg2c.so.*"
9
10FILES_libssp = "${target_libdir}/libssp.so.*"
11
12FILES_libgfortran = "${target_libdir}/libgfortran.so.*"
13
14FILES_libgcc = "${target_base_libdir}/libgcc_s.so.1"
15
16FILES_libstdc++ = "${target_libdir}/libstdc++.so.*"
17
18do_install () { 3do_install () {
19 oe_runmake 'DESTDIR=${D}' install 4 oe_runmake 'DESTDIR=${D}' install-host
20 5
21 install -d ${D}${target_base_libdir} 6 install -d ${D}${target_base_libdir}
22 install -d ${D}${target_libdir} 7 install -d ${D}${target_libdir}
23 8
24 for d in ${TARGET_SYS}/lib/nof ${TARGET_SYS}/lib64 ${TARGET_SYS}/lib; do
25 if [ -d ${D}${prefix}/$d/ ]; then
26 mv -f ${D}${prefix}/$d/libgcc* ${D}${target_base_libdir} || true
27 mv -f ${D}${prefix}/$d/* ${D}${target_libdir} || true
28 fi
29 done
30
31 # Manually run the target stripper since we won't get it run by
32 # the packaging.
33 if [ "x${OLD_INHIBIT_PACKAGE_STRIP}" != "x1" ]; then
34 ${TARGET_PREFIX}strip ${D}${target_libdir}/libstdc++.so.* || true
35 ${TARGET_PREFIX}strip ${D}${target_libdir}/libg2c.so.* || true
36 ${TARGET_PREFIX}strip ${D}${target_base_libdir}/libgcc_s.so.* || true
37 ${TARGET_PREFIX}strip ${D}${target_libdir}/libgfortran*.so* || true
38 fi
39
40 # Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77 9 # Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77
41 # gfortran is fully backwards compatible. This is a safe and practical solution. 10 # gfortran is fully backwards compatible. This is a safe and practical solution.
42 ln -sf ${CROSS_DIR}/bin/${TARGET_PREFIX}gfortran ${CROSS_DIR}/bin/${TARGET_PREFIX}g77 || true 11 ln -sf ${CROSS_DIR}/bin/${TARGET_PREFIX}gfortran ${CROSS_DIR}/bin/${TARGET_PREFIX}g77 || true
@@ -47,12 +16,9 @@ do_install () {
47 rm -rf ${D}${CROSS_DIR}/$d 16 rm -rf ${D}${CROSS_DIR}/$d
48 done 17 done
49 18
50 #fix up libsupc++ and libstdc++ la files 19 # gcc-runtime requires some headers, we stash them here
51 for f in libssp.la libssp_nonshared.la libsupc++.la libstdc++.la ; do 20 install -d ${D}${includedir}/gcc-build-internal
52 # Remove any -L options from dependency_libs - we should never need them as the 21 for f in auto-host.h gcov-iov.h gthr-default.h libgcc.mvars options.h tconfig.h tm.h; do
53 # files are in the sysroot 22 cp ${B}/gcc/$f ${D}${includedir}/gcc-build-internal/
54 sed -i "s|\(dependency_libs\s*=.*\)-L\s*[^ ]*\(.*\)|\1\2|g" ${D}${target_libdir}/$f || true
55 # Set libdir correctly
56 sed -i "s|libdir\s*=.*|libdir='${target_libdir}'|g" ${D}${target_libdir}/$f || true
57 done 23 done
58} 24}
diff --git a/meta/packages/gcc/gcc-package-runtime.inc b/meta/packages/gcc/gcc-package-runtime.inc
new file mode 100644
index 0000000000..646e58c589
--- /dev/null
+++ b/meta/packages/gcc/gcc-package-runtime.inc
@@ -0,0 +1,70 @@
1PACKAGES = "\
2 libgcc \
3 libgcc-dev \
4 libstdc++ \
5 libstdc++-precompile-dev \
6 libstdc++-dev \
7 libg2c \
8 libg2c-dev \
9 libssp \
10 libssp-dev \
11 libgfortran \
12 libgfortran-dev \
13 libmudflap \
14 libmudflap-dev \
15"
16
17FILES_libgcc = "${base_libdir}/libgcc*.so.*"
18FILES_libgcc-dev = " \
19 ${base_libdir}/libgcc*.so \
20 ${libdir}/gcc/${TARGET_SYS}/${BINV}/crt* \
21 ${libdir}/gcc/${TARGET_SYS}/${BINV}/libgcc*"
22
23FILES_libg2c = "${target_libdir}/libg2c.so.*"
24FILES_libg2c-dev = "\
25 ${libdir}/libg2c.so \
26 ${libdir}/libg2c.a \
27 ${libdir}/libfrtbegin.a"
28
29FILES_libstdc++ = "${libdir}/libstdc++.so.*"
30FILES_libstdc++-dev = "\
31 ${includedir}/c++/${BINV} \
32 ${libdir}/libstdc++.so \
33 ${libdir}/libstdc++.la \
34 ${libdir}/libstdc++.a \
35 ${libdir}/libsupc++.la \
36 ${libdir}/libsupc++.a"
37
38FILES_libstdc++-precompile-dev = "${includedir}/c++/${BINV}/${TARGET_SYS}/bits/*.gch"
39
40FILES_libssp = "${libdir}/libssp.so.*"
41FILES_libssp-dev = " \
42 ${libdir}/libssp*.so \
43 ${libdir}/libssp*.a \
44 ${libdir}/libssp*.la \
45 ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ssp"
46
47FILES_libgfortran = "${libdir}/libgfortran.so.*"
48FILES_libgfortran-dev = " \
49 ${libdir}/libgfortran.a \
50 ${libdir}/libgfortran.so \
51 ${libdir}/libgfortranbegin.a"
52
53FILES_libmudflap = "${libdir}/libmudflap*.so.*"
54FILES_libmudflap-dev = "\
55 ${libdir}/libmudflap*.so \
56 ${libdir}/libmudflap*.a \
57 ${libdir}/libmudflap*.la"
58
59
60do_install () {
61 oe_runmake 'DESTDIR=${D}' install-target
62
63 # Move libgcc_s into /lib
64 mkdir -p ${D}${base_libdir}
65 if [ -f ${D}${libdir}/nof/libgcc_s.so ]; then
66 mv ${D}${libdir}/nof/libgcc* ${D}${base_libdir}
67 else
68 mv ${D}${libdir}/libgcc* ${D}${base_libdir} || true
69 fi
70}
diff --git a/meta/packages/gcc/gcc-package-sdk.inc b/meta/packages/gcc/gcc-package-sdk.inc
index 0e66772d10..cdce1da1c7 100644
--- a/meta/packages/gcc/gcc-package-sdk.inc
+++ b/meta/packages/gcc/gcc-package-sdk.inc
@@ -1,5 +1,3 @@
1INHIBIT_PACKAGE_STRIP ?= ""
2OLD_INHIBIT_PACKAGE_STRIP := "${INHIBIT_PACKAGE_STRIP}"
3INHIBIT_PACKAGE_STRIP = "1" 1INHIBIT_PACKAGE_STRIP = "1"
4 2
5# Having anything auto depending on gcc-cross-sdk is a really bad idea... 3# Having anything auto depending on gcc-cross-sdk is a really bad idea...
@@ -30,7 +28,7 @@ FILES_${PN}-doc = "\
30 " 28 "
31 29
32do_install () { 30do_install () {
33 oe_runmake 'DESTDIR=${D}' install 31 oe_runmake 'DESTDIR=${D}' install-host
34 32
35 # Cleanup some of the ${libdir}{,exec}/gcc stuff ... 33 # Cleanup some of the ${libdir}{,exec}/gcc stuff ...
36 rm -r ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/install-tools 34 rm -r ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/install-tools
@@ -52,13 +50,5 @@ do_install () {
52 ln -sf "${bindir}/`basename $l`" "${D}${prefix}/${TARGET_SYS}/bin/`basename $l | sed -e 's,${TARGET_PREFIX},,'`" 50 ln -sf "${bindir}/`basename $l`" "${D}${prefix}/${TARGET_SYS}/bin/`basename $l | sed -e 's,${TARGET_PREFIX},,'`"
53 done 51 done
54 ln -sf "${bindir}/${TARGET_PREFIX}gcc" "${D}${prefix}/${TARGET_SYS}/bin/cc" 52 ln -sf "${bindir}/${TARGET_PREFIX}gcc" "${D}${prefix}/${TARGET_SYS}/bin/cc"
55
56 # Manually run the target stripper since we won't get it run by
57 # the packaging.
58 if [ "x${OLD_INHIBIT_PACKAGE_STRIP}" != "x1" ]; then
59 ${TARGET_PREFIX}strip ${D}${prefix}/${TARGET_SYS}/lib/libstdc++.so.*
60 ${TARGET_PREFIX}strip ${D}${prefix}/${TARGET_SYS}/lib/libg2c.so.* || true
61 ${TARGET_PREFIX}strip ${D}${prefix}/${TARGET_SYS}/lib/libgcc_s.so.*
62 fi
63} 53}
64 54
diff --git a/meta/packages/gcc/gcc-package-target.inc b/meta/packages/gcc/gcc-package-target.inc
index c1200b8bc7..f668211e71 100644
--- a/meta/packages/gcc/gcc-package-target.inc
+++ b/meta/packages/gcc/gcc-package-target.inc
@@ -5,11 +5,6 @@ PACKAGES = "\
5 g77 g77-symlinks \ 5 g77 g77-symlinks \
6 gfortran gfortran-symlinks \ 6 gfortran gfortran-symlinks \
7 gcov gcov-symlinks \ 7 gcov gcov-symlinks \
8 libmudflap libmudflap-dev \
9 libgcc-dev \
10 libstdc++-dev \
11 libg2c-dev \
12 libgfortran-dev \
13 ${PN}-doc \ 8 ${PN}-doc \
14" 9"
15 10
@@ -54,17 +49,6 @@ FILES_cpp-symlinks = "${bindir}/cpp"
54FILES_gcov = "${bindir}/${TARGET_PREFIX}gcov" 49FILES_gcov = "${bindir}/${TARGET_PREFIX}gcov"
55FILES_gcov-symlinks = "${bindir}/gcov" 50FILES_gcov-symlinks = "${bindir}/gcov"
56 51
57FILES_libgcc = "${base_libdir}/libgcc*.so.*"
58FILES_libgcc-dev = "${base_libdir}/libgcc*.so"
59
60# Called from within gcc-cross, so libdir is set wrong
61FILES_libg2c = "${target_libdir}/libg2c.so.*"
62FILES_libg2c-dev = "\
63 ${libdir}/libg2c.so \
64 ${libdir}/libg2c.a \
65 ${libdir}/libfrtbegin.a \
66"
67
68FILES_g++ = "\ 52FILES_g++ = "\
69 ${bindir}/${TARGET_PREFIX}g++ \ 53 ${bindir}/${TARGET_PREFIX}g++ \
70 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1plus \ 54 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1plus \
@@ -74,26 +58,6 @@ FILES_g++-symlinks = "\
74 ${bindir}/g++ \ 58 ${bindir}/g++ \
75" 59"
76 60
77FILES_libstdc++ = "${libdir}/libstdc++.so.*"
78FILES_libstdc++-dev = "\
79 ${includedir}/c++/${BINV} \
80 ${libdir}/libstdc++.so \
81 ${libdir}/libstdc++.la \
82 ${libdir}/libstdc++.a \
83 ${libdir}/libsupc++.la \
84 ${libdir}/libsupc++.a \
85"
86
87FILES_libgfortran-dev = "${libdir}/libgfortran.a \
88 ${libdir}/libgfortran.so \
89 ${libdir}/libgfortranbegin.a"
90
91FILES_libmudflap = "${libdir}/libmudflap*.so.*"
92FILES_libmudflap-dev = "\
93 ${libdir}/libmudflap*.so \
94 ${libdir}/libmudflap*.a \
95 ${libdir}/libmudflap*.a \
96"
97 61
98FILES_${PN}-doc = "\ 62FILES_${PN}-doc = "\
99 ${infodir} \ 63 ${infodir} \
@@ -102,7 +66,7 @@ FILES_${PN}-doc = "\
102" 66"
103 67
104do_install () { 68do_install () {
105 autotools_do_install 69 oe_runmake 'DESTDIR=${D}' install-host
106 70
107 # Cleanup some of the ${libdir}{,exec}/gcc stuff ... 71 # Cleanup some of the ${libdir}{,exec}/gcc stuff ...
108 rm -r ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/install-tools 72 rm -r ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/install-tools
@@ -111,28 +75,9 @@ do_install () {
111 # Hack around specs file assumptions 75 # Hack around specs file assumptions
112 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 76 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
113 77
114 # Move libgcc_s into /lib
115 mkdir -p ${D}${base_libdir}
116 if [ -f ${D}${libdir}/nof/libgcc_s.so ]; then
117 mv ${D}${libdir}/nof/libgcc_s.so.* ${D}${base_libdir}
118 else
119 mv ${D}${libdir}/libgcc_s.so.* ${D}${base_libdir} || true
120 fi
121 rm -f ${D}${libdir}/libgcc_s.so || true
122 ln -sf `echo ${libdir}/gcc/${TARGET_SYS}/${BINV} \
123 | tr -s / \
124 | sed -e 's,^/,,' -e 's,[^/]*,..,g'`/lib/libgcc_s.so.1 \
125 ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/libgcc_s.so
126
127 # We don't need libtool libraries
128 rm -f ${D}${libdir}/libg2c.la &>/dev/null || true
129
130 # Cleanup manpages.. 78 # Cleanup manpages..
131 rm -rf ${D}${mandir}/man7 79 rm -rf ${D}${mandir}/man7
132 80
133 # We use libiberty from binutils
134 rm -f ${D}${libdir}/libiberty.a
135
136 cd ${D}${bindir} 81 cd ${D}${bindir}
137 82
138 # We care about g++ not c++ 83 # We care about g++ not c++
@@ -141,9 +86,6 @@ do_install () {
141 # We don't care about the gcc-<version> ones for this 86 # We don't care about the gcc-<version> ones for this
142 rm -f *gcc-?.?* 87 rm -f *gcc-?.?*
143 88
144 # These sometimes show up, they are strange, we remove them
145 rm -f ${TARGET_ARCH}-*${TARGET_ARCH}-*
146
147 # Symlinks so we can use these trivially on the target 89 # Symlinks so we can use these trivially on the target
148 ln -sf ${TARGET_SYS}-g77 g77 || true 90 ln -sf ${TARGET_SYS}-g77 g77 || true
149 ln -sf ${TARGET_SYS}-gfortran gfortran || true 91 ln -sf ${TARGET_SYS}-gfortran gfortran || true
@@ -155,7 +97,4 @@ do_install () {
155 ln -sf gcc cc 97 ln -sf gcc cc
156 ln -sf ${bindir}/${TARGET_SYS}-cpp ${D}${base_libdir}/cpp 98 ln -sf ${bindir}/${TARGET_SYS}-cpp ${D}${base_libdir}/cpp
157 ln -sf ${bindir}/${TARGET_SYS}-cpp ${D}${bindir}/cpp 99 ln -sf ${bindir}/${TARGET_SYS}-cpp ${D}${bindir}/cpp
158
159 # Remove precompiled c++ headers as they are really big
160 rm -rf ${D}${includedir}/c++/${BINV}/${TARGET_SYS}/bits/*.gch
161} 100}
diff --git a/meta/packages/gcc/gcc-runtime_4.3.3.bb b/meta/packages/gcc/gcc-runtime_4.3.3.bb
new file mode 100644
index 0000000000..080841ce8f
--- /dev/null
+++ b/meta/packages/gcc/gcc-runtime_4.3.3.bb
@@ -0,0 +1,46 @@
1PR = "r10"
2
3require gcc-${PV}.inc
4require gcc-configure-runtime.inc
5require gcc-package-runtime.inc
6
7SRC_URI_append = "file://fortran-cross-compile-hack.patch;patch=1"
8
9ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
10
11RUNTIMETARGET = "libgcc libssp libstdc++-v3"
12# ?
13# libiberty
14# libmudflap
15# libgfortran
16
17do_configure () {
18 cp ${CROSS_DIR}/include/gcc-build-internal/* ${S}/gcc
19 for d in ${RUNTIMETARGET}; do
20 echo "Configuring $d"
21 mkdir -p ${B}/$d/
22 cd ${B}/$d/
23 chmod a+x ${S}/$d/configure
24 ${S}/$d/configure ${CONFIGUREOPTS}
25 done
26}
27
28do_compile () {
29 for d in ${RUNTIMETARGET}; do
30 cd ${B}/$d/
31 oe_runmake
32 done
33}
34
35do_install () {
36 for d in ${RUNTIMETARGET}; do
37 cd ${B}/$d/
38 oe_runmake 'DESTDIR=${D}' install
39 done
40}
41
42INHIBIT_DEFAULT_DEPS = "1"
43DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
44PROVIDES = "virtual/${TARGET_PREFIX}compilerlibs"
45
46BBCLASSEXTEND = "nativesdk"