summaryrefslogtreecommitdiffstats
path: root/meta/packages/gcc/gcc4-build.inc
diff options
context:
space:
mode:
authorTomas Frydrych <tf@openedhand.com>2006-09-06 15:12:59 +0000
committerTomas Frydrych <tf@openedhand.com>2006-09-06 15:12:59 +0000
commite9b762802b039e8c19e70b054ecc64e7ab07e4d8 (patch)
treeb912494b2fc2845d4f9a67694b4120b2f585ed00 /meta/packages/gcc/gcc4-build.inc
parent8f47d85143c108040aa921b32aa9974b8edb0ba1 (diff)
downloadpoky-e9b762802b039e8c19e70b054ecc64e7ab07e4d8.tar.gz
configuration for csl2006q1-6 compiler and binutils
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@697 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/gcc/gcc4-build.inc')
-rw-r--r--meta/packages/gcc/gcc4-build.inc100
1 files changed, 97 insertions, 3 deletions
diff --git a/meta/packages/gcc/gcc4-build.inc b/meta/packages/gcc/gcc4-build.inc
index 8b80f4820a..0f86ff2a31 100644
--- a/meta/packages/gcc/gcc4-build.inc
+++ b/meta/packages/gcc/gcc4-build.inc
@@ -1,6 +1,100 @@
1FORTRAN = "f95" 1HAS_GFORTRAN = "no"
2HAS_GFORTRAN = "yes"
3HAS_G2C = "no" 2HAS_G2C = "no"
4 3
5include gcc3-build.inc 4MIRRORS_prepend () {
5${GNU_MIRROR}/gcc/releases/ ftp://gcc.gnu.org/pub/gcc/releases/
6${GNU_MIRROR}/gcc/ http://mirrors.rcn.net/pub/sourceware/gcc/releases/
7${GNU_MIRROR}/gcc/releases/ http://gcc.get-software.com/releases/
8${GNU_MIRROR}/gcc/ http://gcc.get-software.com/releases/
9}
10
11gcclibdir ?= "${libdir}/gcc"
12S = "${WORKDIR}/gcc-${PV}"
13B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
14BINV ?= "${PV}"
15
16# gcj doesn't work on some architectures
17JAVA = ",java"
18JAVA_arm = ""
19JAVA_armeb = ""
20JAVA_mipsel = ""
21JAVA_sh3 = ""
22# gcc4-build sets this to f95
23#FORTRAN ?= "f77"
24#LANGUAGES ?= "c,c++,${JAVA}"
25LANGUAGES ?= "c,c++,${JAVA}"
26
27EXTRA_OECONF = "${@['--enable-clocale=generic', ''][bb.data.getVar('USE_NLS', d, 1) != 'no']} \
28 --with-gnu-ld \
29 --enable-shared \
30 --enable-target-optspace \
31 --enable-languages=${LANGUAGES} \
32 --enable-threads=posix \
33 --enable-multilib \
34 --enable-c99 \
35 --enable-long-long \
36 --enable-symvers=gnu \
37 --enable-libstdcxx-pch \
38 --program-prefix=${TARGET_PREFIX} \
39 ${EXTRA_OECONF_PATHS} \
40 ${EXTRA_OECONF_DEP}"
41
42EXTRA_OECONF_PATHS = " \
43 --with-local-prefix=${prefix}/local \
44 --with-gxx-include-dir=${includedir}/c++/${BINV}"
45
46EXTRA_OECONF_DEP = ""
47EXTRA_OECONF_uclibc = "--disable-__cxa_atexit"
48EXTRA_OECONF_glibc = "--enable-__cxa_atexit"
49EXTRA_OECONF += "${@get_gcc_fpu_setting(bb, d)}"
50CPPFLAGS = ""
51
52# Used by configure to define additional values for FLAGS_FOR_TARGET -
53# passed to all the compilers.
54ARCH_FLAGS_FOR_TARGET = ""
55#NOTE: not tested on other platforms, the following is probably correct
56# everywhere!
57ARCH_FLAGS_FOR_TARGET_slugos = "${TARGET_CC_ARCH}"
58ARCH_FLAGS_FOR_TARGET_unslung = "${TARGET_CC_ARCH}"
59EXTRA_OEMAKE += "ARCH_FLAGS_FOR_TARGET='${ARCH_FLAGS_FOR_TARGET}'"
60
61def get_gcc_fpu_setting(bb, d):
62 if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
63 return "--with-float=soft"
64 return ""
65
66python __anonymous () {
67 import bb, re
68 if (re.match('linux-uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None):
69 bb.data.setVar('EXTRA_OECONF_DEP', '${EXTRA_OECONF_uclibc}', d)
70 elif (re.match('linux$', bb.data.getVar('TARGET_OS', d, 1)) != None):
71 bb.data.setVar('EXTRA_OECONF_DEP', '${EXTRA_OECONF_glibc}', d)
72}
73
74do_configure () {
75 # Setup these vars for cross building only
76 # ... because foo_FOR_TARGET apparently gets misinterpreted inside the
77 # gcc build stuff when the build is producing a cross compiler - i.e.
78 # when the 'current' target is the 'host' system, and the host is not
79 # the target (because the build is actually making a cross compiler!)
80 if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
81 export CC_FOR_TARGET="${CC}"
82 export GCC_FOR_TARGET="${CC}"
83 export CXX_FOR_TARGET="${CXX}"
84 export AS_FOR_TARGET="${HOST_PREFIX}as"
85 export LD_FOR_TARGET="${HOST_PREFIX}ld"
86 export NM_FOR_TARGET="${HOST_PREFIX}nm"
87 export AR_FOR_TARGET="${HOST_PREFIX}ar"
88 export RANLIB_FOR_TARGET="${HOST_PREFIX}ranlib"
89 fi
90 export CC_FOR_BUILD="${BUILD_CC}"
91 export CXX_FOR_BUILD="${BUILD_CXX}"
92 export CFLAGS_FOR_BUILD="${BUILD_CFLAGS}"
93 export CPPFLAGS_FOR_BUILD="${BUILD_CPPFLAGS}"
94 export CXXFLAGS_FOR_BUILD="${BUILD_CXXFLAGS}"
95 export LDFLAGS_FOR_BUILD="${BUILD_LDFLAGS}"
96 export ARCH_FLAGS_FOR_TARGET="${ARCH_FLAGS_FOR_TARGET}"
97 (cd ${S} && gnu-configize) || die "failure running gnu-configize"
98 oe_runconf
99}
6 100