2019-08-03 12:06:11 +02:00
|
|
|
name: clang
|
|
|
|
version: 8.0.1
|
|
|
|
release: 1
|
2019-10-18 03:25:53 +02:00
|
|
|
sources:
|
|
|
|
- https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/cfe-%{version}.src.tar.xz
|
|
|
|
- labs.h
|
|
|
|
- clang
|
|
|
|
|
2019-08-03 12:06:11 +02:00
|
|
|
dirname: build
|
2019-09-06 00:14:41 +02:00
|
|
|
|
2019-08-03 12:06:11 +02:00
|
|
|
@configure
|
2019-10-18 03:25:53 +02:00
|
|
|
#sed -i '/^ return ToolChain::CST_Libstdcxx/s@stdcxx@cxx@' cfe-%{version}.src/tools/lib/Driver/ToolChain.cpp
|
2019-09-06 00:14:41 +02:00
|
|
|
mkdir %{dirname}
|
|
|
|
cd %{dirname}
|
|
|
|
cmake ../cfe-%{version}.src \
|
2019-10-18 03:25:53 +02:00
|
|
|
-DCMAKE_PREFIX_PATH=%{prefix} \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=%{prefix} \
|
|
|
|
-DCLANG_CONFIG_FILE_SYSTEM_DIR=%{prefix}/etc/clang \
|
|
|
|
-DCLANG_DEFAULT_CXX_STDLIB=libc++ \
|
|
|
|
-DCMAKE_CXX_COMPILER="clang++" \
|
|
|
|
-DCMAKE_CXX_FLAGS="$CXXFLAGS -stdlib=libc++ -include /usr/weirdos/include/c++/v1/math.h -include $(pwd)/../labs.h -D__DEFINED_max_align_t" \
|
|
|
|
-DCMAKE_C_COMPILER="clang" \
|
|
|
|
-DCMAKE_C_FLAGS="$CFLAGS" \
|
|
|
|
-DCMAKE_EXE_LINKER_FLAGS="$LDFLAGS -lc++" \
|
|
|
|
-DCMAKE_SHARED_LINKER_FLAGS="$LDFLAGS -lc++" \
|
2019-09-06 00:14:41 +02:00
|
|
|
-DCMAKE_BUILD_TYPE=Release
|
2019-08-03 12:06:11 +02:00
|
|
|
|
2019-10-18 03:25:53 +02:00
|
|
|
|
|
|
|
@install
|
|
|
|
cd %{dirname}
|
|
|
|
make DESTDIR=%{pkg} install
|
|
|
|
mkdir -p %{pkg}/prefix/bin
|
|
|
|
rm %{pkg}%{prefix}/bin/clang
|
|
|
|
cp ../clang %{pkg}%{prefix}/bin/
|
|
|
|
rm %{pkg}%{prefix}/bin/clang++
|
|
|
|
ln -s %{prefix}/bin/clang %{pkg}%{prefix}/bin/clang++
|