On Thu, 2019-02-07 at 00:45 +0100, Miro Hrončok wrote:
On 06. 02. 19 22:16, Tadej Janež wrote:
I've also found that one of my packages was settings CFLAGS to %{optflags} and fixed it: https://src.fedoraproject.org/rpms/bup/c/e960755aa88e1dcf84463faa66c9806a350...
Nope, you've actually unfixed that.
Fedora packages should use %{build_cflags} (historically available as %{optflags}). They should also use %{build_ldflags}.
Fedora packages should not use %{extension_cflags} or %{extension_ldlags}.
Huh, I must have read the Change proposal too quickly. Thanks for pointing out my mistake.
I've fixed it: https://src.fedoraproject.org/rpms/bup/c/d2ea14f13fb034edfef46c4b97b23c6ef3a...
Regarding %{build_ldflags}, I tried setting them via environment variable: %make_build CFLAGS="%{build_cflags}" LDFLAGS="%{build_ldflags}"
However, bup's configure script appears to think they are bogus and reports:
ignoring bogus LDFLAGS="-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld"
Here is the source code of that configure check: https://github.com/bup/bup/blob/0.29.2/config/configure.inc#L494-L504
I'm afraid I don't know what's the problem here.
Regards, Tadej