From: Jan Kratochvil Date: Sun, 2 Aug 2020 19:49:50 +0000 (+0200) Subject: Fix removal of: -fcommon X-Git-Url: https://git.jankratochvil.net/?p=massrebuild.git;a=commitdiff_plain;h=021cd83bb277640e708031ee54ba7c902dfa7713 Fix removal of: -fcommon --- diff --git a/redhat-rpm-config.patch b/redhat-rpm-config.patch new file mode 100644 index 0000000..911ab20 --- /dev/null +++ b/redhat-rpm-config.patch @@ -0,0 +1,26 @@ +diff --git a/macros b/macros +index 858cac1..b47ff0a 100644 +--- a/macros ++++ b/macros +@@ -332,7 +332,7 @@ print(result) + %_clang_lto_cflags -flto + %_lto_cflags %{expand:%%{_%{toolchain}_lto_cflags}} + +-%_general_options -O2 %{?_lto_cflags} -fexceptions -g -grecord-gcc-switches -pipe ++%_general_options -O2 %{?_lto_cflags} -fexceptions -g -fdebug-types-section -grecord-gcc-switches -pipe + %_warning_options -Wall -Werror=format-security + %_preprocessor_defines -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS + +diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec +index 058a8bf..a86bb30 100644 +--- a/redhat-rpm-config.spec ++++ b/redhat-rpm-config.spec +@@ -7,7 +7,7 @@ + Summary: Red Hat specific rpm configuration files + Name: redhat-rpm-config + Version: 166 +-Release: 1%{?dist} ++Release: 2types%{?dist} + # No version specified. + License: GPL+ + URL: https://src.fedoraproject.org/rpms/redhat-rpm-config diff --git a/runone b/runone index 022d0e5..a31325e 100755 --- a/runone +++ b/runone @@ -31,7 +31,8 @@ for pkg in "$@";do continue fi (echo '%global _find_debuginfo_dwz_opts %{nil}' - echo '%global optflags %(echo %{optflags}|sed "s/ -g / -g -fdebug-types-section /")' +# It removes -fcommon, use redhat-rpm-config.patch instead. +# echo '%global optflags %(echo %{optflags}|sed "s/ -g / -g -fdebug-types-section /")' sed 's/^%\(\(define\|global\) *_find_debuginfo_dwz_opts\)/\1/' ) <$name.spec >$name.spec.new cp -p $name.spec ../$srcrpm.spec @@ -56,7 +57,7 @@ for pkg in "$@";do test ! -e $resultdir set +e # --chain instead of --rebuild as otherwise -a does not work - $mock --resultdir=$resultdir --nocheck $(: -a https://people.redhat.com/jkratoch/dwzrepo/ ) --chain $srcrpm$ext &>$srcrpm$ext.mocklog + $mock --resultdir=$resultdir --nocheck $(if [ -n "$ext" ];then echo -a https://www.jankratochvil.net/t/rpmdts/;fi) --chain $srcrpm$ext &>$srcrpm$ext.mocklog mockrc=$? set -e test -e $resultdir