Skip to contentSkip to conversation

nagios-core: fix build failure for gcc-10

PATCH In review Chen Qi 2 participants 2 messages Sep 1, 2020 – Sep 2, 2020

lore
Share & tools
lore

Chen Qi

author
#0 lore raw

PATCH 1/1 nagios-core: fix build failure for gcc-10

gcc-10 uses '-fno-common' by default, which results in build error complaining multiple definition.

Use '-fcommon' to fix this problem.

---
 recipes-extended/nagios/nagios-core_4.4.3.bb | 3 +++
 1 file changed, 3 insertions(+)
recipes-extended/nagios/nagios-core_4.4.3.bb +3 -0
index 7a86653..c78259e 100644
@@ -62,6 +62,9 @@ EXTRA_OECONF += "ac_cv_header_ltdl_h=no"
 # Prevent nagios from suffering host contamination if host has /bin/perl
 EXTRA_OECONF += "ac_cv_path_PERL=${bindir}/perl"
 
+# Fix build failure for gcc-10
+CFLAGS_append = " -fcommon"
+
 # Set to "1" to allow nagios-core post-init to modify Apache configuration
 NAGIOS_MODIFY_APACHE ??= "1"
 
Signature · 1 line
2.21.0
#1 lore raw

merged

Bruce

Quoted 30 lines · Chen Qi

gcc-10 uses '-fno-common' by default, which results in build error complaining multiple definition.

Use '-fcommon' to fix this problem.

---
 recipes-extended/nagios/nagios-core_4.4.3.bb | 3 +++
 1 file changed, 3 insertions(+)
recipes-extended/nagios/nagios-core_4.4.3.bb +3 -1
index 7a86653..c78259e 100644
@@ -62,6 +62,9 @@ EXTRA_OECONF += "ac_cv_header_ltdl_h=no"
 # Prevent nagios from suffering host contamination if host has /bin/perl
 EXTRA_OECONF += "ac_cv_path_PERL=${bindir}/perl"
 
+# Fix build failure for gcc-10
+CFLAGS_append = " -fcommon"
+
 # Set to "1" to allow nagios-core post-init to modify Apache configuration
 NAGIOS_MODIFY_APACHE ??= "1"
 
--

2.21.0

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end
- "Use the force Harry" - Gandalf, Star Trek II