[packages/chromium-browser/DEVEL] pass compiler env to gyp, not make
glen
glen at pld-linux.org
Sat Jan 12 14:56:31 CET 2013
commit b4d752471d0c76debbf4e276f42d3ba76465552e
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sat Jan 12 15:52:37 2013 +0200
pass compiler env to gyp, not make
passing CC, CXX, CFLAGS, CXXFLAGS, LDFLAGS to gyp, so it has chance to
filter out unwanted -fstack-protector, etc
this way most of the build is with stack protector, but nacl parts,
filtered out (native_client/src/trusted/service_runtime/linux/nacl_bootstrap.gyp)
however seems still need to pass host flags, as v8 build uses different
vars for compilation.
chromium-browser.spec | 26 +++++++++-----------------
1 file changed, 9 insertions(+), 17 deletions(-)
---
diff --git a/chromium-browser.spec b/chromium-browser.spec
index d0a9222..3844314 100644
--- a/chromium-browser.spec
+++ b/chromium-browser.spec
@@ -34,16 +34,6 @@
%bcond_without tcmalloc # use tcmalloc
%bcond_without verbose # verbose build (V=1)
-%if %{with nacl}
-# temporary hack as seems this does not work: http://codereview.chromium.org/8890043
-# nacl_bootstrap.c:(.text.load_elf_file+0x707): undefined reference to `__stack_chk_fail'
-#14:08:04 @baggins> glen: yes, I added SSP in rpm5, add -lssp to link flags to fix it
-#14:19:42 @baggins> it doesn't hurt to add -lssp here and there, and we'll be a bit more secure
-#14:51:06 @baggins> as-needed will take care of unneeded lib
-#14:52:03 @baggins> -lssp comes with gcc
-%define _ssp_cflags %{nil}
-%endif
-
# TODO
# - check system sqlite linking problems
# - find system deps: find -name '*.gyp*' | xargs grep 'use_system.*=='
@@ -346,7 +336,13 @@ fi
%endif
test %{_specdir}/%{name}.spec -nt Makefile && %{__rm} -f Makefile
-test -e Makefile || %{__python} build/gyp_chromium \
+test -e Makefile || \
+ CC="%{__cc}" \
+ CXX="%{__cxx}" \
+ LDFLAGS="%{rpmldflags} -fuse-ld=gold" \
+ CFLAGS="%{rpmcflags} %{rpmcppflags}" \
+ CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
+%{__python} build/gyp_chromium \
--format=make \
-Goutput_dir=../out \
build/all.gyp \
@@ -417,17 +413,13 @@ test -e Makefile || %{__python} build/gyp_chromium \
-Dlinux_use_gold_binary=0 \
-Dlinux_use_gold_flags=0
+# need {CC/CXX/LDFLAGS}.host overrides for v8 build
%{__make} -r chrome %{?with_sandboxing:chrome_sandbox} \
BUILDTYPE=%{!?debug:Release}%{?debug:Debug} \
%{?with_verbose:V=1} \
- CC="%{__cc}" \
- CXX="%{__cxx}" \
- LDFLAGS="%{rpmldflags} -fuse-ld=gold" \
CC.host="%{__cc}" \
CXX.host="%{__cxx}" \
- LDFLAGS.host="%{rpmldflags}" \
- CFLAGS="%{rpmcflags} %{rpmcppflags}" \
- CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}"
+ LDFLAGS.host="%{rpmldflags} -fuse-ld=gold" \
%install
rm -rf $RPM_BUILD_ROOT
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/chromium-browser.git/commitdiff/b4d752471d0c76debbf4e276f42d3ba76465552e
More information about the pld-cvs-commit
mailing list