Use set_build_flags and -fno-semantic-interposition

see https://github.com/SELinuxProject/selinux/blob/master/README.md

CFLAGS that are encouraged to be set when overriding are:

  -fno-semantic-interposition for gcc or compilers that do not do this.
This commit is contained in:
Petr Lautrbach 2020-07-21 18:42:12 +02:00
parent 8f242926e6
commit cdfab80e4f
1 changed files with 4 additions and 2 deletions

View File

@ -55,8 +55,9 @@ sed -i 's/fpic/fPIC/g' src/Makefile
%endif
%build
make clean
%make_build CFLAGS="%{optflags}" LDFLAGS="%{?__global_ldflags}"
%set_build_flags
CFLAGS="$CFLAGS -fno-semantic-interposition"
%make_build
%install
mkdir -p ${RPM_BUILD_ROOT}/%{_lib}
@ -99,6 +100,7 @@ exit 0
* Mon Jul 13 2020 Tom Stellard <tstellar@redhat.com> - 3.1-2
- Use make macros
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
- Use set_build_flags and -fno-semantic-interposition
* Fri Jul 10 2020 Petr Lautrbach <plautrba@redhat.com> - 3.1-1
- SELinux userspace 3.1 release