Mailing List Archive

[PATCH] pimd: properly declare pimd version
gcc-10 has changed the default of -fcommon to -fno-common which now
flags some long existing issues.
See https://gcc.gnu.org/gcc-10/porting_to.html

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
---
pimd/pim_version.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pimd/pim_version.h b/pimd/pim_version.h
index ef9f370c..891d4314 100644
--- a/pimd/pim_version.h
+++ b/pimd/pim_version.h
@@ -25,6 +25,6 @@

#define PIMD_VERSION_STR "0.166"

-const char * const PIMD_VERSION;
+extern const char * const PIMD_VERSION;

#endif /* PIM_VERSION_H */
--
2.28.0

_______________________________________________
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-dev
Re: [PATCH] pimd: properly declare pimd version [ In reply to ]
On Fri, Oct 2, 2020 at 9:50 AM Christian Ehrhardt
<christian.ehrhardt@canonical.com> wrote:
>
> gcc-10 has changed the default of -fcommon to -fno-common which now
> flags some long existing issues.
> See https://gcc.gnu.org/gcc-10/porting_to.html

FYI - I found even more of this kind of issues, like
bgp_zebra.c 46 struct zclient *zclient = NULL;
isis_zebra.c 53 struct zclient *zclient = NULL;

Linked together failing as:
libtool: link: gcc -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=.
-fstack-protector-strong -Wformat -Werror=format-security
-Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,now -o
.libs/testbgpmpath bgp_mpath_test.o ../bgpd/libbgp.a
../lib/.libs/libzebra.so -lcap -lm -lcrypt -lrt -Wl,-rpath
-Wl,/usr/lib/quagga
/usr/bin/ld: ../bgpd/libbgp.a(bgp_zebra.o):./bgpd/bgp_zebra.c:46:
multiple definition of `zclient';
bgp_mpath_test.o:./tests/bgp_mpath_test.c:76: first defined here

I'll for now set it back to -fcommon which makes it work as well, but
it would be great if someone would try to un-break all the remaining
bad definitions.

> Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
> ---
> pimd/pim_version.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/pimd/pim_version.h b/pimd/pim_version.h
> index ef9f370c..891d4314 100644
> --- a/pimd/pim_version.h
> +++ b/pimd/pim_version.h
> @@ -25,6 +25,6 @@
>
> #define PIMD_VERSION_STR "0.166"
>
> -const char * const PIMD_VERSION;
> +extern const char * const PIMD_VERSION;
>
> #endif /* PIM_VERSION_H */
> --
> 2.28.0
>


--
Christian Ehrhardt
Staff Engineer, Ubuntu Server
Canonical Ltd
_______________________________________________
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-dev