Obsolete
/
recipes
Archived
3
0
Fork 0
This repository has been archived on 2022-01-17. You can view files and clone it, but cannot push or open issues/pull-requests.
recipes/clang/recipe.spec

37 lines
1.1 KiB
Plaintext
Raw Normal View History

name: clang
version: 8.0.1
release: 1
sources:
- https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/cfe-%{version}.src.tar.xz
- labs.h
- clang
dirname: build
2019-09-06 00:14:41 +02:00
@configure
#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 \
-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
@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++