mirror of
https://git.yoctoproject.org/poky
synced 2026-05-05 07:39:49 +02:00
staging: Use relative path in sysroot-destdir for target recipes
Original we used absolute path in sysroot-destdir for both native and target recipes. This commit changes target recipes to use relative path which is same as the image directory. [sgw: merged with libtool sysroot work] Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
This commit is contained in:
committed by
Richard Purdie
parent
b1025bd538
commit
bc9d2fbfd4
@@ -47,8 +47,8 @@ SYSROOT_PREPROCESS_FUNCS += "binconfig_sysroot_preprocess"
|
|||||||
binconfig_sysroot_preprocess () {
|
binconfig_sysroot_preprocess () {
|
||||||
for config in `find ${S} -name '${BINCONFIG_GLOB}'`; do
|
for config in `find ${S} -name '${BINCONFIG_GLOB}'`; do
|
||||||
configname=`basename $config`
|
configname=`basename $config`
|
||||||
install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}
|
install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}
|
||||||
cat $config | sed ${@get_binconfig_mangle(d)} > ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/$configname
|
cat $config | sed ${@get_binconfig_mangle(d)} > ${SYSROOT_DESTDIR}${bindir_crossscripts}/$configname
|
||||||
chmod u+x ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/$configname
|
chmod u+x ${SYSROOT_DESTDIR}${bindir_crossscripts}/$configname
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,6 +50,8 @@ base_sbindir = "${bindir}"
|
|||||||
libdir = "${exec_prefix}/lib/${MULTIMACH_TARGET_SYS}"
|
libdir = "${exec_prefix}/lib/${MULTIMACH_TARGET_SYS}"
|
||||||
libexecdir = "${exec_prefix}/libexec/${MULTIMACH_TARGET_SYS}"
|
libexecdir = "${exec_prefix}/libexec/${MULTIMACH_TARGET_SYS}"
|
||||||
|
|
||||||
|
do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR_NATIVE}"
|
||||||
|
|
||||||
do_install () {
|
do_install () {
|
||||||
oe_runmake 'DESTDIR=${D}' install
|
oe_runmake 'DESTDIR=${D}' install
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ kernel_do_install() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sysroot_stage_all_append() {
|
sysroot_stage_all_append() {
|
||||||
sysroot_stage_dir ${D}/kernel ${SYSROOT_DESTDIR}${STAGING_KERNEL_DIR}
|
sysroot_stage_dir ${D}/kernel ${SYSROOT_DESTDIR}/kernel
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -60,6 +60,9 @@ base_prefix = "${STAGING_DIR_NATIVE}"
|
|||||||
prefix = "${STAGING_DIR_NATIVE}${prefix_native}"
|
prefix = "${STAGING_DIR_NATIVE}${prefix_native}"
|
||||||
exec_prefix = "${STAGING_DIR_NATIVE}${prefix_native}"
|
exec_prefix = "${STAGING_DIR_NATIVE}${prefix_native}"
|
||||||
|
|
||||||
|
do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR_NATIVE}"
|
||||||
|
do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_NATIVE}"
|
||||||
|
|
||||||
# Since we actually install these into situ there is no staging prefix
|
# Since we actually install these into situ there is no staging prefix
|
||||||
STAGING_DIR_HOST = ""
|
STAGING_DIR_HOST = ""
|
||||||
STAGING_DIR_TARGET = ""
|
STAGING_DIR_TARGET = ""
|
||||||
|
|||||||
@@ -20,8 +20,9 @@ siteconfig_do_siteconfig_gencache () {
|
|||||||
sed -n -e "/ac_cv_c_bigendian/p" -e "/ac_cv_sizeof_/p" \
|
sed -n -e "/ac_cv_c_bigendian/p" -e "/ac_cv_sizeof_/p" \
|
||||||
-e "/ac_cv_type_/p" -e "/ac_cv_header_/p" -e "/ac_cv_func_/p" \
|
-e "/ac_cv_type_/p" -e "/ac_cv_header_/p" -e "/ac_cv_func_/p" \
|
||||||
< ${PN}_cache > ${PN}_config
|
< ${PN}_cache > ${PN}_config
|
||||||
mkdir -p ${SYSROOT_DESTDIR}${SITECONFIG_SYSROOTCACHE}
|
mkdir -p ${SYSROOT_DESTDIR}${datadir}/${TARGET_SYS}_config_site.d
|
||||||
cp ${PN}_config ${SYSROOT_DESTDIR}${SITECONFIG_SYSROOTCACHE}
|
cp ${PN}_config ${SYSROOT_DESTDIR}${datadir}/${TARGET_SYS}_config_site.d
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
do_populate_sysroot[sstate-interceptfuncs] += "do_siteconfig "
|
do_populate_sysroot[sstate-interceptfuncs] += "do_siteconfig "
|
||||||
|
|||||||
@@ -32,25 +32,25 @@ sysroot_stage_dirs() {
|
|||||||
from="$1"
|
from="$1"
|
||||||
to="$2"
|
to="$2"
|
||||||
|
|
||||||
sysroot_stage_dir $from${includedir} $to${STAGING_INCDIR}
|
sysroot_stage_dir $from${includedir} $to${includedir}
|
||||||
if [ "${BUILD_SYS}" = "${HOST_SYS}" ]; then
|
if [ "${BUILD_SYS}" = "${HOST_SYS}" ]; then
|
||||||
sysroot_stage_dir $from${bindir} $to${STAGING_DIR_HOST}${bindir}
|
sysroot_stage_dir $from${bindir} $to${bindir}
|
||||||
sysroot_stage_dir $from${sbindir} $to${STAGING_DIR_HOST}${sbindir}
|
sysroot_stage_dir $from${sbindir} $to${sbindir}
|
||||||
sysroot_stage_dir $from${base_bindir} $to${STAGING_DIR_HOST}${base_bindir}
|
sysroot_stage_dir $from${base_bindir} $to${base_bindir}
|
||||||
sysroot_stage_dir $from${base_sbindir} $to${STAGING_DIR_HOST}${base_sbindir}
|
sysroot_stage_dir $from${base_sbindir} $to${base_sbindir}
|
||||||
sysroot_stage_dir $from${libexecdir} $to${STAGING_DIR_HOST}${libexecdir}
|
sysroot_stage_dir $from${libexecdir} $to${libexecdir}
|
||||||
sysroot_stage_dir $from${sysconfdir} $to${STAGING_DIR_HOST}${sysconfdir}
|
sysroot_stage_dir $from${sysconfdir} $to${sysconfdir}
|
||||||
sysroot_stage_dir $from${localstatedir} $to${STAGING_DIR_HOST}${localstatedir}
|
sysroot_stage_dir $from${localstatedir} $to${localstatedir}
|
||||||
fi
|
fi
|
||||||
if [ -d $from${libdir} ]
|
if [ -d $from${libdir} ]
|
||||||
then
|
then
|
||||||
sysroot_stage_libdir $from/${libdir} $to${STAGING_LIBDIR}
|
sysroot_stage_libdir $from/${libdir} $to${libdir}
|
||||||
fi
|
fi
|
||||||
if [ -d $from${base_libdir} ]
|
if [ -d $from${base_libdir} ]
|
||||||
then
|
then
|
||||||
sysroot_stage_libdir $from${base_libdir} $to${STAGING_DIR_HOST}${base_libdir}
|
sysroot_stage_libdir $from${base_libdir} $to${base_libdir}
|
||||||
fi
|
fi
|
||||||
sysroot_stage_dir $from${datadir} $to${STAGING_DATADIR}
|
sysroot_stage_dir $from${datadir} $to${datadir}
|
||||||
}
|
}
|
||||||
|
|
||||||
sysroot_stage_all() {
|
sysroot_stage_all() {
|
||||||
@@ -90,8 +90,8 @@ python do_populate_sysroot () {
|
|||||||
|
|
||||||
SSTATETASKS += "do_populate_sysroot"
|
SSTATETASKS += "do_populate_sysroot"
|
||||||
do_populate_sysroot[sstate-name] = "populate-sysroot"
|
do_populate_sysroot[sstate-name] = "populate-sysroot"
|
||||||
do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR}"
|
do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}"
|
||||||
do_populate_sysroot[sstate-outputdirs] = "${TMPDIR}/sysroots"
|
do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_HOST}/"
|
||||||
|
|
||||||
python do_populate_sysroot_setscene () {
|
python do_populate_sysroot_setscene () {
|
||||||
sstate_setscene(d)
|
sstate_setscene(d)
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ includedir_native = "${prefix_native}/include"
|
|||||||
libdir_native = "${prefix_native}/lib"
|
libdir_native = "${prefix_native}/lib"
|
||||||
datadir_native = "${prefix_native}/share"
|
datadir_native = "${prefix_native}/share"
|
||||||
bindir_cross = "/bin"
|
bindir_cross = "/bin"
|
||||||
|
bindir_crossscripts = "${bindir}/crossscripts"
|
||||||
prefix_nativesdk = "/usr"
|
prefix_nativesdk = "/usr"
|
||||||
bindir_nativesdk = "${prefix_nativesdk}/bin"
|
bindir_nativesdk = "${prefix_nativesdk}/bin"
|
||||||
libdir_nativesdk = "${prefix_nativesdk}/lib"
|
libdir_nativesdk = "${prefix_nativesdk}/lib"
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ FILES_${PN}-dev += "${bindir}/gupnp-binding-tool"
|
|||||||
SYSROOT_PREPROCESS_FUNCS += "gupnp_sysroot_preprocess"
|
SYSROOT_PREPROCESS_FUNCS += "gupnp_sysroot_preprocess"
|
||||||
|
|
||||||
gupnp_sysroot_preprocess () {
|
gupnp_sysroot_preprocess () {
|
||||||
install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/
|
install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
|
||||||
install -m 755 ${D}${bindir}/gupnp-binding-tool ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/
|
install -m 755 ${D}${bindir}/gupnp-binding-tool ${SYSROOT_DESTDIR}${bindir_crossscripts}/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,9 @@ EXTRA_OECONF = "--with-local-prefix=${STAGING_DIR_TARGET}${target_prefix} \
|
|||||||
${EXTRA_OECONF_INTERMEDIATE} \
|
${EXTRA_OECONF_INTERMEDIATE} \
|
||||||
${@get_gcc_fpu_setting(bb, d)}"
|
${@get_gcc_fpu_setting(bb, d)}"
|
||||||
|
|
||||||
|
do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR_HOST} ${SYSROOT_DESTDIR}/${STAGING_DIR_TARGET}/${target_base_libdir}"
|
||||||
|
do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_HOST} ${STAGING_DIR_TARGET}/${target_base_libdir}"
|
||||||
|
|
||||||
do_compile () {
|
do_compile () {
|
||||||
oe_runmake
|
oe_runmake
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,6 +26,6 @@ do_install () {
|
|||||||
SYSROOT_PREPROCESS_FUNCS += "libtoolcross_sysroot_preprocess"
|
SYSROOT_PREPROCESS_FUNCS += "libtoolcross_sysroot_preprocess"
|
||||||
|
|
||||||
libtoolcross_sysroot_preprocess () {
|
libtoolcross_sysroot_preprocess () {
|
||||||
install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/
|
install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}
|
||||||
install -m 755 ${D}${bindir}/${HOST_SYS}-libtool ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool
|
install -m 755 ${D}${bindir}/${HOST_SYS}-libtool ${SYSROOT_DESTDIR}${bindir_crossscripts}/${HOST_SYS}-libtool
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,6 @@ do_install () {
|
|||||||
SYSROOT_PREPROCESS_FUNCS += "libtoolnativesdk_sysroot_preprocess"
|
SYSROOT_PREPROCESS_FUNCS += "libtoolnativesdk_sysroot_preprocess"
|
||||||
|
|
||||||
libtoolnativesdk_sysroot_preprocess () {
|
libtoolnativesdk_sysroot_preprocess () {
|
||||||
install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/
|
install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
|
||||||
install -m 755 ${D}${bindir}/${HOST_SYS}-libtool ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool
|
install -m 755 ${D}${bindir}/${HOST_SYS}-libtool ${SYSROOT_DESTDIR}${bindir_crossscripts}/${HOST_SYS}-libtool
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ PR = "r1"
|
|||||||
SYSROOT_PREPROCESS_FUNCS += "libtool_sysroot_preprocess"
|
SYSROOT_PREPROCESS_FUNCS += "libtool_sysroot_preprocess"
|
||||||
|
|
||||||
libtool_sysroot_preprocess () {
|
libtool_sysroot_preprocess () {
|
||||||
rm -rf ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${bindir}/*
|
rm -rf ${SYSROOT_DESTDIR}${bindir}/*
|
||||||
rm -rf ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${datadir}/aclocal/*
|
rm -rf ${SYSROOT_DESTDIR}${datadir}/aclocal/*
|
||||||
rm -rf ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${datadir}/libtool/config/*
|
rm -rf ${SYSROOT_DESTDIR}${datadir}/libtool/config/*
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -64,8 +64,8 @@ SYSROOT_PREPROCESS_FUNCS += "gtk_sysroot_preprocess"
|
|||||||
|
|
||||||
gtk_sysroot_preprocess () {
|
gtk_sysroot_preprocess () {
|
||||||
if [ -e ${D}${bindir}/gtk-builder-convert ]; then
|
if [ -e ${D}${bindir}/gtk-builder-convert ]; then
|
||||||
install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/
|
install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
|
||||||
install -m 755 ${D}${bindir}/gtk-builder-convert ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/
|
install -m 755 ${D}${bindir}/gtk-builder-convert ${SYSROOT_DESTDIR}${bindir_crossscripts}/
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ do_configure_append() {
|
|||||||
SYSROOT_PREPROCESS_FUNCS += "apr_sysroot_preprocess"
|
SYSROOT_PREPROCESS_FUNCS += "apr_sysroot_preprocess"
|
||||||
|
|
||||||
apr_sysroot_preprocess () {
|
apr_sysroot_preprocess () {
|
||||||
d=${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${datadir}/apr
|
d=${SYSROOT_DESTDIR}${datadir}/apr
|
||||||
install -d $d/
|
install -d $d/
|
||||||
cp ${S}/build/apr_rules.mk $d/
|
cp ${S}/build/apr_rules.mk $d/
|
||||||
sed -i s,apr_builddir=.*,apr_builddir=,g $d/apr_rules.mk
|
sed -i s,apr_builddir=.*,apr_builddir=,g $d/apr_rules.mk
|
||||||
|
|||||||
Reference in New Issue
Block a user