NetworkManager/libnm-core
Beniamino Galvani d2d6a68697 build: use -fcommon when building libnm-core
Building with GCC 10 gives the following error:

 multiple definition of_nm_jansson_json_object_iter_key';
 libnm/.libs/liblibnm.a(libnm_core_la-nm-json.o):/builddir/build/BUILD/NetworkManager-1.23.1/libnm-core/nm-json.c:24: first defined here /usr/bin/ld:
 libnm/.libs/liblibnm.a(libnm_core_la-nm-team-utils.o):/usr/include/jansson.h:202: multiple definition of _nm_jansson_json_object_iter';

This happens because GCC 10 defaults to -fno-common and so multiple
definitions of the same global variable are not merged together.

_nm_jansson_json_* symbols are defined in nm-json.c as void pointers
and, due to the following macros in nm-json.h:

 #define json_object_iter_next   (*_nm_jansson_json_object_iter_next)
 ...

the function declaration in jansson.h:

 void *json_object_iter_next(json_t *object, void *iter);

becomes a global variable as well:

 void *(*_nm_jansson_json_object_iter_next)(json_t *object, void *iter);

So, the symbol is present in nm-json.o and all other object files that
include nm-json.h, and -fcommon is required. Without it, it would be
necessary to define the symbols only in one place (for example,
nm-json.c), but then static inline functions from the jannson.h header
would still refer to the original (missing) jansson functions.

For the moment, just use -fcommon.
2020-02-03 10:53:33 +01:00
..
tests shared: add NM_IP_ADDR_ZERO macro for initializing NMIPAddr to zero 2020-01-28 11:17:41 +01:00
meson.build build: use -fcommon when building libnm-core 2020-02-03 10:53:33 +01:00
nm-connection-private.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-connection.c all: use _nm_utils_inet4_ntop() instead of nm_utils_inet4_ntop() 2020-01-28 11:17:41 +01:00
nm-connection.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-core-enum-types.c.template libnm-core: add ovs-dpdk setting 2019-06-14 12:10:20 +02:00
nm-core-enum-types.h.template build: use template files for enum types' sources generation 2017-12-18 11:25:06 +01:00
nm-core-internal.h shared: move nm_utils_inet* helpers from libnm-core to shared 2020-01-28 11:17:41 +01:00
nm-core-types-internal.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-core-types.h libnm-core,cli: add VRF setting 2020-01-14 09:49:01 +01:00
nm-crypto-gnutls.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-crypto-impl.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-crypto-nss.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-crypto.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-crypto.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-dbus-interface.h core,libnm: add VRF support 2020-01-14 09:51:56 +01:00
nm-dbus-utils.c libnm: drop unused _nm_dbus_proxy_call_sync() helper 2019-12-03 16:32:08 +01:00
nm-errors.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-errors.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-json.c libnm/license: relicense "libnm-core/nm-json.[hc]" under LGPL-2.1+ 2019-11-06 17:30:25 +01:00
nm-json.h libnm/license: relicense "libnm-core/nm-json.[hc]" under LGPL-2.1+ 2019-11-06 17:30:25 +01:00
nm-property-compare.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-property-compare.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-6lowpan.c libnm: don't have G_PARAM_CONSTRUCT properties in NMSetting instances 2019-12-24 07:47:50 +01:00
nm-setting-6lowpan.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-8021x.c libnm: don't have G_PARAM_CONSTRUCT properties in NMSetting instances 2019-12-24 07:47:50 +01:00
nm-setting-8021x.h all: add 802-1x.optional property 2019-10-15 08:34:31 +02:00
nm-setting-adsl.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-adsl.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-bluetooth.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-bluetooth.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-bond.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-bond.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-bridge-port.c libnm: don't have G_PARAM_CONSTRUCT properties in NMSetting instances 2019-12-24 07:47:50 +01:00
nm-setting-bridge-port.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-bridge.c libnm: don't have G_PARAM_CONSTRUCT properties in NMSetting instances 2019-12-24 07:47:50 +01:00
nm-setting-bridge.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-cdma.c libnm: don't have G_PARAM_CONSTRUCT properties in NMSetting instances 2019-12-24 07:47:50 +01:00
nm-setting-cdma.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-connection.c libnm: don't have G_PARAM_CONSTRUCT properties in NMSetting instances 2019-12-24 07:47:50 +01:00
nm-setting-connection.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-dcb.c libnm: don't have G_PARAM_CONSTRUCT properties in NMSetting instances 2019-12-24 07:47:50 +01:00
nm-setting-dcb.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-dummy.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-dummy.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-ethtool.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-ethtool.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-generic.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-generic.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-gsm.c libnm: don't have G_PARAM_CONSTRUCT properties in NMSetting instances 2019-12-24 07:47:50 +01:00
nm-setting-gsm.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-infiniband.c libnm: don't have G_PARAM_CONSTRUCT properties in NMSetting instances 2019-12-24 07:47:50 +01:00
nm-setting-infiniband.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-ip-config.c all: use nm_utils_ipaddr_is_valid() instead of nm_utils_ipaddr_valid() 2020-01-28 11:17:41 +01:00
nm-setting-ip-config.h libnm/docs: fix gtk-doc for #NMDhcpHostnameFlags 2019-12-09 07:49:16 +01:00
nm-setting-ip-tunnel.c all: use nm_utils_ipaddr_is_valid() instead of nm_utils_ipaddr_valid() 2020-01-28 11:17:41 +01:00
nm-setting-ip-tunnel.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-ip4-config.c ifcfg-rh: add support for DHCP hostname flags 2019-11-28 17:56:35 +01:00
nm-setting-ip4-config.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-ip6-config.c all: use _nm_utils_inet4_ntop() instead of nm_utils_inet4_ntop() 2020-01-28 11:17:41 +01:00
nm-setting-ip6-config.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-macsec.c libnm: don't have G_PARAM_CONSTRUCT properties in NMSetting instances 2019-12-24 07:47:50 +01:00
nm-setting-macsec.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-macvlan.c libnm: don't have G_PARAM_CONSTRUCT properties in NMSetting instances 2019-12-24 07:47:50 +01:00
nm-setting-macvlan.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-match.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-match.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-olpc-mesh.c libnm: don't have G_PARAM_CONSTRUCT properties in NMSetting instances 2019-12-24 07:47:50 +01:00
nm-setting-olpc-mesh.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-ovs-bridge.c libnm: don't have G_PARAM_CONSTRUCT properties in NMSetting instances 2019-12-24 07:47:50 +01:00
nm-setting-ovs-bridge.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-ovs-dpdk.c libnm: don't have G_PARAM_CONSTRUCT properties in NMSetting instances 2019-12-24 07:47:50 +01:00
nm-setting-ovs-dpdk.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-ovs-interface.c libnm: don't have G_PARAM_CONSTRUCT properties in NMSetting instances 2019-12-24 07:47:50 +01:00
nm-setting-ovs-interface.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-ovs-patch.c all: use nm_utils_ipaddr_is_valid() instead of nm_utils_ipaddr_valid() 2020-01-28 11:17:41 +01:00
nm-setting-ovs-patch.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-ovs-port.c libnm: don't have G_PARAM_CONSTRUCT properties in NMSetting instances 2019-12-24 07:47:50 +01:00
nm-setting-ovs-port.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-ppp.c libnm: don't have G_PARAM_CONSTRUCT properties in NMSetting instances 2019-12-24 07:47:50 +01:00
nm-setting-ppp.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-pppoe.c libnm: don't have G_PARAM_CONSTRUCT properties in NMSetting instances 2019-12-24 07:47:50 +01:00
nm-setting-pppoe.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-private.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-proxy.c libnm/proxy: use int type for proxy.method property 2019-12-24 07:48:35 +01:00
nm-setting-proxy.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-serial.c libnm: don't have G_PARAM_CONSTRUCT properties in NMSetting instances 2019-12-24 07:47:50 +01:00
nm-setting-serial.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-sriov.c libnm: don't have G_PARAM_CONSTRUCT properties in NMSetting instances 2019-12-24 07:47:50 +01:00
nm-setting-sriov.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-tc-config.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-tc-config.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-team-port.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-team-port.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-team.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-team.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-tun.c libnm: don't have G_PARAM_CONSTRUCT properties in NMSetting instances 2019-12-24 07:47:50 +01:00
nm-setting-tun.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-user.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-user.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-vlan.c libnm: don't have G_PARAM_CONSTRUCT properties in NMSetting instances 2019-12-24 07:47:50 +01:00
nm-setting-vlan.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-vpn.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-vpn.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-vrf.c libnm-core,cli: add VRF setting 2020-01-14 09:49:01 +01:00
nm-setting-vrf.h libnm-core,cli: add VRF setting 2020-01-14 09:49:01 +01:00
nm-setting-vxlan.c all: use nm_utils_ipaddr_is_valid() instead of nm_utils_ipaddr_valid() 2020-01-28 11:17:41 +01:00
nm-setting-vxlan.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-wifi-p2p.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-wifi-p2p.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-wimax.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-wimax.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-wired.c libnm: don't have G_PARAM_CONSTRUCT properties in NMSetting instances 2019-12-24 07:47:50 +01:00
nm-setting-wired.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-wireguard.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-wireguard.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-wireless-security.c libnm: don't have G_PARAM_CONSTRUCT properties in NMSetting instances 2019-12-24 07:47:50 +01:00
nm-setting-wireless-security.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-wireless.c libnm: don't have G_PARAM_CONSTRUCT properties in NMSetting instances 2019-12-24 07:47:50 +01:00
nm-setting-wireless.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-wpan.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-wpan.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting.c libnm-core,cli: add VRF setting 2020-01-14 09:49:01 +01:00
nm-setting.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-simple-connection.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-simple-connection.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-team-utils.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-team-utils.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-utils-private.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-utils.c libnm: use nm_utils_ipaddr_is_valid() to implement nm_utils_ipaddr_valid() 2020-01-28 11:17:41 +01:00
nm-utils.h libnm/utils: add OWE security type 2019-12-05 14:00:10 +01:00
nm-version.h release: bump version to 1.23.0 (development) 2019-11-29 15:46:22 +01:00
nm-vpn-dbus-interface.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-vpn-editor-plugin.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-vpn-editor-plugin.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-vpn-plugin-info.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-vpn-plugin-info.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00