diff options
Diffstat (limited to 'recipes-devtools/gcc/gcc-configure-common.inc')
-rw-r--r-- | recipes-devtools/gcc/gcc-configure-common.inc | 112 |
1 files changed, 0 insertions, 112 deletions
diff --git a/recipes-devtools/gcc/gcc-configure-common.inc b/recipes-devtools/gcc/gcc-configure-common.inc deleted file mode 100644 index 43937778f1..0000000000 --- a/recipes-devtools/gcc/gcc-configure-common.inc +++ /dev/null | |||
@@ -1,112 +0,0 @@ | |||
1 | # | ||
2 | # Build the list of lanaguages to build. | ||
3 | # | ||
4 | # These can be overridden by the version specific .inc file. | ||
5 | |||
6 | # Java (gcj doesn't work on all architectures) | ||
7 | JAVA ?= ",java" | ||
8 | JAVA_arm ?= "" | ||
9 | JAVA_armeb ?= "" | ||
10 | JAVA_mipsel ?= "" | ||
11 | JAVA_sh3 ?= "" | ||
12 | # gcc 3.x expects 'f77', 4.0 expects 'f95', 4.1 and 4.2 expect 'fortran' | ||
13 | FORTRAN ?= ",f77" | ||
14 | LANGUAGES ?= "c,c++${FORTRAN}${JAVA}" | ||
15 | # disable --enable-target-optspace for powerpc SPE | ||
16 | # at -Os libgcc.so.1 creates references into | ||
17 | # hidden symbols in libgcc.a which linker complains | ||
18 | # when linking shared libraries further in the build like (gnutls) | ||
19 | |||
20 | SPECIAL_ARCH_LIST = "powerpc" | ||
21 | OPTSPACE = ${@base_contains("SPECIAL_ARCH_LIST", "${TARGET_ARCH}", "", "--enable-target-optspace",d)} | ||
22 | |||
23 | EXTRA_OECONF_BASE ?= "" | ||
24 | EXTRA_OECONF_PATHS ?= "" | ||
25 | EXTRA_OECONF_INITIAL ?= "" | ||
26 | EXTRA_OECONF_INTERMEDIATE ?= "" | ||
27 | |||
28 | GCCMULTILIB = "--disable-multilib" | ||
29 | |||
30 | EXTRA_OECONF = "${@['--enable-clocale=generic', ''][bb.data.getVar('USE_NLS', d, 1) != 'no']} \ | ||
31 | --with-gnu-ld \ | ||
32 | --enable-shared \ | ||
33 | --enable-languages=${LANGUAGES} \ | ||
34 | --enable-threads=posix \ | ||
35 | ${GCCMULTILIB} \ | ||
36 | --enable-c99 \ | ||
37 | --enable-long-long \ | ||
38 | --enable-symvers=gnu \ | ||
39 | --enable-libstdcxx-pch \ | ||
40 | --program-prefix=${TARGET_PREFIX} \ | ||
41 | ${OPTSPACE} \ | ||
42 | ${EXTRA_OECONF_BASE} \ | ||
43 | ${EXTRA_OECONF_FPU} \ | ||
44 | ${EXTRA_OECONF_PATHS} \ | ||
45 | ${@get_gcc_mips_plt_setting(bb, d)}" | ||
46 | |||
47 | # Build uclibc compilers without cxa_atexit support | ||
48 | EXTRA_OECONF_append_linux = " --enable-__cxa_atexit" | ||
49 | EXTRA_OECONF_append_linux-gnueabi = " --enable-__cxa_atexit" | ||
50 | EXTRA_OECONF_append_linux-uclibc = " --disable-__cxa_atexit" | ||
51 | EXTRA_OECONF_append_linux-uclibcgnueabi = " --disable-__cxa_atexit" | ||
52 | EXTRA_OECONF_FPU = "${@get_gcc_fpu_setting(bb, d)}" | ||
53 | CPPFLAGS = "" | ||
54 | |||
55 | # Used by configure to define additional values for FLAGS_FOR_TARGET - | ||
56 | # passed to all the compilers. | ||
57 | ARCH_FLAGS_FOR_TARGET = "${TARGET_CC_ARCH}" | ||
58 | EXTRA_OEMAKE += "ARCH_FLAGS_FOR_TARGET='${ARCH_FLAGS_FOR_TARGET}'" | ||
59 | |||
60 | SYSTEMHEADERS = "${target_includedir}" | ||
61 | SYSTEMLIBS = "${target_base_libdir}/" | ||
62 | SYSTEMLIBS1 = "${target_libdir}/" | ||
63 | |||
64 | do_configure () { | ||
65 | # Setup these vars for cross building only | ||
66 | # ... because foo_FOR_TARGET apparently gets misinterpreted inside the | ||
67 | # gcc build stuff when the build is producing a cross compiler - i.e. | ||
68 | # when the 'current' target is the 'host' system, and the host is not | ||
69 | # the target (because the build is actually making a cross compiler!) | ||
70 | if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then | ||
71 | export CC_FOR_TARGET="${CC}" | ||
72 | export GCC_FOR_TARGET="${CC}" | ||
73 | export CXX_FOR_TARGET="${CXX}" | ||
74 | export AS_FOR_TARGET="${HOST_PREFIX}as" | ||
75 | export LD_FOR_TARGET="${HOST_PREFIX}ld" | ||
76 | export NM_FOR_TARGET="${HOST_PREFIX}nm" | ||
77 | export AR_FOR_TARGET="${HOST_PREFIX}ar" | ||
78 | export GFORTRAN_FOR_TARGET="gfortran" | ||
79 | export RANLIB_FOR_TARGET="${HOST_PREFIX}ranlib" | ||
80 | fi | ||
81 | export CC_FOR_BUILD="${BUILD_CC}" | ||
82 | export CXX_FOR_BUILD="${BUILD_CXX}" | ||
83 | export CFLAGS_FOR_BUILD="${BUILD_CFLAGS}" | ||
84 | export CPPFLAGS_FOR_BUILD="${BUILD_CPPFLAGS}" | ||
85 | export CXXFLAGS_FOR_BUILD="${BUILD_CXXFLAGS}" | ||
86 | export LDFLAGS_FOR_BUILD="${BUILD_LDFLAGS}" | ||
87 | export ARCH_FLAGS_FOR_TARGET="${ARCH_FLAGS_FOR_TARGET}" | ||
88 | (cd ${S} && gnu-configize) || die "failure running gnu-configize" | ||
89 | |||
90 | # teach gcc to find correct target includedir when checking libc ssp support | ||
91 | sed -i 's:^\([ ]*\)glibc_header_dir=\"${with_build_sysroot}/usr/include\":\1glibc_header_dir=\"${with_build_sysroot}${SYSTEMHEADERS}\":g' ${S}/gcc/configure.ac | ||
92 | sed -i 's:^\([ ]*\)glibc_header_dir=\"${with_build_sysroot}/usr/include\":\1glibc_header_dir=\"${with_build_sysroot}${SYSTEMHEADERS}\":g' ${S}/gcc/configure | ||
93 | |||
94 | # splice our idea of where the headers live into gcc's world | ||
95 | echo "NATIVE_SYSTEM_HEADER_DIR = ${SYSTEMHEADERS}" > ${T}/t-oe | ||
96 | sed 's%^tmake_file=.*$%& ${T}/t-oe%' < ${S}/gcc/Makefile.in >${S}/gcc/Makefile.in.new | ||
97 | mv ${S}/gcc/Makefile.in.new ${S}/gcc/Makefile.in | ||
98 | cat ${S}/gcc/defaults.h | grep -v "\#endif.*GCC_DEFAULTS_H" > ${S}/gcc/defaults.h.new | ||
99 | echo "#ifndef STANDARD_INCLUDE_DIR" >> ${S}/gcc/defaults.h.new | ||
100 | echo "#define STANDARD_INCLUDE_DIR \"${SYSTEMHEADERS}\"" >> ${S}/gcc/defaults.h.new | ||
101 | echo "#endif" >> ${S}/gcc/defaults.h.new | ||
102 | echo "#ifndef STANDARD_STARTFILE_PREFIX_1" >> ${S}/gcc/defaults.h.new | ||
103 | echo "#define STANDARD_STARTFILE_PREFIX_1 \"${SYSTEMLIBS}\"" >> ${S}/gcc/defaults.h.new | ||
104 | echo "#endif" >> ${S}/gcc/defaults.h.new | ||
105 | echo "#ifndef STANDARD_STARTFILE_PREFIX_2" >> ${S}/gcc/defaults.h.new | ||
106 | echo "#define STANDARD_STARTFILE_PREFIX_2 \"${SYSTEMLIBS1}\"" >> ${S}/gcc/defaults.h.new | ||
107 | echo "#endif" >> ${S}/gcc/defaults.h.new | ||
108 | echo "#endif /* ! GCC_DEFAULTS_H */" >> ${S}/gcc/defaults.h.new | ||
109 | mv ${S}/gcc/defaults.h.new ${S}/gcc/defaults.h | ||
110 | oe_runconf | ||
111 | } | ||
112 | |||