summaryrefslogtreecommitdiff
path: root/packages/gcc/gcc3-build.inc
diff options
context:
space:
mode:
authorChris Larson <clarson@kergoth.com>2005-03-09 20:49:56 +0000
committerChris Larson <clarson@kergoth.com>2005-03-09 20:49:56 +0000
commit3c52388dc164fee1d85ca17e648d7e5a1d2d8125 (patch)
tree4d0767078615e5781eef3efa92aa7500c3c2a345 /packages/gcc/gcc3-build.inc
parentd59c59b5922e1fd3d31c9951df3c23e69b7193f4 (diff)
Gcc 3.4.x:
Bump PR. Set --with-sysroot for the target gcc build, which fixes the "missing syslimits.h" problem. Gcc packaging updates: split out gcov and cpp, package the /lib/cpp symlink, and rename the -c++ and -f77 packages. BKrev: 422f6174mry97gr8W2Ii-XVLw9aRRQ
Diffstat (limited to 'packages/gcc/gcc3-build.inc')
-rw-r--r--packages/gcc/gcc3-build.inc69
1 files changed, 69 insertions, 0 deletions
diff --git a/packages/gcc/gcc3-build.inc b/packages/gcc/gcc3-build.inc
index e69de29bb2..f555a3f87a 100644
--- a/packages/gcc/gcc3-build.inc
+++ b/packages/gcc/gcc3-build.inc
@@ -0,0 +1,69 @@
+MIRRORS_prepend () {
+${GNU_MIRROR}/gcc/releases/ ftp://gcc.gnu.org/pub/gcc/releases/
+${GNU_MIRROR}/gcc/ http://mirrors.rcn.net/pub/sourceware/gcc/releases/
+${GNU_MIRROR}/gcc/releases/ http://gcc.get-software.com/releases/
+${GNU_MIRROR}/gcc/ http://gcc.get-software.com/releases/
+}
+
+gcclibdir ?= "${libdir}/gcc"
+S = "${WORKDIR}/gcc-${PV}"
+B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
+
+EXTRA_OECONF = "${@['--enable-clocale=generic', ''][bb.data.getVar('USE_NLS', d, 1) != 'no']} \
+ --with-gnu-ld \
+ --enable-shared \
+ --enable-target-optspace \
+ --enable-languages=c,c++,f77 \
+ --enable-threads=posix \
+ --enable-multilib \
+ --enable-c99 \
+ --enable-long-long \
+ --enable-symvers=gnu \
+ --program-prefix=${TARGET_PREFIX} \
+ ${EXTRA_OECONF_PATHS} \
+ ${EXTRA_OECONF_DEP}"
+
+EXTRA_OECONF_PATHS = "--with-sysroot=/ \
+ --with-local-prefix=${prefix}/local \
+ --with-gxx-include-dir=${includedir}/c++/${PV}"
+
+EXTRA_OECONF_DEP = ""
+EXTRA_OECONF_uclibc = "--disable-__cxa_atexit"
+EXTRA_OECONF_glibc = "--enable-__cxa_atexit"
+EXTRA_OECONF += "${@get_gcc_fpu_setting(bb, d)}"
+CPPFLAGS = ""
+
+def get_gcc_fpu_setting(bb, d):
+ if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
+ return "--with-float=soft"
+ return ""
+
+python __anonymous () {
+ import bb, re
+ if (re.match('linux-uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None):
+ bb.data.setVar('EXTRA_OECONF_DEP', '${EXTRA_OECONF_uclibc}', d)
+ elif (re.match('linux$', bb.data.getVar('TARGET_OS', d, 1)) != None):
+ bb.data.setVar('EXTRA_OECONF_DEP', '${EXTRA_OECONF_glibc}', d)
+}
+
+do_configure () {
+ # Setup these vars for cross building only
+ if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
+ export CC_FOR_TARGET="${CCACHE} ${HOST_PREFIX}gcc"
+ export GCC_FOR_TARGET="${CCACHE} ${HOST_PREFIX}gcc"
+ export CXX_FOR_TARGET="${CCACHE} ${HOST_PREFIX}g++"
+ export AS_FOR_TARGET="${HOST_PREFIX}as"
+ export LD_FOR_TARGET="${HOST_PREFIX}ld"
+ export NM_FOR_TARGET="${HOST_PREFIX}nm"
+ export AR_FOR_TARGET="${HOST_PREFIX}ar"
+ export RANLIB_FOR_TARGET="${HOST_PREFIX}ranlib"
+ fi
+ export CC_FOR_BUILD="${BUILD_CC}"
+ export CXX_FOR_BUILD="${BUILD_CXX}"
+ export CFLAGS_FOR_BUILD="${BUILD_CFLAGS}"
+ export CPPFLAGS_FOR_BUILD="${BUILD_CPPFLAGS}"
+ export CXXFLAGS_FOR_BUILD="${BUILD_CXXFLAGS}"
+ export LDFLAGS_FOR_BUILD="${BUILD_LDFLAGS}"
+ (cd ${S} && gnu-configize) || die "failure running gnu-configize"
+ oe_runconf
+}