mirror of
https://abf.rosa.ru/djam/libreoffice.git
synced 2025-02-23 10:32:59 +00:00
w/a combinations of incompatible clang++ args, try to avoid overlinkg
This commit is contained in:
parent
235b2b6468
commit
1b2077412c
1 changed files with 10 additions and 4 deletions
|
@ -49,7 +49,7 @@ Summary: Office suite
|
|||
Name: libreoffice
|
||||
Epoch: 1
|
||||
Version: 6.3.5
|
||||
Release: 5
|
||||
Release: 6
|
||||
License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and Artistic
|
||||
Group: Office
|
||||
Url: http://www.libreoffice.org
|
||||
|
@ -2962,9 +2962,15 @@ export CCACHE_DIR=%{ccachedir}
|
|||
%endif
|
||||
|
||||
%if %{with clang}
|
||||
%global optflags $(echo %{optflags} | sed -e 's/-fvar-tracking-assignments//g' -e 's/-frecord-gcc-switches//g' -e 's/-ffat-lto-objects//g')
|
||||
%global optflags %{optflags} -stdlib=libc++ -nostdinc++ -I/usr/include/c++/v1
|
||||
%global ldflags %{ldflags} -stdlib=libc++ -nostdinc++ -lc++ -lc++abi
|
||||
%setup_compile_flags
|
||||
# libstdc++ from gcc5 is too old, use LLVM libc++
|
||||
# https://libcxx.llvm.org/docs/UsingLibcxx.html
|
||||
# clang -c -stdlib=libc++ ->
|
||||
# -> "argument unused during compilation: '-stdlib=libc++'" ->
|
||||
# -> -Wno-unused-command-line-argument
|
||||
export CXXFLAGS="$CXXFLAGS -stdlib=libc++ -nostdinc++ -I/usr/include/c++/v1 -Wno-unused-command-line-argument"
|
||||
# Try to avoid overlinkg C code with libc++ by adjusting CXXFLAGS instead of LDFLAGS
|
||||
export CXXFLAGS="$CXXFLAGS -Xlinker -lc++ -Xlinker -lc++abi"
|
||||
%clang_gcc_wrapper
|
||||
export CPP=""
|
||||
%else
|
||||
|
|
Loading…
Add table
Reference in a new issue