diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-configure-sdk.inc | 47 | ||||
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-cross-canadian.inc | 127 | ||||
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-package-sdk.inc | 78 |
3 files changed, 125 insertions, 127 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-configure-sdk.inc b/meta/recipes-devtools/gcc/gcc-configure-sdk.inc deleted file mode 100644 index 6c55bc7e23..0000000000 --- a/meta/recipes-devtools/gcc/gcc-configure-sdk.inc +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | require gcc-configure-common.inc | ||
2 | |||
3 | EXTRA_OECONF_PATHS = "--with-gxx-include-dir=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}${target_includedir}/c++ \ | ||
4 | --with-build-time-tools=${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin \ | ||
5 | --with-sysroot=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS} \ | ||
6 | --with-build-sysroot=${STAGING_DIR_TARGET}" | ||
7 | |||
8 | # | ||
9 | # gcc-cross looks and finds these in ${exec_prefix} but we're not so lucky | ||
10 | # for the sdk. Hardcoding the paths ensures the build doesn't go canadian or worse. | ||
11 | # | ||
12 | export AR_FOR_TARGET = "${TARGET_PREFIX}ar" | ||
13 | export AS_FOR_TARGET = "${TARGET_PREFIX}as" | ||
14 | export DLLTOOL_FOR_TARGET = "${TARGET_PREFIX}dlltool" | ||
15 | export CC_FOR_TARGET = "${TARGET_PREFIX}gcc" | ||
16 | export CXX_FOR_TARGET = "${TARGET_PREFIX}g++" | ||
17 | export LD_FOR_TARGET = "${TARGET_PREFIX}ld" | ||
18 | export LIPO_FOR_TARGET = "${TARGET_PREFIX}lipo" | ||
19 | export NM_FOR_TARGET = "${TARGET_PREFIX}nm" | ||
20 | export OBJDUMP_FOR_TARGET = "${TARGET_PREFIX}objdump" | ||
21 | export RANLIB_FOR_TARGET = "${TARGET_PREFIX}ranlib" | ||
22 | export STRIP_FOR_TARGET = "${TARGET_PREFIX}strip" | ||
23 | export WINDRES_FOR_TARGET = "${TARGET_PREFIX}windres" | ||
24 | |||
25 | # | ||
26 | # We need to override this and make sure the compiler can find staging | ||
27 | # | ||
28 | export ARCH_FLAGS_FOR_TARGET = "--sysroot=${STAGING_DIR_TARGET}" | ||
29 | |||
30 | do_configure () { | ||
31 | export CC_FOR_BUILD="${BUILD_CC}" | ||
32 | export CXX_FOR_BUILD="${BUILD_CXX}" | ||
33 | export CFLAGS_FOR_BUILD="${BUILD_CFLAGS}" | ||
34 | export CPPFLAGS_FOR_BUILD="${BUILD_CPPFLAGS}" | ||
35 | export CXXFLAGS_FOR_BUILD="${BUILD_CXXFLAGS}" | ||
36 | export LDFLAGS_FOR_BUILD="${BUILD_LDFLAGS}" | ||
37 | export CFLAGS_FOR_TARGET="${TARGET_CFLAGS}" | ||
38 | export CPPFLAGS_FOR_TARGET="${TARGET_CPPFLAGS}" | ||
39 | export CXXFLAGS_FOR_TARGET="${TARGET_CXXFLAGS}" | ||
40 | export LDFLAGS_FOR_TARGET="${TARGET_LDFLAGS}" | ||
41 | (cd ${S} && gnu-configize) || die "failure running gnu-configize" | ||
42 | oe_runconf | ||
43 | } | ||
44 | |||
45 | do_compile () { | ||
46 | oe_runmake all-host | ||
47 | } | ||
diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc index 85c3166424..5908e72099 100644 --- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc +++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc | |||
@@ -8,8 +8,131 @@ DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${HOST_PREFIX}binutils-crosssdk v | |||
8 | 8 | ||
9 | GCCMULTILIB = "--enable-multilib" | 9 | GCCMULTILIB = "--enable-multilib" |
10 | 10 | ||
11 | require gcc-configure-sdk.inc | 11 | require gcc-configure-common.inc |
12 | require gcc-package-sdk.inc | 12 | |
13 | EXTRA_OECONF_PATHS = "--with-gxx-include-dir=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}${target_includedir}/c++ \ | ||
14 | --with-build-time-tools=${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin \ | ||
15 | --with-sysroot=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS} \ | ||
16 | --with-build-sysroot=${STAGING_DIR_TARGET}" | ||
17 | |||
18 | # | ||
19 | # gcc-cross looks and finds these in ${exec_prefix} but we're not so lucky | ||
20 | # for the sdk. Hardcoding the paths ensures the build doesn't go canadian or worse. | ||
21 | # | ||
22 | export AR_FOR_TARGET = "${TARGET_PREFIX}ar" | ||
23 | export AS_FOR_TARGET = "${TARGET_PREFIX}as" | ||
24 | export DLLTOOL_FOR_TARGET = "${TARGET_PREFIX}dlltool" | ||
25 | export CC_FOR_TARGET = "${TARGET_PREFIX}gcc" | ||
26 | export CXX_FOR_TARGET = "${TARGET_PREFIX}g++" | ||
27 | export LD_FOR_TARGET = "${TARGET_PREFIX}ld" | ||
28 | export LIPO_FOR_TARGET = "${TARGET_PREFIX}lipo" | ||
29 | export NM_FOR_TARGET = "${TARGET_PREFIX}nm" | ||
30 | export OBJDUMP_FOR_TARGET = "${TARGET_PREFIX}objdump" | ||
31 | export RANLIB_FOR_TARGET = "${TARGET_PREFIX}ranlib" | ||
32 | export STRIP_FOR_TARGET = "${TARGET_PREFIX}strip" | ||
33 | export WINDRES_FOR_TARGET = "${TARGET_PREFIX}windres" | ||
34 | |||
35 | # | ||
36 | # We need to override this and make sure the compiler can find staging | ||
37 | # | ||
38 | export ARCH_FLAGS_FOR_TARGET = "--sysroot=${STAGING_DIR_TARGET}" | ||
39 | |||
40 | do_configure () { | ||
41 | export CC_FOR_BUILD="${BUILD_CC}" | ||
42 | export CXX_FOR_BUILD="${BUILD_CXX}" | ||
43 | export CFLAGS_FOR_BUILD="${BUILD_CFLAGS}" | ||
44 | export CPPFLAGS_FOR_BUILD="${BUILD_CPPFLAGS}" | ||
45 | export CXXFLAGS_FOR_BUILD="${BUILD_CXXFLAGS}" | ||
46 | export LDFLAGS_FOR_BUILD="${BUILD_LDFLAGS}" | ||
47 | export CFLAGS_FOR_TARGET="${TARGET_CFLAGS}" | ||
48 | export CPPFLAGS_FOR_TARGET="${TARGET_CPPFLAGS}" | ||
49 | export CXXFLAGS_FOR_TARGET="${TARGET_CXXFLAGS}" | ||
50 | export LDFLAGS_FOR_TARGET="${TARGET_LDFLAGS}" | ||
51 | (cd ${S} && gnu-configize) || die "failure running gnu-configize" | ||
52 | oe_runconf | ||
53 | } | ||
54 | |||
55 | do_compile () { | ||
56 | oe_runmake all-host | ||
57 | } | ||
58 | |||
59 | INHIBIT_PACKAGE_STRIP = "1" | ||
60 | |||
61 | # Having anything auto depending on gcc-cross-sdk is a really bad idea... | ||
62 | EXCLUDE_FROM_SHLIBS = "1" | ||
63 | |||
64 | PACKAGES = "${PN} ${PN}-doc" | ||
65 | |||
66 | FILES_${PN} = "\ | ||
67 | ${bindir}/* \ | ||
68 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/* \ | ||
69 | ${gcclibdir}/${TARGET_SYS}/${BINV}/*.o \ | ||
70 | ${gcclibdir}/${TARGET_SYS}/${BINV}/specs \ | ||
71 | ${gcclibdir}/${TARGET_SYS}/${BINV}/lib* \ | ||
72 | ${gcclibdir}/${TARGET_SYS}/${BINV}/include \ | ||
73 | ${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed \ | ||
74 | ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin/include/ \ | ||
75 | ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin/gtype.* \ | ||
76 | ${includedir}/c++/${BINV} \ | ||
77 | ${prefix}/${TARGET_SYS}/bin/* \ | ||
78 | ${prefix}/${TARGET_SYS}/lib/* \ | ||
79 | ${prefix}/${TARGET_SYS}/usr/include/* \ | ||
80 | " | ||
81 | INSANE_SKIP_${PN} += "dev-so" | ||
82 | |||
83 | FILES_${PN}-doc = "\ | ||
84 | ${infodir} \ | ||
85 | ${mandir} \ | ||
86 | ${gcclibdir}/${TARGET_SYS}/${BINV}/include/README \ | ||
87 | " | ||
88 | |||
89 | EXEEXT = "" | ||
90 | |||
91 | # Compute how to get from libexecdir to bindir in python (easier than shell) | ||
92 | BINRELPATH = "${@oe.path.relative(d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"), d.expand("${bindir}"))}" | ||
93 | |||
94 | do_install () { | ||
95 | oe_runmake 'DESTDIR=${D}' install-host | ||
96 | |||
97 | # Cleanup some of the ${libdir}{,exec}/gcc stuff ... | ||
98 | rm -r ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/install-tools | ||
99 | rm -r ${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/install-tools | ||
100 | |||
101 | # We care about g++ not c++ | ||
102 | rm -f ${D}${bindir}/*c++ | ||
103 | |||
104 | # We don't care about the gcc-<version> copies | ||
105 | rm -f ${D}${bindir}/*gcc-?.?* | ||
106 | |||
107 | # We use libiberty from binutils | ||
108 | rm -f ${D}${prefix}/${TARGET_SYS}/lib/libiberty.a | ||
109 | # Not sure where the strange paths come from | ||
110 | rm -f ${D}${libdir}/../lib/libiberty.a | ||
111 | rm -f ${D}${libdir}/libiberty.a | ||
112 | |||
113 | # Cleanup empty directories which are not shipped | ||
114 | # we use rmdir instead of 'rm -f' to ensure the non empty directories are not deleted | ||
115 | # ${D}${libdir}/../lib only seems to appear with SDKMACHINE=i686 | ||
116 | local empty_dirs="${D}${libdir}/../lib ${D}${prefix}/${TARGET_SYS}/lib ${D}${prefix}/${TARGET_SYS} ${D}${includedir}" | ||
117 | for i in $empty_dirs; do | ||
118 | [ -d $i ] && rmdir --ignore-fail-on-non-empty $i | ||
119 | done | ||
120 | |||
121 | # Insert symlinks into libexec so when tools without a prefix are searched for, the correct ones are | ||
122 | # found. | ||
123 | dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/ | ||
124 | install -d $dest | ||
125 | suffix=${EXEEXT} | ||
126 | for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do | ||
127 | if [ "$t" = "g77" -o "$t" = "gfortran" ] && [ ! -e ${D}${bindir}/${TARGET_PREFIX}$t$suffix ]; then | ||
128 | continue | ||
129 | fi | ||
130 | |||
131 | ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t$suffix $dest$t$suffix | ||
132 | done | ||
133 | |||
134 | chown -R root:root ${D} | ||
135 | } | ||
13 | 136 | ||
14 | ELFUTILS = "nativesdk-elfutils" | 137 | ELFUTILS = "nativesdk-elfutils" |
15 | DEPENDS += "nativesdk-gmp nativesdk-mpfr nativesdk-libmpc ${ELFUTILS} nativesdk-zlib" | 138 | DEPENDS += "nativesdk-gmp nativesdk-mpfr nativesdk-libmpc ${ELFUTILS} nativesdk-zlib" |
diff --git a/meta/recipes-devtools/gcc/gcc-package-sdk.inc b/meta/recipes-devtools/gcc/gcc-package-sdk.inc deleted file mode 100644 index 21beccc4d7..0000000000 --- a/meta/recipes-devtools/gcc/gcc-package-sdk.inc +++ /dev/null | |||
@@ -1,78 +0,0 @@ | |||
1 | INHIBIT_PACKAGE_STRIP = "1" | ||
2 | |||
3 | # Having anything auto depending on gcc-cross-sdk is a really bad idea... | ||
4 | EXCLUDE_FROM_SHLIBS = "1" | ||
5 | |||
6 | PACKAGES = "${PN} ${PN}-doc" | ||
7 | |||
8 | FILES_${PN} = "\ | ||
9 | ${bindir}/* \ | ||
10 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/* \ | ||
11 | ${gcclibdir}/${TARGET_SYS}/${BINV}/*.o \ | ||
12 | ${gcclibdir}/${TARGET_SYS}/${BINV}/specs \ | ||
13 | ${gcclibdir}/${TARGET_SYS}/${BINV}/lib* \ | ||
14 | ${gcclibdir}/${TARGET_SYS}/${BINV}/include \ | ||
15 | ${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed \ | ||
16 | ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin/include/ \ | ||
17 | ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin/gtype.* \ | ||
18 | ${includedir}/c++/${BINV} \ | ||
19 | ${prefix}/${TARGET_SYS}/bin/* \ | ||
20 | ${prefix}/${TARGET_SYS}/lib/* \ | ||
21 | ${prefix}/${TARGET_SYS}/usr/include/* \ | ||
22 | " | ||
23 | INSANE_SKIP_${PN} += "dev-so" | ||
24 | |||
25 | FILES_${PN}-doc = "\ | ||
26 | ${infodir} \ | ||
27 | ${mandir} \ | ||
28 | ${gcclibdir}/${TARGET_SYS}/${BINV}/include/README \ | ||
29 | " | ||
30 | |||
31 | EXEEXT = "" | ||
32 | |||
33 | # Compute how to get from libexecdir to bindir in python (easier than shell) | ||
34 | BINRELPATH = "${@oe.path.relative(d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"), d.expand("${bindir}"))}" | ||
35 | |||
36 | do_install () { | ||
37 | oe_runmake 'DESTDIR=${D}' install-host | ||
38 | |||
39 | # Cleanup some of the ${libdir}{,exec}/gcc stuff ... | ||
40 | rm -r ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/install-tools | ||
41 | rm -r ${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/install-tools | ||
42 | |||
43 | # We care about g++ not c++ | ||
44 | rm -f ${D}${bindir}/*c++ | ||
45 | |||
46 | # We don't care about the gcc-<version> copies | ||
47 | rm -f ${D}${bindir}/*gcc-?.?* | ||
48 | |||
49 | # We use libiberty from binutils | ||
50 | rm -f ${D}${prefix}/${TARGET_SYS}/lib/libiberty.a | ||
51 | # Not sure where the strange paths come from | ||
52 | rm -f ${D}${libdir}/../lib/libiberty.a | ||
53 | rm -f ${D}${libdir}/libiberty.a | ||
54 | |||
55 | # Cleanup empty directories which are not shipped | ||
56 | # we use rmdir instead of 'rm -f' to ensure the non empty directories are not deleted | ||
57 | # ${D}${libdir}/../lib only seems to appear with SDKMACHINE=i686 | ||
58 | local empty_dirs="${D}${libdir}/../lib ${D}${prefix}/${TARGET_SYS}/lib ${D}${prefix}/${TARGET_SYS} ${D}${includedir}" | ||
59 | for i in $empty_dirs; do | ||
60 | [ -d $i ] && rmdir --ignore-fail-on-non-empty $i | ||
61 | done | ||
62 | |||
63 | # Insert symlinks into libexec so when tools without a prefix are searched for, the correct ones are | ||
64 | # found. | ||
65 | dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/ | ||
66 | install -d $dest | ||
67 | suffix=${EXEEXT} | ||
68 | for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do | ||
69 | if [ "$t" = "g77" -o "$t" = "gfortran" ] && [ ! -e ${D}${bindir}/${TARGET_PREFIX}$t$suffix ]; then | ||
70 | continue | ||
71 | fi | ||
72 | |||
73 | ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t$suffix $dest$t$suffix | ||
74 | done | ||
75 | |||
76 | chown -R root:root ${D} | ||
77 | } | ||
78 | |||