Browse Source

clang: Setup cpp as symlink to clang

The cpp program was missing after the gcc -> clang transition, but
clang implements cpp if invoked by that name.

Fixes #397.
android-5
Fredrik Fornwall 8 years ago
parent
commit
290517e829
  1. 16
      packages/clang/build.sh

16
packages/clang/build.sh

@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=http://clang.llvm.org/
TERMUX_PKG_DESCRIPTION="C and C++ frontend for the LLVM compiler" TERMUX_PKG_DESCRIPTION="C and C++ frontend for the LLVM compiler"
_PKG_MAJOR_VERSION=3.8 _PKG_MAJOR_VERSION=3.8
TERMUX_PKG_VERSION=${_PKG_MAJOR_VERSION}.1 TERMUX_PKG_VERSION=${_PKG_MAJOR_VERSION}.1
TERMUX_PKG_BUILD_REVISION=1 TERMUX_PKG_BUILD_REVISION=2
TERMUX_PKG_SRCURL=http://llvm.org/releases/${TERMUX_PKG_VERSION}/llvm-${TERMUX_PKG_VERSION}.src.tar.xz TERMUX_PKG_SRCURL=http://llvm.org/releases/${TERMUX_PKG_VERSION}/llvm-${TERMUX_PKG_VERSION}.src.tar.xz
TERMUX_PKG_HOSTBUILD=true TERMUX_PKG_HOSTBUILD=true
TERMUX_PKG_RM_AFTER_INSTALL="bin/macho-dump bin/bugpoint bin/llvm-tblgen lib/BugpointPasses.so lib/LLVMHello.so" TERMUX_PKG_RM_AFTER_INSTALL="bin/macho-dump bin/bugpoint bin/llvm-tblgen lib/BugpointPasses.so lib/LLVMHello.so"
@ -62,7 +62,7 @@ termux_step_configure () {
-DCMAKE_INSTALL_PREFIX=$TERMUX_PREFIX \ -DCMAKE_INSTALL_PREFIX=$TERMUX_PREFIX \
-DCMAKE_LINKER=`which ${TERMUX_HOST_PLATFORM}-ld` \ -DCMAKE_LINKER=`which ${TERMUX_HOST_PLATFORM}-ld` \
-DCMAKE_RANLIB=`which ${TERMUX_HOST_PLATFORM}-ranlib` \ -DCMAKE_RANLIB=`which ${TERMUX_HOST_PLATFORM}-ranlib` \
-DCMAKE_SYSTEM_NAME=Linux \ -DCMAKE_SYSTEM_NAME=Android \
-DLLVM_TABLEGEN=$TERMUX_PKG_HOSTBUILD_DIR/bin/llvm-tblgen \ -DLLVM_TABLEGEN=$TERMUX_PKG_HOSTBUILD_DIR/bin/llvm-tblgen \
-DLLVM_DEFAULT_TARGET_TRIPLE=$LLVM_DEFAULT_TARGET_TRIPLE \ -DLLVM_DEFAULT_TARGET_TRIPLE=$LLVM_DEFAULT_TARGET_TRIPLE \
-DLLVM_TARGET_ARCH=$LLVM_TARGET_ARCH \ -DLLVM_TARGET_ARCH=$LLVM_TARGET_ARCH \
@ -78,13 +78,7 @@ termux_step_configure () {
termux_step_post_make_install () { termux_step_post_make_install () {
cd $TERMUX_PREFIX/bin cd $TERMUX_PREFIX/bin
ln -f -s clang-${_PKG_MAJOR_VERSION} clang for tool in clang clang++ cc c++ cpp gcc g++ ${TERMUX_HOST_PLATFORM}-{gcc,g++,cpp}; do
ln -f -s clang-${_PKG_MAJOR_VERSION} clang++ ln -f -s clang-${_PKG_MAJOR_VERSION} $tool
ln -f -s clang-${_PKG_MAJOR_VERSION} cc done
ln -f -s clang-${_PKG_MAJOR_VERSION} c++
ln -f -s clang-${_PKG_MAJOR_VERSION} gcc
ln -f -s clang-${_PKG_MAJOR_VERSION} g++
ln -f -s clang-${_PKG_MAJOR_VERSION} ${TERMUX_HOST_PLATFORM}-gcc
ln -f -s clang-${_PKG_MAJOR_VERSION} ${TERMUX_HOST_PLATFORM}-g++
} }

Loading…
Cancel
Save