summaryrefslogtreecommitdiff
path: root/recipes/gcc/gcc-configure-canadian-sdk.inc
blob: 83ae6f548d08180b5842870f57abf2c68a419a19 (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
require gcc-configure-common.inc

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

#
# We need to override this and make sure the compiler can find staging
#
export ARCH_FLAGS_FOR_TARGET = "--sysroot=${STAGING_DIR_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 ?= ""

EXTRA_OECONF += ""
# On MinGW hosts we want to prepend a drive letter, in ${SDK_REALPATH_MINGW}
# to the sysroot path.
SYSROOT = "${@['${SDK_REALPATH}/${TARGET_SYS}', '${SDK_REALPATH_MINGW}${SDK_REALPATH}/${TARGET_SYS}'][bb.data.getVar('SDK_OS', d, 1) in ['mingw32', 'mingw64']]}"
EXTRA_OECONF_PATHS = " \
	--with-build-sysroot=${STAGING_DIR_TARGET} \
	--with-sysroot=${SYSROOT} \
"

do_configure () {
	# Work around Hardcoded path assumptions in gcc
	(cd ${S} && gnu-configize) || die "failure running gnu-configize"
	(cd ${S}/libstdc++-v3 && autoreconf)
	canadian_sdk_runconf
}

do_compile () {
	oe_runmake
}