Skip to contentSkip to conversation

common-tasks.rst: Fix GNU_HASH in hello.bb

PATCH In review Leon Anavi 2 participants 2 messages Jan 12, 2021 – Jan 13, 2021

lore
Share & tools
lore

Leon Anavi

author
#0 lore raw

PATCH v2 1/1 common-tasks.rst: Fix GNU_HASH in hello.bb

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]

---
 documentation/dev-manual/common-tasks.rst               | 2 +-
 documentation/ref-manual/examples/hello-single/hello.bb | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
documentation/dev-manual/common-tasks.rst +1 -1
index e1dee8ecd..6281e0e3b 100644
@@ -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() {
documentation/ref-manual/examples/hello-single/hello.bb +1 -1
index 0812743e3..90d3aefd8 100644
@@ -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() {
Signature · 1 line
2.17.1
Reviewed-by on v2 1/1
#1 lore raw

Hi Leon,

Quoted 30 lines · Leon Anavi

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]

---
 documentation/dev-manual/common-tasks.rst               | 2 +-
 documentation/ref-manual/examples/hello-single/hello.bb | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
documentation/dev-manual/common-tasks.rst +1 -1
index e1dee8ecd..6281e0e3b 100644
@@ -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() {
documentation/ref-manual/examples/hello-single/hello.bb +0 -0
index 0812743e3..90d3aefd8 100644

documentation/ref-manual/examples/hello-single/hello.bb SRC_URI = "file://helloworld.c" · line 13

Quoted 7 lines
documentation/ref-manual/examples/hello-single/hello.bb +1 -1
@@ -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,

Quentin