[v2] common-tasks.rst: Fix GNU_HASH in hello.bb

Submitted by Leon Anavi on Jan. 12, 2021, 5:46 p.m. | Patch ID: 179137

Details

Message ID 20210112174600.4731-1-leon.anavi@konsulko.com
State New
Headers show

Commit Message

Leon Anavi Jan. 12, 2021, 5:46 p.m.
Fix the following GNU_HASH issue in "Single .c File Package
(Hello World!)" example:

ERROR: hello-1.0-r0 do_package_qa: QA Issue: File /usr/bin/helloworld in package hello doesn't have GNU_HASH (didn't pass LDFLAGS?) [ldflags]

Reported-by: Matthew Tsenkov <matthew.tsenkov@konsulko.com>
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
---
 documentation/dev-manual/common-tasks.rst               | 2 +-
 documentation/ref-manual/examples/hello-single/hello.bb | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/documentation/dev-manual/common-tasks.rst b/documentation/dev-manual/common-tasks.rst
index e1dee8ecd..6281e0e3b 100644
--- a/documentation/dev-manual/common-tasks.rst
+++ b/documentation/dev-manual/common-tasks.rst
@@ -2298,7 +2298,7 @@  directory BitBake uses for the build.
    S = "${WORKDIR}"
 
    do_compile() {
-       ${CC} helloworld.c -o helloworld
+       ${CC} ${LDFLAGS} helloworld.c -o helloworld
    }
 
    do_install() {
diff --git a/documentation/ref-manual/examples/hello-single/hello.bb b/documentation/ref-manual/examples/hello-single/hello.bb
index 0812743e3..90d3aefd8 100644
--- a/documentation/ref-manual/examples/hello-single/hello.bb
+++ b/documentation/ref-manual/examples/hello-single/hello.bb
@@ -8,7 +8,7 @@  SRC_URI = "file://helloworld.c"
 S = "${WORKDIR}"
 
 do_compile() {
-	${CC} helloworld.c -o helloworld
+	${CC} ${LDFLAGS} helloworld.c -o helloworld
 }
 
 do_install() {

Comments

Quentin Schulz Jan. 13, 2021, 8:53 a.m.
Hi Leon,

On Tue, Jan 12, 2021 at 07:46:00PM +0200, Leon Anavi wrote:
> Fix the following GNU_HASH issue in "Single .c File Package
> (Hello World!)" example:
> 
> ERROR: hello-1.0-r0 do_package_qa: QA Issue: File /usr/bin/helloworld in package hello doesn't have GNU_HASH (didn't pass LDFLAGS?) [ldflags]
> 
> Reported-by: Matthew Tsenkov <matthew.tsenkov@konsulko.com>
> Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
> ---
>  documentation/dev-manual/common-tasks.rst               | 2 +-
>  documentation/ref-manual/examples/hello-single/hello.bb | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/documentation/dev-manual/common-tasks.rst b/documentation/dev-manual/common-tasks.rst
> index e1dee8ecd..6281e0e3b 100644
> --- a/documentation/dev-manual/common-tasks.rst
> +++ b/documentation/dev-manual/common-tasks.rst
> @@ -2298,7 +2298,7 @@ directory BitBake uses for the build.
>     S = "${WORKDIR}"
>  
>     do_compile() {
> -       ${CC} helloworld.c -o helloworld
> +       ${CC} ${LDFLAGS} helloworld.c -o helloworld
>     }
>  
>     do_install() {
> diff --git a/documentation/ref-manual/examples/hello-single/hello.bb b/documentation/ref-manual/examples/hello-single/hello.bb
> index 0812743e3..90d3aefd8 100644
> --- a/documentation/ref-manual/examples/hello-single/hello.bb
> +++ b/documentation/ref-manual/examples/hello-single/hello.bb
> @@ -8,7 +8,7 @@ SRC_URI = "file://helloworld.c"
>  S = "${WORKDIR}"
>  
>  do_compile() {
> -	${CC} helloworld.c -o helloworld
> +	${CC} ${LDFLAGS} helloworld.c -o helloworld
>  }
>  

Thanks for the patch,
Reviewed-by: Quentin Schulz <foss@0leil.net>

Quentin
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#830): https://lists.yoctoproject.org/g/docs/message/830
Mute This Topic: https://lists.yoctoproject.org/mt/79629382/3617530
Group Owner: docs+owner@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/docs/unsub [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-