summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2019-01-08 07:04:12 (GMT)
committerDongHun Kwak <dh0128.kwak@samsung.com>2019-01-08 08:11:46 (GMT)
commit60afb21148a76cbba976218941bd07544ad6b6f9 (patch)
treee295f51d1a957bd15a95ea4ed6c4505962015bcd
parent19bc0ae04846b66e010064545c66a1b6f1a042ac (diff)
downloadboost-60afb21148a76cbba976218941bd07544ad6b6f9.zip
boost-60afb21148a76cbba976218941bd07544ad6b6f9.tar.gz
boost-60afb21148a76cbba976218941bd07544ad6b6f9.tar.bz2
- add "-O2", "-Wp,-D_FORTIFY_SOURCE=2", "-Wl,-z,relro", "-fstack-protector-strong" options Change-Id: I9133f324ee3a180a5a4a58219d82d7243f91a4e7 Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
-rw-r--r--packaging/boost.spec10
-rw-r--r--tools/build/src/tools/gcc.jam10
2 files changed, 14 insertions, 6 deletions
diff --git a/packaging/boost.spec b/packaging/boost.spec
index 13fd083..1b21300 100644
--- a/packaging/boost.spec
+++ b/packaging/boost.spec
@@ -70,7 +70,7 @@ Summary: Boost C++ Libraries
License: BSL-1.0
Group: Base/Libraries
Version: 1.58.0
-Release: 0
+Release: 1
Source0: %{name}_%{file_version}.tar.bz2
Source1: boost-rpmlintrc
Source4: existing_extra_docs
@@ -375,6 +375,7 @@ cat << \EOF >.build
# Now build it
J_P=%{jobs}
J_G=$(getconf _NPROCESSORS_ONLN)
+JOBS=${JOBS-$J_P}
[ $J_G -gt 64 ] && J_G=64
if test -z "$JOBS"; then
@@ -435,11 +436,8 @@ using mpi ;
EOF
%endif
-# perform the compilation
./b2 %{?_smp_mflags} --prefix=%{_prefix} --libdir=%{_libdir} \
- --user-config=./user-config.jam ${CFLAGS:+cflags="$CFLAGS"} \
- ${CXXFLAGS:+cxxflags="$CXXFLAGS"} ${LDFLAGS:+linkflags="$LDFLAGS"}
-
+ --user-config=./user-config.jam toolset=gcc debug-symbols=on
%if %build_docs
cd doc
@@ -464,7 +462,7 @@ BOOST_LIBS="chrono,program_options,thread,system,filesystem,date_time,regex,seri
. /var/mpi-selector/data/$(rpm --qf "%{NAME}-%{VERSION}" -q openmpi).sh
%endif
-./b2 install \
+./b2 install %{?_smp_mflags} \
--prefix=%{buildroot}%{_prefix} --exec-prefix=%{buildroot}%{_bindir} \
--libdir=%{buildroot}%{_libdir} --includedir=%{buildroot}%{_includedir} \
--user-config=./user-config.jam
diff --git a/tools/build/src/tools/gcc.jam b/tools/build/src/tools/gcc.jam
index 968f695..6639c92 100644
--- a/tools/build/src/tools/gcc.jam
+++ b/tools/build/src/tools/gcc.jam
@@ -385,6 +385,12 @@ toolset.flags gcc.compile OPTIONS <profiling>on : -pg ;
toolset.flags gcc.compile.c++ OPTIONS <rtti>off : -fno-rtti ;
toolset.flags gcc.compile.c++ OPTIONS <exception-handling>off : -fno-exceptions ;
+# Tizen Opention
+toolset.flags gcc.compile OPTIONS : -O2 ;
+toolset.flags gcc.compile OPTIONS : -Wp,-D_FORTIFY_SOURCE=2 ;
+toolset.flags gcc.compile OPTIONS : -Wl,-z,relro ;
+toolset.flags gcc.compile OPTIONS : -fstack-protector-strong ;
+
rule setup-fpic ( targets * : sources * : properties * )
{
local link = [ feature.get-values link : $(properties) ] ;
@@ -748,6 +754,10 @@ generators.override gcc.cygwin.link.dll : gcc.link.dll ;
# First, the common flags.
toolset.flags gcc.link OPTIONS <debug-symbols>on : -g ;
toolset.flags gcc.link OPTIONS <profiling>on : -pg ;
+
+# Tizen Opention
+toolset.flags gcc.link OPTIONS : -Wl,-z,relro ;
+
toolset.flags gcc.link USER_OPTIONS <linkflags> ;
toolset.flags gcc.link LINKPATH <library-path> ;
toolset.flags gcc.link FINDLIBS-ST <find-static-library> ;