smlinux/base/musl/smbuild
PktSurf 506c5912cd Added gcc 13.2.0 with alpine linux patches to base
Added a C file to create a libssp file separate from gcc to musl build file in base
2024-11-05 13:03:07 +05:30

61 lines
2.3 KiB
Text

# Maintainer: PktSurf <smlinux@pktsurf.in>
app=musl
version=1.2.5
build=1sml
homepage="http://www.musl-libc.org/"
download="https://musl.libc.org/releases/musl-$version.tar.gz"
desc="Simple, fast and POSIX-compliant C library"
requires="musl"
preservestaticlibs=1
ignorebinlib=1
prepbuilddir() {
mkandenterbuilddir
rm -rf $app-$version
tar xf $srcdir/$app-$version.tar.?z*
cd $app-$version
fixbuilddirpermissions
}
build() {
./configure \
--prefix=/usr
make
make install DESTDIR=$pkg
# Some additional stuff from alpine
mkdir -p $pkg/usr/bin $pkg/usr/lib
gcc -o $pkg/usr/bin/getconf $srcdir/getconf.c
gcc -o $pkg/usr/bin/getent $srcdir/getent.c
gcc -o $pkg/usr/bin/iconv $srcdir/iconv.c
# provide minimal libssp_nonshared.a so we don't need libssp from gcc
gcc $CFLAGS -c $srcdir/__stack_chk_fail_local.c -o __stack_chk_fail_local.o
ar r libssp_nonshared.a __stack_chk_fail_local.o
cp libssp_nonshared.a $pkg/usr/lib/
(
mkdir -p $pkg/usr/lib
cd $pkg/usr/lib
ln -sf libc.so ld-musl-$arch.so.1
)
cp COPYRIGHT $pkgdocs/
mkfinalpkg
}
sha512sums="
4cc8cbc88ec0398e76ab0d684ba096e1fe70ec8324bd4c9f600ee96352287286391bcda2580c296511fa84a409d5391f14e73078d9c0315f1459a523722999fd musl-1.2.5.tar.lz
0d80f37b34a35e3d14b012257c50862dfeb9d2c81139ea2dfa101d981d093b009b9fa450ba27a708ac59377a48626971dfc58e20a3799084a65777a0c32cbc7d getconf.c
378d70e65bcc65bb4e1415354cecfa54b0c1146dfb24474b69e418cdbf7ad730472cd09f6f103e1c99ba6c324c9560bccdf287f5889bbc3ef0bdf0e08da47413 getent.c
9d42d66fb1facce2b85dad919be5be819ee290bd26ca2db00982b2f8e055a0196290a008711cbe2b18ec9eee8d2270e3b3a4692c5a1b807013baa5c2b70a2bbf iconv.c
3af049adb95230efab7e71964e9cb4a5a4d6b4a10adec43e1540fc2a10dbc77ed96511bc862c2f13deb6d599298d3ec2610ad0107898f6105ba4705f973737db asm.hwcap.h
8c3fddd73b696a38e633953715c79c47703739be27ee085fc6c960a57b6746ca05bf6406f7e6126cc1a13204254fd5830afb566624e1f298f4d6b58216013c28 cdefs.h
19cec4d39310285eb49ad1beae86884080e0152f9477757513050211b31f95ee7283a64ae95939683df09231cfb021ace816b26981ad05f4fff0a39519f935fe queue.h
cd57bec6b2462b08b54dcfc6ba37e1d5289fcdd9463f22ea091679aa8006e24d89c9d57637c0e7a5bfbf02d06e93aa4cb3c0d066400aa1b698a8ae66a9cb7b8e stab.h
07cb70f2f0ddb31e23dd913c6f561fc9885667c5803fdf3a559676c99d08834b4104589bacb5d17b4a0b379c68c81a1cf3173832b3da33a7b936fa7b93706844 tree.h
"