diff mbox series

[v2] package/systemd: don't treat ld warnings as errors

Message ID 20220206104120.1580819-1-giulio.benetti@benettiengineering.com
State Accepted
Headers show
Series [v2] package/systemd: don't treat ld warnings as errors | expand

Commit Message

Giulio Benetti Feb. 6, 2022, 10:41 a.m. UTC
Nios2 ld emits warnings like:
'
/home/buildroot/autobuild/instance-2/output-1/host/opt/ext-toolchain/bin/../lib/gcc/nios2-linux-gnu/7.3.1/../../../../nios2-linux-gnu/bin/ld: FDE encoding in /home/buildroot/autobuild/instance-2/output-1/host/opt/ext-toolchain/bin/../lib/gcc/nios2-linux-gnu/7.3.1/libgcc.a(_umoddi3.o)(.eh_frame) prevents .eh_frame_hdr table being created.
'
Since '-Wl,--fatal-warnings' is passed by default, build fails, so don't
treat warnings as errors by appending "-Wl,--no-fatal-warnings" to
SYSTEMD_LDFLAGS the same way I've done for Microblaze in commit:
https://git.buildroot.net/buildroot/commit/?id=cc53d5357d84ff9b78d76e45ce216061df8a37c1

Fixes:
http://autobuild.buildroot.net/results/5fc884e11e46ab165ea21c8e8f2901516d79ff80/

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
V1->V2:
* renamed BR2_nios to BR2_nios2
---
 package/systemd/systemd.mk | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Arnout Vandecappelle Feb. 14, 2022, 8:42 p.m. UTC | #1
On 06/02/2022 11:41, Giulio Benetti wrote:
> Nios2 ld emits warnings like:
> '
> /home/buildroot/autobuild/instance-2/output-1/host/opt/ext-toolchain/bin/../lib/gcc/nios2-linux-gnu/7.3.1/../../../../nios2-linux-gnu/bin/ld: FDE encoding in /home/buildroot/autobuild/instance-2/output-1/host/opt/ext-toolchain/bin/../lib/gcc/nios2-linux-gnu/7.3.1/libgcc.a(_umoddi3.o)(.eh_frame) prevents .eh_frame_hdr table being created.
> '
> Since '-Wl,--fatal-warnings' is passed by default, build fails, so don't
> treat warnings as errors by appending "-Wl,--no-fatal-warnings" to
> SYSTEMD_LDFLAGS the same way I've done for Microblaze in commit:
> https://git.buildroot.net/buildroot/commit/?id=cc53d5357d84ff9b78d76e45ce216061df8a37c1
> 
> Fixes:
> http://autobuild.buildroot.net/results/5fc884e11e46ab165ea21c8e8f2901516d79ff80/
> 
> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>

  Applied to master, thanks.

  Regards,
  Arnout

> ---
> V1->V2:
> * renamed BR2_nios to BR2_nios2
> ---
>   package/systemd/systemd.mk | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
> index 5626b54e8e..b07fac27d4 100644
> --- a/package/systemd/systemd.mk
> +++ b/package/systemd/systemd.mk
> @@ -90,6 +90,11 @@ SYSTEMD_CONF_OPTS += \
>   	-Dumount-path=/usr/bin/umount \
>   	-Dutmp=false
>   
> +ifeq ($(BR2_nios2),y)
> +# Nios2 ld emits warnings, make warnings not to be treated as errors
> +SYSTEMD_LDFLAGS = $(TARGET_LDFLAGS) -Wl,--no-fatal-warnings
> +endif
> +
>   ifeq ($(BR2_PACKAGE_ACL),y)
>   SYSTEMD_DEPENDENCIES += acl
>   SYSTEMD_CONF_OPTS += -Dacl=true
diff mbox series

Patch

diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
index 5626b54e8e..b07fac27d4 100644
--- a/package/systemd/systemd.mk
+++ b/package/systemd/systemd.mk
@@ -90,6 +90,11 @@  SYSTEMD_CONF_OPTS += \
 	-Dumount-path=/usr/bin/umount \
 	-Dutmp=false
 
+ifeq ($(BR2_nios2),y)
+# Nios2 ld emits warnings, make warnings not to be treated as errors
+SYSTEMD_LDFLAGS = $(TARGET_LDFLAGS) -Wl,--no-fatal-warnings
+endif
+
 ifeq ($(BR2_PACKAGE_ACL),y)
 SYSTEMD_DEPENDENCIES += acl
 SYSTEMD_CONF_OPTS += -Dacl=true