summaryrefslogtreecommitdiff
path: root/packages/gcc/gcc-configure-canadian-sdk.inc
blob: 489cb4637130e482ca43fa9f26d0c629038ea08b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
require gcc-configure-common.inc

USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibc", "no", "", d )}'
USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibcgnueabi", "no", "", d )}'

ARCH_FLAGS_FOR_TARGET=""

# Tools for build
export CC_FOR_BUILD="${BUILD_CC}"
export CFLAGS_FOR_BUILD="${BUILD_CFLAGS}"
export CPP_FOR_BUILD="${BUILD_CPP}"
export CPPFLAGS_FOR_BUILD="${BUILD_CPPFLAGS}"
export CXX_FOR_BUILD="${BUILD_CXX}"
export CXXFLAGS_FOR_BUILD="${BUILD_CXXFLAGS}"
export LD_FOR_BUILD="${BUILD_LD}"
export LDFLAGS_FOR_BUILD="${BUILD_LDFLAGS}"
export AS_FOR_BUILD="${BUILD_PREFIX}as"
export AR_FOR_BUILD="${BUILD_PREFIX}ar"
export NM_FOR_BUILD="${BUILD_PREFIX}nm"
export RANLIB_FOR_BUILD="${BUILD_PREFIX}ranlib"
export GCJ_FOR_BUILD="${BUILD_PREFIX}gcj"
export GFORTRAN_FOR_BUILD="${BUILD_PREFIX}gfortran"
export DLLTOOL_FOR_BUILD="${BUILD_PREFIX}dlltool"
export WINDRES_FOR_BUILD="${BUILD_PREFIX}windres"

# Tools for host
#CC
#CFLAGS
#CXX
#CXXFLAGS
#LD
LDFLAGS=""
#AS
#AR
#NM
#RANLIB
#GCJ
#GFORTRAN
export DLLTOOL="${HOST_PREFIX}dlltool"
export WINDRES="${HOST_PREFIX}windres"

# Tools for target
export CC_FOR_TARGET="${TARGET_CC}"
export CFLAGS_FOR_TARGET="${TARGET_CFLAGS}"
export CXX_FOR_TARGET="${TARGET_CXX}"
export CXXFLAGS_FOR_TARGET="${TARGET_CXXFLAGS}"
export LD_FOR_TARGET="${TARGET_LD}"
export LDFLAGS_FOR_TARGET="${TARGET_LDFLAGS}"
export AS_FOR_TARGET="${TARGET_PREFIX}as"
export AR_FOR_TARGET="${TARGET_PREFIX}ar"
export NM_FOR_TARGET="${TARGET_PREFIX}nm"
export RANLIB_FOR_TARGET="${TARGET_PREFIX}ranlib"
export GCJ_FOR_TARGET="${TARGET_PREFIX}gcj"
export GFORTRAN_FOR_TARGET="${TARGET_PREFIX}gfortran"
export DLLTOOL_FOR_TARGET="${TARGET_PREFIX}dlltool"
export WINDRES_FOR_TARGET="${TARGET_PREFIX}windres"

EXTRA_OECONF_DEP ?= ""

SYSROOT = "${WORKDIR}/sysroot"
EXTRA_OECONF += ""
EXTRA_OECONF_PATHS = " \
	--with-local-prefix=$dollar{prefix}/local \
	--with-gxx-include-dir=$dollar{prefix}/${TARGET_SYS}/usr/include/c++/${BINV} \
	--with-build-sysroot=${SYSROOT} \
	--with-sysroot=${SDK_REALPATH}/${TARGET_SYS} \
"

do_configure () {
	# Work around Hardcoded path assumptions in gcc
	mkdir -p ${SYSROOT}/usr
	ln -sf ${STAGING_DIR_HOST}${layout_includedir} \
		${SYSROOT}/usr/include
	ln -sf ${STAGING_DIR_HOST}${layout_libdir} \
		${SYSROOT}/usr/lib
	(cd ${S} && gnu-configize) || die "failure running gnu-configize"
	(cd ${S}/libstdc++-v3 && autoreconf)
	canadian_sdk_runconf
}

do_compile () {
	oe_runmake
}