[meta-arm,v3,5/5] tcmode-external-arm: fixup headers location in external toolchain SDK

Submitted by Denys Dmytriyenko on June 19, 2020, 12:35 a.m. | Patch ID: 173701

Details

Message ID 1592526937-38479-6-git-send-email-denis@denix.org
State New
Headers show

Commit Message

Denys Dmytriyenko June 19, 2020, 12:35 a.m.
From: Denys Dmytriyenko <denys@ti.com>

External toolchain compiler searches for some headers relative to the binary
and regardless of the --sysroot value. Since headers are installed inside
SDKTARGETSYSROOT, but the binary is inside SDKPATHNATIVE, symlink include
directories between those two.

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
---
 .../conf/distro/include/tcmode-external-arm.inc               | 11 +++++++++++
 1 file changed, 11 insertions(+)

Patch hide | download patch | download mbox

diff --git a/meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc b/meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc
index 7d5aecc..2f101fc 100644
--- a/meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc
+++ b/meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc
@@ -117,3 +117,14 @@  def populate_toolchain_links(d):
             bb.fatal("Unable to populate toolchain binary symlink for %s: %s" % (newpath, exc))
 
 require conf/distro/include/external-arm-toolchain-versions.inc
+
+SDK_POSTPROCESS_COMMAND_prepend = "external_arm_sdk_fixup; "
+
+external_arm_sdk_fixup () {
+	tcpath="${SDK_OUTPUT}/${SDKPATHNATIVE}${prefix_nativesdk}/${EAT_TARGET_SYS}"
+	if [ -d $tcpath ]; then
+		pushd $tcpath
+		ln -s ${SDKTARGETSYSROOT}/include include
+		popd
+	fi
+}

Comments

Sumit Garg June 23, 2020, 2:54 p.m.
On Fri, 19 Jun 2020 at 06:06, Denys Dmytriyenko <denis@denix.org> wrote:
>
> From: Denys Dmytriyenko <denys@ti.com>
>
> External toolchain compiler searches for some headers relative to the binary
> and regardless of the --sysroot value. Since headers are installed inside
> SDKTARGETSYSROOT, but the binary is inside SDKPATHNATIVE, symlink include
> directories between those two.
>
> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
> ---
>  .../conf/distro/include/tcmode-external-arm.inc               | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>

We can drop this hack once we package headers as part of
gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} as well. For details,
refer to my comment on patch #4.

-Sumit

> diff --git a/meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc b/meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc
> index 7d5aecc..2f101fc 100644
> --- a/meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc
> +++ b/meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc
> @@ -117,3 +117,14 @@ def populate_toolchain_links(d):
>              bb.fatal("Unable to populate toolchain binary symlink for %s: %s" % (newpath, exc))
>
>  require conf/distro/include/external-arm-toolchain-versions.inc
> +
> +SDK_POSTPROCESS_COMMAND_prepend = "external_arm_sdk_fixup; "
> +
> +external_arm_sdk_fixup () {
> +       tcpath="${SDK_OUTPUT}/${SDKPATHNATIVE}${prefix_nativesdk}/${EAT_TARGET_SYS}"
> +       if [ -d $tcpath ]; then
> +               pushd $tcpath
> +               ln -s ${SDKTARGETSYSROOT}/include include
> +               popd
> +       fi
> +}
> --
> 2.7.4
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#753): https://lists.yoctoproject.org/g/meta-arm/message/753
Mute This Topic: https://lists.yoctoproject.org/mt/74971121/3617530
Group Owner: meta-arm+owner@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub  [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-