linux-omap 2.6.39: sync with meta-texasinstruments
[openembedded.git] / recipes / gcc / gcc-common.inc
blobd32b2ba002ac3deaaa76a2b0c3803f20df90f90d
1 DESCRIPTION = "The GNU cc and gcc C compilers."
2 HOMEPAGE = "http://www.gnu.org/software/gcc/"
3 SECTION = "devel"
4 LICENSE = "GPL"
6 NATIVEDEPS = ""
8 inherit autotools gettext
10 FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
12 COMPATIBLE_TARGET_SYS ?= "(?!nios2)"
14 # When making a Canadian SDK, we use these files too to make the compiler
15 # for building for the new host part.  So only obey TARGET_FPU for the
16 # real target.
17 def get_gcc_fpu_setting(bb, d):
18     if bb.data.getVar('TARGET_FPU', d, True) in [ 'soft', 'hard'] and bb.data.getVar('TARGET_OS', d, True).find('linux') >= 0 :
19         # ARM_FP_ABI could be either 'hardfp' or 'softfp'
20         arm_fpabi = bb.data.getVar('ARM_FP_ABI', d, True) or ""
21         if arm_fpabi != "":
22             if arm_fpabi  == "hardfp":
23                 # reset it to whatever gcc --with-float configure expects which is either 'softfp' or 'hard'
24                 arm_fpabi = "hard"
25             return "--with-float=" + arm_fpabi
26         else:
27             return "--with-float=" + bb.data.getVar('TARGET_FPU', d, True)
28     return ""
30 def get_gcc_mips_plt_setting(bb, d):
31     if bb.data.getVar('TARGET_ARCH', d, 1) in [ 'mips', 'mipsel' ] and 'mplt' in bb.data.getVar('DISTRO_FEATURES',d,1).split() :
32         return "--with-mips-plt"
33     return ""
35 # We really need HOST_SYS here for some packages and TARGET_SYS for others.
36 # For now, libgcc is most important so we fix for that - RP.
37 SHLIBSDIR = "${STAGING_DIR_TARGET}/shlibs"
39 DEBIANNAME_libgcc = "libgcc1"
41 MIRRORS_prepend () {
42 ${GNU_MIRROR}/gcc/releases/    ftp://gcc.gnu.org/pub/gcc/releases/
43 ${GNU_MIRROR}/gcc/      http://mirrors.rcn.net/pub/sourceware/gcc/releases/
44 ${GNU_MIRROR}/gcc/releases/    http://gcc.get-software.com/releases/
45 ${GNU_MIRROR}/gcc/      http://gcc.get-software.com/releases/
49 # Set some default values
51 gcclibdir = "${libdir}/gcc"
52 BINV = "${PV}"
53 S = "${WORKDIR}/gcc-${PV}"
54 B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
56 # Work around issues with pstage package install order and intermediate steps
57 # in the toolchain build.
58 do_setscene[deptask] = "do_setscene"