* Denis Fateyev:
For example, "libscrypt" package issue is filled here:
https://bugzilla.redhat.com/show_bug.cgi?id=2046062
The library in the package was actually built, but the build results are different under
various GCC versions — as shown in the "nm" dump below.
Has anybody already faced a similar issue? Is there any information on
what could cause the problem, and how to fix it?
The upstream makefile uses:
CFLAGS?=-O2 -Wall -g -D_FORTIFY_SOURCE=2 -fstack-protector -fPIC
LDFLAGS?=-Wl,-z,now -Wl,-z,relro -Wl,-soname,libscrypt.so.0
-Wl,--version-script=libscrypt.version
Due to this change
%set_build_flags for %build, %check, and %install phases
<
https://fedoraproject.org/wiki/Changes/SetBuildFlagsBuildCheck>
CLFAGS and LDFLAGS are now set by Fedora, effectively dropping the
package-specific -Wl,-z,relro -Wl,-soname,libscrypt.so.0
-Wl,--version-script=libscrypt.version flags.
If you add
LDFLAGS="$LDFLAGS -Wl,-z,relro -Wl,-soname,libscrypt.so.0
-Wl,--version-script=libscrypt.version"
to %build before the make invocation, it should get things to work as
before. Or perhaps patch the upstream makefile, so that you get a patch
application failure if the upstream flag defaults change:
-LDFLAGS?=-Wl,-z,now -Wl,-z,relro -Wl,-soname,libscrypt.so.0
-Wl,--version-script=libscrypt.version
+LDFLAGS += -Wl,-soname,libscrypt.so.0 -Wl,--version-script=libscrypt.version
Thanks,
Florian