forked from pool/cmake
Accepting request 404888 from home:pluskalm:branches:devel:tools:building
Lets try PIE (as already discussed with scarabeus) OBS-URL: https://build.opensuse.org/request/show/404888 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/cmake?expand=0&rev=252
This commit is contained in:
parent
6e944f71b6
commit
ad02e4d23b
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Jun 26 21:20:16 UTC 2016 - mpluskal@suse.com
|
||||
|
||||
- Update cmake.macros to enable PIE by default
|
||||
- Build with more secure LDFLAGS
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Apr 16 12:57:14 UTC 2016 - astieger@suse.com
|
||||
|
||||
|
@ -81,8 +81,9 @@ echo "`grep cmake-%{version}.tar.gz %{SOURCE5} | grep -Eo '^[0-9a-f]+'` %{SOURC
|
||||
|
||||
%build
|
||||
EXTRA_FLAGS="--qt-gui"
|
||||
export CXXFLAGS="%{optflags}"
|
||||
export CFLAGS="$CXXFLAGS"
|
||||
export CXXFLAGS="%{optflags} -fPIE"
|
||||
export CFLAGS="%{optflags} -fPIE"
|
||||
export LDFLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now -pie"
|
||||
# FIXME: you should use the %%configure macro
|
||||
./configure \
|
||||
--prefix=%{_prefix} \
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Jun 26 21:19:14 UTC 2016 - mpluskal@suse.com
|
||||
|
||||
- Update cmake.macros to enable PIE by default
|
||||
- Build with more secure LDFLAGS
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 10 02:15:47 UTC 2016 - sflees@suse.de
|
||||
|
||||
|
12
cmake.macros
12
cmake.macros
@ -18,12 +18,12 @@
|
||||
-DSHARE_INSTALL_PREFIX:PATH=%{_datadir} \\\
|
||||
-DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} \\\
|
||||
-DCMAKE_BUILD_TYPE=None \\\
|
||||
-DCMAKE_C_FLAGS="${CFLAGS:-%optflags} -DNDEBUG" \\\
|
||||
-DCMAKE_CXX_FLAGS="${CXXFLAGS:-%optflags} -DNDEBUG" \\\
|
||||
-DCMAKE_Fortran_FLAGS="${FFLAGS:-%optflags%{?_fmoddir: -I%_fmoddir}} -DNDEBUG" \\\
|
||||
-DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now" \\\
|
||||
-DCMAKE_MODULE_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now" \\\
|
||||
-DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now" \\\
|
||||
-DCMAKE_C_FLAGS="${CFLAGS:-%optflags} -fPIE -DNDEBUG" \\\
|
||||
-DCMAKE_CXX_FLAGS="${CXXFLAGS:-%optflags} -fPIE -DNDEBUG" \\\
|
||||
-DCMAKE_Fortran_FLAGS="${FFLAGS:-%optflags%{?_fmoddir: -I%_fmoddir}} -fPIE -DNDEBUG" \\\
|
||||
-DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now -pie" \\\
|
||||
-DCMAKE_MODULE_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now -pie" \\\
|
||||
-DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now -pie" \\\
|
||||
%if "%{?_lib}" == "lib64" \
|
||||
-DLIB_SUFFIX=64 \\\
|
||||
%endif \
|
||||
|
@ -75,8 +75,9 @@ echo "`grep %{name}-%{version}.tar.gz %{SOURCE5} | grep -Eo '^[0-9a-f]+'` %{SOU
|
||||
%patch7 -p1
|
||||
|
||||
%build
|
||||
export CXXFLAGS="%{optflags}"
|
||||
export CFLAGS="%{optflags}"
|
||||
export CXXFLAGS="%{optflags} -fPIE"
|
||||
export CFLAGS="%{optflags} -fPIE"
|
||||
export LDFLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now -pie"
|
||||
# FIXME: you should use the %%configure macro
|
||||
./configure \
|
||||
--prefix=%{_prefix} \
|
||||
|
Loading…
Reference in New Issue
Block a user