summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-package-cross.inc
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:14:24 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:29:45 +0100
commit29d6678fd546377459ef75cf54abeef5b969b5cf (patch)
tree8edd65790e37a00d01c3f203f773fe4b5012db18 /meta/recipes-devtools/gcc/gcc-package-cross.inc
parentda49de6885ee1bc424e70bc02f21f6ab920efb55 (diff)
downloadpoky-29d6678fd546377459ef75cf54abeef5b969b5cf.tar.gz
Major layout change to the packages directory
Having one monolithic packages directory makes it hard to find things and is generally overwhelming. This commit splits it into several logical sections roughly based on function, recipes.txt gives more information about the classifications used. The opportunity is also used to switch from "packages" to "recipes" as used in OpenEmbedded as the term "packages" can be confusing to people and has many different meanings. Not all recipes have been classified yet, this is just a first pass at separating things out. Some packages are moved to meta-extras as they're no longer actively used or maintained. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-package-cross.inc')
-rw-r--r--meta/recipes-devtools/gcc/gcc-package-cross.inc47
1 files changed, 47 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-package-cross.inc b/meta/recipes-devtools/gcc/gcc-package-cross.inc
new file mode 100644
index 0000000000..4f902fa149
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-package-cross.inc
@@ -0,0 +1,47 @@
1INHIBIT_PACKAGE_STRIP = "1"
2
3# Compute how to get from libexecdir to bindir in python (easier than shell)
4BINRELPATH = "${@oe.path.relative(bb.data.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}", d), bb.data.expand("${STAGING_DIR_NATIVE}${prefix_native}/bin/${MULTIMACH_TARGET_SYS}", d))}"
5
6do_install () {
7 oe_runmake 'DESTDIR=${D}' install-host
8
9 install -d ${D}${target_base_libdir}
10 install -d ${D}${target_libdir}
11
12 # Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77
13 # gfortran is fully backwards compatible. This is a safe and practical solution.
14 ln -sf ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}gfortran ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}g77 || true
15
16
17 # Insert symlinks into libexec so when tools without a prefix are searched for, the correct ones are
18 # found. These need to be relative paths so they work in different locations.
19 dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/
20 install -d $dest
21 for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do
22 ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t
23 done
24
25 # Remove things we don't need but keep share/java
26 for d in info man share/doc share/locale share/man share/info; do
27 rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/$d
28 done
29
30 # gcc-runtime installs libgcc into a special location in staging since it breaks doing a standalone build
31 if [ "${PN}" == "gcc-cross" -o "${PN}" == "gcc-crosssdk" ]; then
32 dest=${D}/${includedir}/gcc-build-internal-${MULTIMACH_TARGET_SYS}
33 oe_runmake "DESTDIR=$dest" libdir=${target_libdir} base_libdir=${target_base_libdir} prefix=${target_prefix} exec_prefix=${target_exec_prefix} install-target-libgcc
34
35 # Ideally here we'd override the libgcc Makefile's idea of slibdir but
36 # for now, we just move the files to the correct location
37
38 install -d $dest${target_base_libdir}
39 mv $dest${target_exec_prefix}/${TARGET_SYS}/lib*/* $dest${target_base_libdir}
40 rm -rf $dest${target_exec_prefix}/${TARGET_SYS}
41
42 # Also need to move gcc from /usr/lib/gcc/* to /usr/lib/ else the search paths won't find the crt*.o files
43
44 mv $dest${target_libdir}/gcc/* $dest${target_libdir}/
45 rmdir $dest${target_libdir}/gcc
46 fi
47}