Skip to contentSkip to conversation

efivar: force shared libgcc for Nios II

PATCH New Erico Nunes 2 participants 2 messages Jun 28, 2016 – Jul 1, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 efivar: force shared libgcc for Nios II

efivar for Nios II also has to be linked with shared libgcc to avoid an error due to FDE encoding in static libgcc when linking libefiboot.so.

Fixes:
http://autobuild.buildroot.net/results/0c9/0c90e3e7ad41d21dd832f6f266af35fc19185170/

---
Changes v1 -> v2:
- simplified ifeq muliple arch logic (suggested by Thomas Petazzoni)

---
 package/efivar/efivar.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/efivar/efivar.mk +2 -2
index de48bc9..d3ca79b 100644
@@ -21,9 +21,9 @@ EFIVAR_MAKE_OPTS = \
 	BINTARGETS=efivar \
 	LDFLAGS="$(TARGET_LDFLAGS) -fPIC"
 
-# Explicitly linking with shared libgcc is required on MicroBlaze,
+# Explicitly linking with shared libgcc is required on MicroBlaze and Nios II,
 # otherwise it fails due to FDE encoding in static libgcc.
-ifeq ($(BR2_microblaze),y)
+ifeq ($(BR2_microblaze)$(BR2_nios2),y)
 EFIVAR_MAKE_OPTS += SOFLAGS="-shared -shared-libgcc"
 endif
 
Signature · 1 line
2.9.0
#1 lore raw

PATCH v2 1/1 efivar: force shared libgcc for Nios II

Hi Erico,

Le 28/06/2016 ? 21:25, Erico Nunes a ?crit :

Quoted 2 lines

efivar for Nios II also has to be linked with shared libgcc to avoid an error due to FDE encoding in static libgcc when linking libefiboot.so.

It seems the very same issue than for grantlee package which build with --fatal-warnings. This flag is added by gcc.specs file on non static build. See [1]

Usually we recommend to remove Werror or --fatal-warnings flags if it produce warnings with some toolchains.

[1] https://sourceware.org/bugzilla/show_bug.cgi?id=20173

Best regards,
Romain

Quoted 30 lines

Fixes:
http://autobuild.buildroot.net/results/0c9/0c90e3e7ad41d21dd832f6f266af35fc19185170/

---
Changes v1 -> v2:
- simplified ifeq muliple arch logic (suggested by Thomas Petazzoni)

---
 package/efivar/efivar.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/efivar/efivar.mk +2 -2
index de48bc9..d3ca79b 100644
@@ -21,9 +21,9 @@ EFIVAR_MAKE_OPTS = \
 	BINTARGETS=efivar \
 	LDFLAGS="$(TARGET_LDFLAGS) -fPIC"
 
-# Explicitly linking with shared libgcc is required on MicroBlaze,
+# Explicitly linking with shared libgcc is required on MicroBlaze and Nios II,
 # otherwise it fails due to FDE encoding in static libgcc.
-ifeq ($(BR2_microblaze),y)
+ifeq ($(BR2_microblaze)$(BR2_nios2),y)
 EFIVAR_MAKE_OPTS += SOFLAGS="-shared -shared-libgcc"
 endif