summaryrefslogtreecommitdiffstats
path: root/meta/packages/gcc/gcc4-build.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/gcc/gcc4-build.inc')
-rw-r--r--meta/packages/gcc/gcc4-build.inc97
1 files changed, 3 insertions, 94 deletions
diff --git a/meta/packages/gcc/gcc4-build.inc b/meta/packages/gcc/gcc4-build.inc
index 817d8b5e73..b8a214a590 100644
--- a/meta/packages/gcc/gcc4-build.inc
+++ b/meta/packages/gcc/gcc4-build.inc
@@ -1,97 +1,6 @@
1HAS_GFORTRAN = "no" 1FORTRAN = ",f95"
2HAS_GFORTRAN ?= "yes"
2HAS_G2C = "no" 3HAS_G2C = "no"
3 4
4MIRRORS_prepend () { 5include gcc3-build.inc
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
61require gcc-fpu.inc
62
63python __anonymous () {
64 import bb, re
65 if (re.match('linux-uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None):
66 bb.data.setVar('EXTRA_OECONF_DEP', '${EXTRA_OECONF_uclibc}', d)
67 elif (re.match('linux$', bb.data.getVar('TARGET_OS', d, 1)) != None):
68 bb.data.setVar('EXTRA_OECONF_DEP', '${EXTRA_OECONF_glibc}', d)
69}
70
71do_configure () {
72 # Setup these vars for cross building only
73 # ... because foo_FOR_TARGET apparently gets misinterpreted inside the
74 # gcc build stuff when the build is producing a cross compiler - i.e.
75 # when the 'current' target is the 'host' system, and the host is not
76 # the target (because the build is actually making a cross compiler!)
77 if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
78 export CC_FOR_TARGET="${CC}"
79 export GCC_FOR_TARGET="${CC}"
80 export CXX_FOR_TARGET="${CXX}"
81 export AS_FOR_TARGET="${HOST_PREFIX}as"
82 export LD_FOR_TARGET="${HOST_PREFIX}ld"
83 export NM_FOR_TARGET="${HOST_PREFIX}nm"
84 export AR_FOR_TARGET="${HOST_PREFIX}ar"
85 export RANLIB_FOR_TARGET="${HOST_PREFIX}ranlib"
86 fi
87 export CC_FOR_BUILD="${BUILD_CC}"
88 export CXX_FOR_BUILD="${BUILD_CXX}"
89 export CFLAGS_FOR_BUILD="${BUILD_CFLAGS}"
90 export CPPFLAGS_FOR_BUILD="${BUILD_CPPFLAGS}"
91 export CXXFLAGS_FOR_BUILD="${BUILD_CXXFLAGS}"
92 export LDFLAGS_FOR_BUILD="${BUILD_LDFLAGS}"
93 export ARCH_FLAGS_FOR_TARGET="${ARCH_FLAGS_FOR_TARGET}"
94 (cd ${S} && gnu-configize) || die "failure running gnu-configize"
95 oe_runconf
96}
97 6