summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-08-22 09:52:53 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-08-23 16:20:13 +0100
commit8b855ad32d92f574e5781b89a7653009181cf3da (patch)
treea37c5d69c4835797c1b56437b9f4ac6fdd380fe8 /meta/recipes-devtools
parentaa77ec7eef910635a5882aa83bbd96f13676d8d0 (diff)
downloadpoky-8b855ad32d92f574e5781b89a7653009181cf3da.tar.gz
gcc-cross-canadian: Fold configure-sdk and package-sdk into the main .inc
This also has the advantage of removing the confusing sdk naming which has been purged everywhere else in favour of cross-canadian. (From OE-Core rev: cbb63ca9e7e6d397198808e862f812f1012c74a7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/gcc/gcc-configure-sdk.inc47
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross-canadian.inc127
-rw-r--r--meta/recipes-devtools/gcc/gcc-package-sdk.inc78
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 @@
1require gcc-configure-common.inc
2
3EXTRA_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#
12export AR_FOR_TARGET = "${TARGET_PREFIX}ar"
13export AS_FOR_TARGET = "${TARGET_PREFIX}as"
14export DLLTOOL_FOR_TARGET = "${TARGET_PREFIX}dlltool"
15export CC_FOR_TARGET = "${TARGET_PREFIX}gcc"
16export CXX_FOR_TARGET = "${TARGET_PREFIX}g++"
17export LD_FOR_TARGET = "${TARGET_PREFIX}ld"
18export LIPO_FOR_TARGET = "${TARGET_PREFIX}lipo"
19export NM_FOR_TARGET = "${TARGET_PREFIX}nm"
20export OBJDUMP_FOR_TARGET = "${TARGET_PREFIX}objdump"
21export RANLIB_FOR_TARGET = "${TARGET_PREFIX}ranlib"
22export STRIP_FOR_TARGET = "${TARGET_PREFIX}strip"
23export WINDRES_FOR_TARGET = "${TARGET_PREFIX}windres"
24
25#
26# We need to override this and make sure the compiler can find staging
27#
28export ARCH_FLAGS_FOR_TARGET = "--sysroot=${STAGING_DIR_TARGET}"
29
30do_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
45do_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
9GCCMULTILIB = "--enable-multilib" 9GCCMULTILIB = "--enable-multilib"
10 10
11require gcc-configure-sdk.inc 11require gcc-configure-common.inc
12require gcc-package-sdk.inc 12
13EXTRA_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#
22export AR_FOR_TARGET = "${TARGET_PREFIX}ar"
23export AS_FOR_TARGET = "${TARGET_PREFIX}as"
24export DLLTOOL_FOR_TARGET = "${TARGET_PREFIX}dlltool"
25export CC_FOR_TARGET = "${TARGET_PREFIX}gcc"
26export CXX_FOR_TARGET = "${TARGET_PREFIX}g++"
27export LD_FOR_TARGET = "${TARGET_PREFIX}ld"
28export LIPO_FOR_TARGET = "${TARGET_PREFIX}lipo"
29export NM_FOR_TARGET = "${TARGET_PREFIX}nm"
30export OBJDUMP_FOR_TARGET = "${TARGET_PREFIX}objdump"
31export RANLIB_FOR_TARGET = "${TARGET_PREFIX}ranlib"
32export STRIP_FOR_TARGET = "${TARGET_PREFIX}strip"
33export WINDRES_FOR_TARGET = "${TARGET_PREFIX}windres"
34
35#
36# We need to override this and make sure the compiler can find staging
37#
38export ARCH_FLAGS_FOR_TARGET = "--sysroot=${STAGING_DIR_TARGET}"
39
40do_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
55do_compile () {
56 oe_runmake all-host
57}
58
59INHIBIT_PACKAGE_STRIP = "1"
60
61# Having anything auto depending on gcc-cross-sdk is a really bad idea...
62EXCLUDE_FROM_SHLIBS = "1"
63
64PACKAGES = "${PN} ${PN}-doc"
65
66FILES_${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 "
81INSANE_SKIP_${PN} += "dev-so"
82
83FILES_${PN}-doc = "\
84 ${infodir} \
85 ${mandir} \
86 ${gcclibdir}/${TARGET_SYS}/${BINV}/include/README \
87 "
88
89EXEEXT = ""
90
91# Compute how to get from libexecdir to bindir in python (easier than shell)
92BINRELPATH = "${@oe.path.relative(d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"), d.expand("${bindir}"))}"
93
94do_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
14ELFUTILS = "nativesdk-elfutils" 137ELFUTILS = "nativesdk-elfutils"
15DEPENDS += "nativesdk-gmp nativesdk-mpfr nativesdk-libmpc ${ELFUTILS} nativesdk-zlib" 138DEPENDS += "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 @@
1INHIBIT_PACKAGE_STRIP = "1"
2
3# Having anything auto depending on gcc-cross-sdk is a really bad idea...
4EXCLUDE_FROM_SHLIBS = "1"
5
6PACKAGES = "${PN} ${PN}-doc"
7
8FILES_${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 "
23INSANE_SKIP_${PN} += "dev-so"
24
25FILES_${PN}-doc = "\
26 ${infodir} \
27 ${mandir} \
28 ${gcclibdir}/${TARGET_SYS}/${BINV}/include/README \
29 "
30
31EXEEXT = ""
32
33# Compute how to get from libexecdir to bindir in python (easier than shell)
34BINRELPATH = "${@oe.path.relative(d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"), d.expand("${bindir}"))}"
35
36do_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