diff --git a/chromium-browser-stable.spec b/chromium-browser-stable.spec index 444f519..6e15ed6 100644 --- a/chromium-browser-stable.spec +++ b/chromium-browser-stable.spec @@ -154,6 +154,8 @@ BuildRequires: libcxx-devel BuildRequires: libcxxabi-devel BuildRequires: lld %endif +# for gn, not chromium itself +BuildRequires: stdc++-gcc10-devel # gn needs these BuildRequires: flex %if %{with bundled_llvm} @@ -576,6 +578,16 @@ CXXFLAGS="$CXXFLAGS -Wno-error=attributes -Wno-error=comment -Wno-error=unused-v %endif export PYTHON=%{__python} +# libstdc++ in rosa2016.1 is too old to build gn, there are 2 ways to solve this: +# 1) run bootstrap.py with --use-custom-libcxx, it will build and use bundled libc++ +# 2) use libstdc++-gcc10 (https://forum.rosalinux.ru/viewtopic.php?t=10047&p=104560) +# Let's choose option 2. +LDFLAGS="-lstdc++-gcc10" \ +CXXFLAGS="-nostdinc++ \ + -Wno-unused-command-line-argument \ + -I%{_includedir}/libstdc++-gcc10 \ + -I%{_includedir}/libstdc++-gcc10/%{_host} \ + " \ %{__python} tools/gn/bootstrap/bootstrap.py --gn-gen-args='%{gn_config}' out/Release/gn gen --script-executable=%{__python} --args='%{gn_config}' out/Release