All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Denys Dmytriyenko" <denys@ti.com>
To: Khem Raj <raj.khem@gmail.com>
Cc: <meta-ti@lists.yoctoproject.org>
Subject: Re: [meta-ti] [PATCH 1/2] ti-rpmsg-char-examples: Fix cross compile
Date: Mon, 26 Oct 2020 17:20:00 -0400	[thread overview]
Message-ID: <20201026212000.GO19741@beryl> (raw)
In-Reply-To: <20201025065934.3308920-1-raj.khem@gmail.com>

On Sat, Oct 24, 2020 at 11:59:33PM -0700, Khem Raj wrote:
> This fixes problems during cross compile where it starts to peek into
> build host's include and library paths and causes errors with clang and
> QA warnings with gcc
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  ...-Remove-use-of-includedir-and-libdir.patch | 37 +++++++++++++++++++
>  recipes-ti/ipc/ti-rpmsg-char-examples_git.bb  |  2 +
>  2 files changed, 39 insertions(+)
>  create mode 100644 recipes-ti/ipc/ti-rpmsg-char-examples/0001-examples-Remove-use-of-includedir-and-libdir.patch
> 
> diff --git a/recipes-ti/ipc/ti-rpmsg-char-examples/0001-examples-Remove-use-of-includedir-and-libdir.patch b/recipes-ti/ipc/ti-rpmsg-char-examples/0001-examples-Remove-use-of-includedir-and-libdir.patch
> new file mode 100644
> index 00000000..34807152
> --- /dev/null
> +++ b/recipes-ti/ipc/ti-rpmsg-char-examples/0001-examples-Remove-use-of-includedir-and-libdir.patch
> @@ -0,0 +1,37 @@
> +From 1a26cb577ba54dd9214eeb94fed0ce3a0f4603b6 Mon Sep 17 00:00:00 2001
> +From: Khem Raj <raj.khem@gmail.com>
> +Date: Sat, 24 Oct 2020 23:46:39 -0700
> +Subject: [PATCH] examples: Remove use of includedir and libdir
> +
> +These point to standard include and library paths which already are used
> +from sysroot relative paths secondly, they use absolute paths which
> +means we are asking to add -I/usr/include which might be ok in a native
> +build but not in cross build. This helps mitigate QA errors found with
> +OE build system since it finds it adding host include and library search
> +paths to linker/compiler commandline

What's the Upstream-Status on this? Should it be "Inappropriate [OE-specific]"?


> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> +---
> + examples/Makefile.am | 5 +----
> + 1 file changed, 1 insertion(+), 4 deletions(-)
> +
> +diff --git a/examples/Makefile.am b/examples/Makefile.am
> +index 5a9bedb..d547e41 100644
> +--- a/examples/Makefile.am
> ++++ b/examples/Makefile.am
> +@@ -1,6 +1,4 @@
> +-INCLUDE = -I${includedir}
> +-
> +-AM_CFLAGS = -Wall -g -O2 $(INCLUDE)
> ++AM_CFLAGS = -Wall -g -O2
> + 
> + bin_PROGRAMS = rpmsg_char_simple
> + 
> +@@ -8,4 +6,3 @@ bin_PROGRAMS = rpmsg_char_simple
> + rpmsg_char_simple_SOURCES = rpmsg_char_simple.c
> + rpmsg_char_simple_CPPFLAGS = $(AM_CFLAGS)
> + rpmsg_char_simple_LDADD = -lpthread -lti_rpmsg_char
> +-rpmsg_char_simple_LDFLAGS = -L${libdir}
> +-- 
> +2.29.1
> +
> diff --git a/recipes-ti/ipc/ti-rpmsg-char-examples_git.bb b/recipes-ti/ipc/ti-rpmsg-char-examples_git.bb
> index 142e5bf0..cbe4d7fd 100644
> --- a/recipes-ti/ipc/ti-rpmsg-char-examples_git.bb
> +++ b/recipes-ti/ipc/ti-rpmsg-char-examples_git.bb
> @@ -2,6 +2,8 @@ SUMMARY = "TI RPMsg Char Sample Applications and Tests"
>  
>  require ti-rpmsg-char.inc
>  
> +SRC_URI += "file://0001-examples-Remove-use-of-includedir-and-libdir.patch"
> +
>  DEPENDS = "ti-rpmsg-char"
>  
>  inherit autotools pkgconfig
> -- 
> 2.29.1
> 

> 
> 
> 


  parent reply	other threads:[~2020-10-26 21:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-25  6:59 [PATCH 1/2] ti-rpmsg-char-examples: Fix cross compile Khem Raj
2020-10-25  6:59 ` [PATCH 2/2] ti-rpmsg-char: Mark these recipes to be TI SOC specific Khem Raj
2020-10-27  2:19   ` [meta-ti] " Suman Anna
2020-10-27  2:30     ` Khem Raj
2020-10-27  2:45       ` Suman Anna
     [not found]       ` <1641B95DDCF93CD1.11545@lists.yoctoproject.org>
2020-10-29 21:53         ` Suman Anna
2020-10-27  2:41     ` Denys Dmytriyenko
2020-10-26 21:20 ` Denys Dmytriyenko [this message]
2020-10-26 23:24   ` [meta-ti] [PATCH 1/2] ti-rpmsg-char-examples: Fix cross compile Khem Raj
2020-10-27  2:43     ` Denys Dmytriyenko
     [not found]     ` <1641B93D38E82508.16876@lists.yoctoproject.org>
2020-10-29 18:09       ` Denys Dmytriyenko
2020-10-29 20:09         ` Khem Raj
2020-10-29 21:50           ` Suman Anna
2020-10-29 21:56             ` Denys Dmytriyenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201026212000.GO19741@beryl \
    --to=denys@ti.com \
    --cc=meta-ti@lists.yoctoproject.org \
    --cc=raj.khem@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.