diff mbox series

[1/1] package/procrank_linux: fix static build

Message ID 20220613195559.291427-1-fontaine.fabrice@gmail.com
State Accepted
Headers show
Series [1/1] package/procrank_linux: fix static build | expand

Commit Message

Fabrice Fontaine June 13, 2022, 7:55 p.m. UTC
Pass TARGET_CFLAGS which will contain -static to fix the following
static build failure:

/home/buildroot/autobuild/instance-0/output-1/host/bin/sh4a-buildroot-linux-musl-gcc -Wall procrank.c -Ilibpagemap/include -Llibpagemap -lpagemap -o procrank
/home/buildroot/autobuild/instance-0/output-1/host/lib/gcc/sh4a-buildroot-linux-musl/10.3.0/../../../../sh4a-buildroot-linux-musl/bin/ld: /home/buildroot/autobuild/instance-0/output-1/host/lib/gcc/sh4a-buildroot-linux-musl/10.3.0/libgcc.a(unwind-dw2.o): in function `size_of_encoded_value':
/home/buildroot/autobuild/instance-0/output-1/build/host-gcc-final-10.3.0/build/sh4a-buildroot-linux-musl/libgcc/../../../libgcc/unwind-pe.h:89: undefined reference to `abort'

Fixes:
 - http://autobuild.buildroot.org/results/8eccc34c99a75501179fe93a80646cc684261ff4

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/procrank_linux/procrank_linux.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Arnout Vandecappelle June 19, 2022, 3:44 p.m. UTC | #1
On 13/06/2022 21:55, Fabrice Fontaine wrote:
> Pass TARGET_CFLAGS which will contain -static to fix the following
> static build failure:
> 
> /home/buildroot/autobuild/instance-0/output-1/host/bin/sh4a-buildroot-linux-musl-gcc -Wall procrank.c -Ilibpagemap/include -Llibpagemap -lpagemap -o procrank
> /home/buildroot/autobuild/instance-0/output-1/host/lib/gcc/sh4a-buildroot-linux-musl/10.3.0/../../../../sh4a-buildroot-linux-musl/bin/ld: /home/buildroot/autobuild/instance-0/output-1/host/lib/gcc/sh4a-buildroot-linux-musl/10.3.0/libgcc.a(unwind-dw2.o): in function `size_of_encoded_value':
> /home/buildroot/autobuild/instance-0/output-1/build/host-gcc-final-10.3.0/build/sh4a-buildroot-linux-musl/libgcc/../../../libgcc/unwind-pe.h:89: undefined reference to `abort'
> 
> Fixes:
>   - http://autobuild.buildroot.org/results/8eccc34c99a75501179fe93a80646cc684261ff4
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

  Applied to master, thanks.

  Regards,
  Arnout

> ---
>   package/procrank_linux/procrank_linux.mk | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/package/procrank_linux/procrank_linux.mk b/package/procrank_linux/procrank_linux.mk
> index 7e743194fc..415a4e41b7 100644
> --- a/package/procrank_linux/procrank_linux.mk
> +++ b/package/procrank_linux/procrank_linux.mk
> @@ -10,7 +10,8 @@ PROCRANK_LINUX_LICENSE = Apache-2.0
>   PROCRANK_LINUX_LICENSE_FILES = NOTICE
>   
>   define PROCRANK_LINUX_BUILD_CMDS
> -	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) CROSS_COMPILE="$(TARGET_CROSS)"
> +	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) CROSS_COMPILE="$(TARGET_CROSS)" \
> +		LOCAL_CFLAGS="$(TARGET_CFLAGS)"
>   endef
>   
>   define PROCRANK_LINUX_INSTALL_TARGET_CMDS
Peter Korsgaard July 19, 2022, 4:27 p.m. UTC | #2
>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:

 > On 13/06/2022 21:55, Fabrice Fontaine wrote:
 >> Pass TARGET_CFLAGS which will contain -static to fix the following
 >> static build failure:
 >> /home/buildroot/autobuild/instance-0/output-1/host/bin/sh4a-buildroot-linux-musl-gcc
 >> -Wall procrank.c -Ilibpagemap/include -Llibpagemap -lpagemap -o
 >> procrank
 >> /home/buildroot/autobuild/instance-0/output-1/host/lib/gcc/sh4a-buildroot-linux-musl/10.3.0/../../../../sh4a-buildroot-linux-musl/bin/ld:
 >> /home/buildroot/autobuild/instance-0/output-1/host/lib/gcc/sh4a-buildroot-linux-musl/10.3.0/libgcc.a(unwind-dw2.o):
 >> in function `size_of_encoded_value':
 >> /home/buildroot/autobuild/instance-0/output-1/build/host-gcc-final-10.3.0/build/sh4a-buildroot-linux-musl/libgcc/../../../libgcc/unwind-pe.h:89:
 >> undefined reference to `abort'
 >> Fixes:
 >> - http://autobuild.buildroot.org/results/8eccc34c99a75501179fe93a80646cc684261ff4
 >> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

 >  Applied to master, thanks.

Committed to 2022.05.x and 2022.02.x, thanks.
diff mbox series

Patch

diff --git a/package/procrank_linux/procrank_linux.mk b/package/procrank_linux/procrank_linux.mk
index 7e743194fc..415a4e41b7 100644
--- a/package/procrank_linux/procrank_linux.mk
+++ b/package/procrank_linux/procrank_linux.mk
@@ -10,7 +10,8 @@  PROCRANK_LINUX_LICENSE = Apache-2.0
 PROCRANK_LINUX_LICENSE_FILES = NOTICE
 
 define PROCRANK_LINUX_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) CROSS_COMPILE="$(TARGET_CROSS)"
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) CROSS_COMPILE="$(TARGET_CROSS)" \
+		LOCAL_CFLAGS="$(TARGET_CFLAGS)"
 endef
 
 define PROCRANK_LINUX_INSTALL_TARGET_CMDS