smlinux/base/lld/smbuild
PktSurf 74ed84af66 Added binutils 2.40 to base
Split base/llvm package into base/llvm,clang,lld
Updated base buildlist
Discarded old heavybuilds/firefox patch
2024-11-10 16:21:45 +05:30

58 lines
No EOL
1.6 KiB
Bash

# Maintainer: PktSurf <smlinux@pktsurf.in>
app=lld
version=17.0.6
build=1sml
homepage="http://llvm.org/"
download="https://github.com/llvm/llvm-project/releases/download/llvmorg-$version/llvm-$version.src.tar.xz"
desc="lld linker from LLVM compiler toolkit"
requires="libffi libxml2 perl cmake"
prepbuilddir() {
mkandenterbuilddir
rm -rf $app-$version.src
tar xf $srcdir/$app-$version.src.tar.?z*
cd $app-$version.src
(
cd ../
[[ -d cmake ]] && rm -r cmake
tar xf $srcdir/cmake-$version.src.tar.?z*
mv cmake-$version.src cmake
)
tar xf $srcdir/libunwind-$version.src.tar.?z*
mv libunwind-$version.src libunwind
cp -r libunwind/include/mach-o include/
fixbuilddirpermissions
}
build() {
unset CFLAGS CXXFLAGS
mkdir -p build
CC="clang" \
CXX="clang++" \
cmake -B build -G Ninja -Wno-dev \
-DCMAKE_BUILD_TYPE=Release \
-DLLD_BUILT_STANDALONE=ON \
-DLLVM_INCLUDE_TESTS=OFF \
-DCMAKE_SKIP_INSTALL_RPATH=ON \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_EXE_LINKER_FLAGS="-Wl,-z,stack-size=2097152"
cmake --build build
DESTDIR=$pkg cmake --install build
cp LICENSE.TXT $pkgdocs/
mkfinalpkg
}
sha512sums="
4ea1adcd10729f73e84d00e5800cb2f40daf7c3c91d6717fc7572d2db95902c927daed0b403c660beae673973431aecf854eeafa966bd2145ee917a8b090f78a cmake-17.0.6.src.tar.lz
93313c449a58f8f81a13231fd1e3168267bd504689fb5c6e9a0d8a99e3dfe0be68968f5614e00836808bd7a730121bc94f459ada8cf6cf010d13178a8446ae7e libunwind-17.0.6.src.tar.lz
8c313ba8f40015c10f6826bad5d7553ec1fc6c634b4a384789611f541bf210fd69fdd77f13a6bb8ee8fb2283d5a2c08dbbccf8603c7a2cec9904eb18c5fcc403 lld-17.0.6.src.tar.lz
"