All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Added missing CPPFLAGS/CFLAGS/LDFLAGS in sample recipe for morty branch
@ 2017-07-17  8:00 Pierre FICHEUX
  2017-07-17 10:24 ` Burton, Ross
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Pierre FICHEUX @ 2017-07-17  8:00 UTC (permalink / raw)
  To: yocto

This problem causes the following error :

ERROR: example-0.1-r0 do_package_qa: QA Issue: No GNU_HASH in the elf binary


Signed-off-by: Pierre FICHEUX <pierre.ficheux@smile.fr>
---
 .../target/arch/layer/recipes-example/example/example-recipe-0.1.bb    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1.bb b/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1.bb
index 5fbf594..2c478ad 100644
--- a/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1.bb
+++ b/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1.bb
@@ -14,7 +14,8 @@ SRC_URI = "file://helloworld.c"
 S = "${WORKDIR}"
 
 do_compile() {
-	     ${CC} helloworld.c -o helloworld
+	     ${CC} ${CPPFLAGS} ${CFLAGS} -c helloworld.c -o helloworld.o
+	     ${CC} ${LDFLAGS} helloworld.o -o helloworld
 }
 
 do_install() {
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH] Added missing CPPFLAGS/CFLAGS/LDFLAGS in sample recipe for morty branch
  2017-07-17  8:00 [PATCH] Added missing CPPFLAGS/CFLAGS/LDFLAGS in sample recipe for morty branch Pierre FICHEUX
@ 2017-07-17 10:24 ` Burton, Ross
  2017-07-17 10:25 ` Thomas A. F. Thorne MEng AUS MIET
  2017-07-17 14:04 ` Leonardo Sandoval
  2 siblings, 0 replies; 11+ messages in thread
From: Burton, Ross @ 2017-07-17 10:24 UTC (permalink / raw)
  To: Pierre FICHEUX; +Cc: yocto@yoctoproject.org

[-- Attachment #1: Type: text/plain, Size: 397 bytes --]

On 17 July 2017 at 09:00, Pierre FICHEUX <pierre.ficheux@smile.fr> wrote:

> This problem causes the following error :
>
> ERROR: example-0.1-r0 do_package_qa: QA Issue: No GNU_HASH in the elf
> binary
>

This is essentially a backport of aa3e99e24c3234b6f3f19169939d4cd498d0ce36,
can you mark it as such and use a proper commit message (with the modified
file in the shortlog)

Ross

[-- Attachment #2: Type: text/html, Size: 893 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] Added missing CPPFLAGS/CFLAGS/LDFLAGS in sample recipe for morty branch
  2017-07-17  8:00 [PATCH] Added missing CPPFLAGS/CFLAGS/LDFLAGS in sample recipe for morty branch Pierre FICHEUX
  2017-07-17 10:24 ` Burton, Ross
@ 2017-07-17 10:25 ` Thomas A. F. Thorne MEng AUS MIET
  2017-07-17 10:46   ` Burton, Ross
  2017-07-17 14:04 ` Leonardo Sandoval
  2 siblings, 1 reply; 11+ messages in thread
From: Thomas A. F. Thorne MEng AUS MIET @ 2017-07-17 10:25 UTC (permalink / raw)
  To: Pierre FICHEUX, yocto


[-- Attachment #1.1: Type: text/plain, Size: 1342 bytes --]

I am not sure about this change:

On 17/07/17 09:00, Pierre FICHEUX wrote:
> This problem causes the following error :
>
> ERROR: example-0.1-r0 do_package_qa: QA Issue: No GNU_HASH in the elf binary
>
>
> Signed-off-by: Pierre FICHEUX <pierre.ficheux@smile.fr>
> ---
>  .../target/arch/layer/recipes-example/example/example-recipe-0.1.bb    | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1.bb b/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1.bb
> index 5fbf594..2c478ad 100644
> --- a/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1.bb
> +++ b/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1.bb
> @@ -14,7 +14,8 @@ SRC_URI = "file://helloworld.c"
>  S = "${WORKDIR}"
>  
>  do_compile() {
> -	     ${CC} helloworld.c -o helloworld
> +	     ${CC} ${CPPFLAGS} ${CFLAGS} -c helloworld.c -o helloworld.o
> +	     ${CC} ${LDFLAGS} helloworld.o -o helloworld
>  }
>  
>  do_install() {
helloworld.c is a C file, not a C++ file.  ${CC} should give you a C
Compiler.  CPPFLAGS should not be used or necessary for a C compilation. 

Thomas Thorne  Software Engineer  Net2Edge Limited



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 484 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] Added missing CPPFLAGS/CFLAGS/LDFLAGS in sample recipe for morty branch
  2017-07-17 10:25 ` Thomas A. F. Thorne MEng AUS MIET
@ 2017-07-17 10:46   ` Burton, Ross
  2017-07-17 10:54     ` Thomas A. F. Thorne MEng AUS MIET
  0 siblings, 1 reply; 11+ messages in thread
From: Burton, Ross @ 2017-07-17 10:46 UTC (permalink / raw)
  To: Thomas.Thorne; +Cc: yocto@yoctoproject.org

[-- Attachment #1: Type: text/plain, Size: 319 bytes --]

On 17 July 2017 at 11:25, Thomas A. F. Thorne MEng AUS MIET <
Thomas.Thorne@net2edge.com> wrote:

> helloworld.c is a C file, not a C++ file.  ${CC} should give you a C
> Compiler.  CPPFLAGS should not be used or necessary for a C compilation.
>

CPPFLAGS is C Preprocesor, you're thinking of CXXFLAGS.

Ross

[-- Attachment #2: Type: text/html, Size: 738 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] Added missing CPPFLAGS/CFLAGS/LDFLAGS in sample recipe for morty branch
  2017-07-17 10:46   ` Burton, Ross
@ 2017-07-17 10:54     ` Thomas A. F. Thorne MEng AUS MIET
  0 siblings, 0 replies; 11+ messages in thread
From: Thomas A. F. Thorne MEng AUS MIET @ 2017-07-17 10:54 UTC (permalink / raw)
  To: Burton, Ross; +Cc: yocto@yoctoproject.org


[-- Attachment #1.1.1: Type: text/plain, Size: 475 bytes --]

On 17/07/17 11:46, Burton, Ross wrote:
>
> On 17 July 2017 at 11:25, Thomas A. F. Thorne MEng AUS MIET
> <Thomas.Thorne@net2edge.com <mailto:Thomas.Thorne@net2edge.com>> wrote:
>
>     helloworld.c is a C file, not a C++ file.  ${CC} should give you a C
>     Compiler.  CPPFLAGS should not be used or necessary for a C
>     compilation.
>
>
> CPPFLAGS is C Preprocesor, you're thinking of CXXFLAGS.
>
> Ross
Ah yes, my mistake.  Thank you for correcting me. 

[-- Attachment #1.1.2: Type: text/html, Size: 1523 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 484 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] Added missing CPPFLAGS/CFLAGS/LDFLAGS in sample recipe for morty branch
  2017-07-17  8:00 [PATCH] Added missing CPPFLAGS/CFLAGS/LDFLAGS in sample recipe for morty branch Pierre FICHEUX
  2017-07-17 10:24 ` Burton, Ross
  2017-07-17 10:25 ` Thomas A. F. Thorne MEng AUS MIET
@ 2017-07-17 14:04 ` Leonardo Sandoval
  2017-07-17 14:30   ` Burton, Ross
  2 siblings, 1 reply; 11+ messages in thread
From: Leonardo Sandoval @ 2017-07-17 14:04 UTC (permalink / raw)
  To: Pierre FICHEUX; +Cc: yocto

On Mon, 2017-07-17 at 10:00 +0200, Pierre FICHEUX wrote:
> This problem causes the following error :
> 
> ERROR: example-0.1-r0 do_package_qa: QA Issue: No GNU_HASH in the elf binary
> 
> 
> Signed-off-by: Pierre FICHEUX <pierre.ficheux@smile.fr>
> ---
>  .../target/arch/layer/recipes-example/example/example-recipe-0.1.bb    | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1.bb b/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1.bb
> index 5fbf594..2c478ad 100644
> --- a/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1.bb
> +++ b/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1.bb
> @@ -14,7 +14,8 @@ SRC_URI = "file://helloworld.c"
>  S = "${WORKDIR}"
>  
>  do_compile() {
> -	     ${CC} helloworld.c -o helloworld
> +	     ${CC} ${CPPFLAGS} ${CFLAGS} -c helloworld.c -o helloworld.o
> +	     ${CC} ${LDFLAGS} helloworld.o -o helloworld

master has the second line (LDFLAGS) but not the first one (CPPFLAGS and
CFLAGS) so the problem may also be present on master. Would you mind
checking this and sent patches to the poky mailing list?

Leo

>  }
>  
>  do_install() {
> -- 
> 2.7.4
> 




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] Added missing CPPFLAGS/CFLAGS/LDFLAGS in sample recipe for morty branch
  2017-07-17 14:04 ` Leonardo Sandoval
@ 2017-07-17 14:30   ` Burton, Ross
  2017-07-17 14:48     ` Leonardo Sandoval
  0 siblings, 1 reply; 11+ messages in thread
From: Burton, Ross @ 2017-07-17 14:30 UTC (permalink / raw)
  To: Leonardo Sandoval; +Cc: yocto@yoctoproject.org

[-- Attachment #1: Type: text/plain, Size: 378 bytes --]

On 17 July 2017 at 15:04, Leonardo Sandoval <
leonardo.sandoval.gonzalez@linux.intel.com> wrote:

> master has the second line (LDFLAGS) but not the first one (CPPFLAGS and
> CFLAGS) so the problem may also be present on master. Would you mind
> checking this and sent patches to the poky mailing list?
>

The GNU_HASH warning is triggered by ignoring LDFLAGS.

Ross

[-- Attachment #2: Type: text/html, Size: 809 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] Added missing CPPFLAGS/CFLAGS/LDFLAGS in sample recipe for morty branch
  2017-07-17 14:30   ` Burton, Ross
@ 2017-07-17 14:48     ` Leonardo Sandoval
  2017-07-17 22:48       ` Pierre FICHEUX
  2017-07-26  6:06       ` Einar Vading
  0 siblings, 2 replies; 11+ messages in thread
From: Leonardo Sandoval @ 2017-07-17 14:48 UTC (permalink / raw)
  To: Burton, Ross; +Cc: yocto@yoctoproject.org

On Mon, 2017-07-17 at 15:30 +0100, Burton, Ross wrote:
> 
> On 17 July 2017 at 15:04, Leonardo Sandoval
> <leonardo.sandoval.gonzalez@linux.intel.com> wrote:
>         master has the second line (LDFLAGS) but not the first one
>         (CPPFLAGS and
>         CFLAGS) so the problem may also be present on master. Would
>         you mind
>         checking this and sent patches to the poky mailing list?
>         
> 
> The GNU_HASH warning is triggered by ignoring LDFLAGS.

Got it, so definitely LDFLAGS var is missing, not sure if the rest are
necessary for this simple hello world recipe.
Leo
> 
> 
> Ross




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] Added missing CPPFLAGS/CFLAGS/LDFLAGS in sample recipe for morty branch
  2017-07-17 14:48     ` Leonardo Sandoval
@ 2017-07-17 22:48       ` Pierre FICHEUX
  2017-07-26  6:06       ` Einar Vading
  1 sibling, 0 replies; 11+ messages in thread
From: Pierre FICHEUX @ 2017-07-17 22:48 UTC (permalink / raw)
  To: Leonardo Sandoval; +Cc: yocto

My first proposed patch didn't include CPPFLAGS/CFLAGS but Khem Raj did 
prefer the new way :)

-- 
Pierre FICHEUX -/- CTO Smile-ECS, France -\- pierre.ficheux@smile.fr
                                     http://www.smile.fr
                                     http://ingenierie.openwide.fr
I would love to change the world, but they won't give me the source 
code

Le 2017-07-17 16:48, Leonardo Sandoval a écrit :
> On Mon, 2017-07-17 at 15:30 +0100, Burton, Ross wrote:
>> 
>> On 17 July 2017 at 15:04, Leonardo Sandoval
>> <leonardo.sandoval.gonzalez@linux.intel.com> wrote:
>>         master has the second line (LDFLAGS) but not the first one
>>         (CPPFLAGS and
>>         CFLAGS) so the problem may also be present on master. Would
>>         you mind
>>         checking this and sent patches to the poky mailing list?
>> 
>> 
>> The GNU_HASH warning is triggered by ignoring LDFLAGS.
> 
> Got it, so definitely LDFLAGS var is missing, not sure if the rest are
> necessary for this simple hello world recipe.
> Leo
>> 
>> 
>> Ross


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] Added missing CPPFLAGS/CFLAGS/LDFLAGS in sample recipe for morty branch
  2017-07-17 14:48     ` Leonardo Sandoval
  2017-07-17 22:48       ` Pierre FICHEUX
@ 2017-07-26  6:06       ` Einar Vading
  2017-07-30 12:10         ` Pierre FICHEUX
  1 sibling, 1 reply; 11+ messages in thread
From: Einar Vading @ 2017-07-26  6:06 UTC (permalink / raw)
  To: Leonardo Sandoval; +Cc: yocto@yoctoproject.org

[-- Attachment #1: Type: text/plain, Size: 939 bytes --]

On Mon, Jul 17, 2017 at 4:48 PM, Leonardo Sandoval <
leonardo.sandoval.gonzalez@linux.intel.com> wrote:

> On Mon, 2017-07-17 at 15:30 +0100, Burton, Ross wrote:
> >
> > On 17 July 2017 at 15:04, Leonardo Sandoval
> > <leonardo.sandoval.gonzalez@linux.intel.com> wrote:
> >         master has the second line (LDFLAGS) but not the first one
> >         (CPPFLAGS and
> >         CFLAGS) so the problem may also be present on master. Would
> >         you mind
> >         checking this and sent patches to the poky mailing list?
> >
> >
> > The GNU_HASH warning is triggered by ignoring LDFLAGS.
>
> Got it, so definitely LDFLAGS var is missing, not sure if the rest are
> necessary for this simple hello world recipe.
> Leo
>

I had this problem to and IIRC i fixed it by moving the LDFLAGS variable to
the end of the line
> +          ${CC} helloworld.o -o helloworld  ${LDFLAGS}

>
> >
> > Ross
>
>
Einar

[-- Attachment #2: Type: text/html, Size: 1755 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] Added missing CPPFLAGS/CFLAGS/LDFLAGS in sample recipe for morty branch
  2017-07-26  6:06       ` Einar Vading
@ 2017-07-30 12:10         ` Pierre FICHEUX
  0 siblings, 0 replies; 11+ messages in thread
From: Pierre FICHEUX @ 2017-07-30 12:10 UTC (permalink / raw)
  To: Einar Vading; +Cc: yocto

Hi,

So do you want a new patch with LDFLAGS only?

regards

-- 
Pierre FICHEUX -/- CTO Smile-ECS, France -\- pierre.ficheux@smile.fr
                                     http://www.smile.fr
                                     http://ingenierie.openwide.fr
I would love to change the world, but they won't give me the source 
code

Le 2017-07-26 08:06, Einar Vading a écrit :
> On Mon, Jul 17, 2017 at 4:48 PM, Leonardo Sandoval
> <leonardo.sandoval.gonzalez@linux.intel.com> wrote:
> 
>> On Mon, 2017-07-17 at 15:30 +0100, Burton, Ross wrote:
>>> 
>>> On 17 July 2017 at 15:04, Leonardo Sandoval
>>> <leonardo.sandoval.gonzalez@linux.intel.com> wrote:
>>>          master has the second line (LDFLAGS) but not the first one
>>>          (CPPFLAGS and
>>>          CFLAGS) so the problem may also be present on master. Would
>>>          you mind
>>>          checking this and sent patches to the poky mailing list?
>>> 
>>> 
>>> The GNU_HASH warning is triggered by ignoring LDFLAGS.
>> 
>> Got it, so definitely LDFLAGS var is missing, not sure if the rest 
>> are
>> necessary for this simple hello world recipe.
>> Leo
> 
> I had this problem to and IIRC i fixed it by moving the LDFLAGS
> variable to the end of the line
>> +          ${CC} helloworld.o -o helloworld  ${LDFLAGS}
> 
>>> 
>>> 
>>> Ross
> 
> Einar 


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-07-30 12:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-17  8:00 [PATCH] Added missing CPPFLAGS/CFLAGS/LDFLAGS in sample recipe for morty branch Pierre FICHEUX
2017-07-17 10:24 ` Burton, Ross
2017-07-17 10:25 ` Thomas A. F. Thorne MEng AUS MIET
2017-07-17 10:46   ` Burton, Ross
2017-07-17 10:54     ` Thomas A. F. Thorne MEng AUS MIET
2017-07-17 14:04 ` Leonardo Sandoval
2017-07-17 14:30   ` Burton, Ross
2017-07-17 14:48     ` Leonardo Sandoval
2017-07-17 22:48       ` Pierre FICHEUX
2017-07-26  6:06       ` Einar Vading
2017-07-30 12:10         ` Pierre FICHEUX

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.