1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-09-28 17:19:49 +02:00
build/pkg/tc-musl/build
David Oberhollenzer 30aa5ce395 Use regular packaging for toolchain packages if applicable
- Store musl & kernel headers in dev packages
 - Store musl dynamic headers in regular package,
   shared libs in dev package
 - Carefully seperate headers and libaries installed by second GCC
   into packages
 - libgcc_files.txt no longer needed

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-02-17 03:02:15 +01:00

40 lines
883 B
Text
Executable file

VERSION="1.1.18"
SRCDIR="musl-$VERSION"
TARBALL="$SRCDIR.tar.gz"
URL="https://www.musl-libc.org/releases"
SHA256SUM="d017ee5d01aec0c522a1330fdff06b1e428cb409e1db819cc4935d5da4a5a118"
DEPENDS="tc-gcc1 tc-linux_hdr"
prepare() {
return
}
build() {
local INPUT="$1"
local OUTPUT="$2"
CC="${TARGET}-gcc" $INPUT/configure --prefix=/ --target="$TARGET"
CC="${TARGET}-gcc" make -j $NUMJOBS
}
deploy() {
local INPUT="$1"
local OUTPUT="$2"
local DEPLOY="$3"
local DEVDEPLOY="$4"
DESTDIR="$DEVDEPLOY" make install-headers
DESTDIR="$DEVDEPLOY" make install-libs
rm $DEVDEPLOY/lib/*.so*
DESTDIR="$DEPLOY" make install-libs
rm $DEPLOY/lib/*.a $DEPLOY/lib/*.o
mkdir -p "$DEPLOY/etc"
echo "/lib" > "$DEPLOY/etc/ld-musl-${MUSL_CPU}.path"
if [ -e "$SCRIPTDIR/board/$BOARD/LDPATH" ]; then
cat "$SCRIPTDIR/board/$BOARD/LDPATH" >> "$DEPLOY/etc/ld-musl-${MUSL_CPU}.path"
fi
}