aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/gdb/gdb-cross-sdk.inc
blob: 43d13a5601c6c88e18e222174326e13f6edaf09b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require gdb-cross.inc
LICENSE = "GPLv3"

inherit sdk
DEPENDS = "ncurses-native zlib-native expat-native flex-native"
EXTRA_OEMAKE = "'SUBDIRS=intl mmalloc libiberty opcodes bfd sim gdb etc utils' LDFLAGS='${BUILD_LDFLAGS}'"

# Since we statically link against the required host libraries we don't 
# add a depenency on the -sdk versions of them.
do_configure_append () {
	cd ${B}
	oe_runmake configure-host
	sed -e 's,-lncurses,${STAGING_LIBDIR_NATIVE}/libncurses.a ${STAGING_LIBDIR_NATIVE}/libtinfo.a ,g' -i ${B}/gdb/Makefile
	sed -e 's,-lz, ${STAGING_LIBDIR_NATIVE}/libz.a ,g' -i ${B}/gdb/Makefile
	sed -e 's,-lexpat, ${STAGING_LIBDIR_NATIVE}/libexpat.a ,g' -i ${B}/gdb/Makefile
	sed -e 's,libexpat.so,libexpat.a ,g' -i ${B}/gdb/Makefile
	for SIM in ${B}/sim/*/Makefile; do
		[ -f $SIM ] && sed -e 's,-lz, ${STAGING_LIBDIR_NATIVE}/libz.a ,g' -i $SIM
	done
	oe_runconf
}