summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-common.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-common.inc')
-rw-r--r--meta/recipes-devtools/gcc/gcc-common.inc46
1 files changed, 46 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-common.inc b/meta/recipes-devtools/gcc/gcc-common.inc
new file mode 100644
index 0000000000..1e9c65e662
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-common.inc
@@ -0,0 +1,46 @@
1DESCRIPTION = "The GNU cc and gcc C compilers."
2HOMEPAGE = "http://www.gnu.org/software/gcc/"
3SECTION = "devel"
4LICENSE = "GPL"
5
6NATIVEDEPS = ""
7
8inherit autotools gettext
9
10FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
11
12def get_gcc_fpu_setting(bb, d):
13 if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
14 return "--with-float=soft"
15 return ""
16
17def get_gcc_mips_plt_setting(bb, d):
18 if bb.data.getVar('TARGET_ARCH', d, 1) in [ 'mips', 'mipsel' ] and 'mplt' in bb.data.getVar('DISTRO_FEATURES',d,1).split() :
19 return "--with-mips-plt"
20 return ""
21
22# We really need HOST_SYS here for some packages and TARGET_SYS for others.
23# For now, libgcc is most important so we fix for that - RP.
24SHLIBSDIR = "${STAGING_DIR_TARGET}/shlibs"
25
26DEBIANNAME_libgcc = "libgcc1"
27
28MIRRORS_prepend () {
29${GNU_MIRROR}/gcc/releases/ ftp://gcc.gnu.org/pub/gcc/releases/
30${GNU_MIRROR}/gcc/ http://mirrors.rcn.net/pub/sourceware/gcc/releases/
31${GNU_MIRROR}/gcc/releases/ http://gcc.get-software.com/releases/
32${GNU_MIRROR}/gcc/ http://gcc.get-software.com/releases/
33}
34
35#
36# Set some default values
37#
38gcclibdir = "${libdir}/gcc"
39BINV = "${PV}"
40S = "${WORKDIR}/gcc-${PV}"
41B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
42
43target_includedir ?= "${includedir}"
44target_libdir ?= "${libdir}"
45target_base_libdir ?= "${base_libdir}"
46target_prefix ?= "${prefix}"