diff options
author | Jani Välimaa <wally@mageia.org> | 2020-05-21 13:12:20 +0300 |
---|---|---|
committer | Jani Välimaa <wally@mageia.org> | 2020-05-21 13:12:20 +0300 |
commit | 0d75d27d98117e9d5c799b39b0f8aad0cdf69735 (patch) | |
tree | 00a70210fd3e0e8d8b742b84c006aefca1e4a943 | |
parent | 05a9a6455465ab7da58e37d9d5832ff2eb1c57a0 (diff) | |
download | rpm-setup-0d75d27d98117e9d5c799b39b0f8aad0cdf69735.tar rpm-setup-0d75d27d98117e9d5c799b39b0f8aad0cdf69735.tar.gz rpm-setup-0d75d27d98117e9d5c799b39b0f8aad0cdf69735.tar.bz2 rpm-setup-0d75d27d98117e9d5c799b39b0f8aad0cdf69735.tar.xz rpm-setup-0d75d27d98117e9d5c799b39b0f8aad0cdf69735.zip |
build macros: add _legacy_common_support macro for adding -fcommon to compiler flags
Since version 10, gcc defaults to '-fno-common':
https://gcc.gnu.org/gcc-10/porting_to.html#common
Builds may fail with 'multiple definition of ...' errors. As a short term
workaround for such failure, it is possible to add '-fcommon' to the flags
by defining '%_legacy_common_support'.
%define _legacy_common_support 1
Properly fixing the failure is always preferred!
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | build.macros.in | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -1,4 +1,4 @@ - +- build macros: add _legacy_common_support macro for adding -fcommon to compiler flags - build.macros: run /usr/lib/rpm/check-buildroot at end of %install scriptlet via __arch_install_post diff --git a/build.macros.in b/build.macros.in index 07f4364..7a15019 100644 --- a/build.macros.in +++ b/build.macros.in @@ -192,7 +192,7 @@ GCONF_CONFIG_SOURCE=`%{_gconftool_bin} --get-default-source` %{_gconftool_bin} - %Werror_cflags -Wformat -Werror=format-security %_ssp_cflags -fstack-protector --param=ssp-buffer-size=4%{?_serverbuild_flags: %_serverbuild_flags} -%__common_cflags -O2 %{debugcflags} -pipe %{Werror_cflags} %{?_fortify_cflags} +%__common_cflags -O2 %{debugcflags} -pipe %{Werror_cflags} %{?_fortify_cflags}%{?_legacy_common_support: -fcommon} %__common_cflags_with_ssp %{__common_cflags} %{?_ssp_cflags} # Servers opt flags. |