diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2009-08-05 18:12:32 +0200 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2009-08-17 10:56:21 +0200 |
commit | 9bee387b24e1ef20389d61f2b69007d94e35a437 (patch) | |
tree | 052adf24ba31c3a024eb084891860346234ccd8d /scripts | |
parent | ec782076404385f34176911230ef58ed8f4cb582 (diff) | |
download | ptxdist-9bee387b24e1ef20389d61f2b69007d94e35a437.tar.gz ptxdist-9bee387b24e1ef20389d61f2b69007d94e35a437.tar.xz |
[ptxd_make_00-init] add support for production sysroot
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/ptxd_make_00-init.sh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/scripts/lib/ptxd_make_00-init.sh b/scripts/lib/ptxd_make_00-init.sh index 87d7c8506..e4b08d63a 100644 --- a/scripts/lib/ptxd_make_00-init.sh +++ b/scripts/lib/ptxd_make_00-init.sh @@ -75,6 +75,36 @@ ptxd_init_sysroot_toolchain() { # +# figure out if we use a production BSP +# +# out: +# sysroot_production +# +ptxd_init_get_sysroot_production() { + local prefix + + prefix="$(ptxd_get_ptxconf PTXCONF_PROJECT_USE_PRODUCTION_PREFIX)" || return + + local platform platform_version + platform="$(ptxd_get_ptxconf PTXCONF_PLATFORM)" + platform_version="$(ptxd_get_ptxconf PTXCONF_PLATFORM_VERSION)" + + if [ -n "${platform}" ]; then + prefix="${prefix}/platform-${platform}${platform_version}" + else + : # nothing to do for non-platform BSPs + fi + + # FIXME: HACK we hardcode "sysroot-target" here + sysroot_production="${prefix}/sysroot-target" + + PTXDIST_PROD_PLATFORMDIR="${prefix}" + export PTXDIST_PROD_PLATFORMDIR +} + + + +# # gather all sysroots # # out: @@ -87,6 +117,12 @@ ptxd_init_ptxdist_path() { local sysroot="$(ptxd_get_ptxconf PTXCONF_SYSROOT_TARGET)" local sysroot_prefix="${sysroot}:${sysroot}/usr" + local sysroot_production + if ptxd_init_get_sysroot_production; then + sysroot="${sysroot}:${sysroot_production}" + sysroot_prefix="${sysroot_prefix}:${sysroot_production}:${sysroot_production}/usr" + fi + local sysroot_all="${sysroot}" local sysroot_prefix_all="${sysroot_prefix}" if [ -n "${PTXDIST_SYSROOT_TOOLCHAIN}" ]; then |