Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Install OBS clang_build Source Service
- Loading branch information
1 parent
eb8905b
commit 6ac659e
Showing
3 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
set -x | ||
echo "Entering customization script..." | ||
CLANG_VERSION="6.0" | ||
|
||
echo "Replace gcc, g++ & cpp by clang" | ||
VERSIONS="4.6 4.7 4.8 4.9 5 6 7 8" | ||
cd /usr/bin | ||
for VERSION in $VERSIONS; do | ||
rm -f g++-$VERSION gcc-$VERSION cpp-$VERSION gcc | ||
ln -s clang++-$CLANG_VERSION g++-$VERSION | ||
ln -s clang-$CLANG_VERSION gcc-$VERSION | ||
ln -s clang-$CLANG_VERSION cpp-$VERSION | ||
ln -s clang-$CLANG_VERSION gcc | ||
echo "gcc-$VERSION hold"|dpkg --set-selections | ||
echo "g++-$VERSION hold"|dpkg --set-selections | ||
done | ||
cd - | ||
|
||
echo "Check if gcc, g++ & cpp are actually clang" | ||
gcc --version|grep clang > /dev/null || exit 1 | ||
cpp --version|grep clang > /dev/null || exit 1 | ||
g++ --version|grep clang > /dev/null || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<service name="clang_build"> | ||
<summary>Build packages against Clang</summary> | ||
<description> | ||
This service substitutes CC and CXX for clang before builds | ||
</description> | ||
</service> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters