mirror of
https://github.com/pygos/build.git
synced 2024-11-22 11:09:46 +01:00
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>
This commit is contained in:
parent
1636fc8aac
commit
30aa5ce395
7 changed files with 47 additions and 48 deletions
|
@ -1,20 +0,0 @@
|
||||||
lib/libatomic.so
|
|
||||||
lib/libatomic.so.1
|
|
||||||
lib/libatomic.so.1.2.0
|
|
||||||
lib/libcilkrts.so
|
|
||||||
lib/libcilkrts.so.5
|
|
||||||
lib/libcilkrts.so.5.0.0
|
|
||||||
lib/libgcc_s.so
|
|
||||||
lib/libgcc_s.so.1
|
|
||||||
lib/libgomp.so
|
|
||||||
lib/libgomp.so.1
|
|
||||||
lib/libgomp.so.1.0.0
|
|
||||||
lib/libitm.so
|
|
||||||
lib/libitm.so.1
|
|
||||||
lib/libitm.so.1.0.0
|
|
||||||
lib/libquadmath.so
|
|
||||||
lib/libquadmath.so.0
|
|
||||||
lib/libquadmath.so.0.0.0
|
|
||||||
lib/libstdc++.so.6.0.24
|
|
||||||
lib/libstdc++.so
|
|
||||||
lib/libstdc++.so.6
|
|
|
@ -1,17 +0,0 @@
|
||||||
lib/libatomic.so
|
|
||||||
lib/libatomic.so.1
|
|
||||||
lib/libatomic.so.1.2.0
|
|
||||||
lib/libcilkrts.so
|
|
||||||
lib/libcilkrts.so.5
|
|
||||||
lib/libcilkrts.so.5.0.0
|
|
||||||
lib/libgcc_s.so
|
|
||||||
lib/libgcc_s.so.1
|
|
||||||
lib/libgomp.so
|
|
||||||
lib/libgomp.so.1
|
|
||||||
lib/libgomp.so.1.0.0
|
|
||||||
lib/libitm.so
|
|
||||||
lib/libitm.so.1
|
|
||||||
lib/libitm.so.1.0.0
|
|
||||||
lib/libstdc++.so
|
|
||||||
lib/libstdc++.so.6
|
|
||||||
lib/libstdc++.so.6.0.24
|
|
|
@ -1,6 +1,6 @@
|
||||||
# inherit package details from first stage GCC
|
# inherit package details from first stage GCC
|
||||||
source "$SCRIPTDIR/pkg/tc-gcc1/build"
|
source "$SCRIPTDIR/pkg/tc-gcc1/build"
|
||||||
DEPENDS="tc-gcc1 tc-musl"
|
DEPENDS="tc-gcc1 tc-musl tc-linux_hdr"
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
local INPUT="$1"
|
local INPUT="$1"
|
||||||
|
@ -21,5 +21,38 @@ build() {
|
||||||
}
|
}
|
||||||
|
|
||||||
deploy() {
|
deploy() {
|
||||||
|
local SOURCE="$1"
|
||||||
|
local BUILD="$2"
|
||||||
|
local DEPLOY="$3"
|
||||||
|
local DEVDEPLOY="$4"
|
||||||
|
|
||||||
make install
|
make install
|
||||||
|
|
||||||
|
local f dep
|
||||||
|
|
||||||
|
for f in $(ls ${TCDIR}/${TARGET}/include); do
|
||||||
|
for dep in $DEPENDS; do
|
||||||
|
if [ -e ${PKGDEPLOYDIR}/${dep}-dev/include/$f ]; then
|
||||||
|
rm -rf "$TCDIR/$TARGET/include/$f"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
for f in $(ls ${TCDIR}/${TARGET}/lib); do
|
||||||
|
for dep in $DEPENDS; do
|
||||||
|
if [ -e ${PKGDEPLOYDIR}/${dep}-dev/lib/$f ]; then
|
||||||
|
rm -rf "$TCDIR/$TARGET/lib/$f"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
if [ -e ${PKGDEPLOYDIR}/${dep}/lib/$f ]; then
|
||||||
|
rm -rf "$TCDIR/$TARGET/lib/$f"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
mkdir -p "$DEPLOY/lib"
|
||||||
|
mv ${TCDIR}/${TARGET}/{include,lib} "$DEVDEPLOY"
|
||||||
|
rm ${DEVDEPLOY}/lib/*.la
|
||||||
|
mv ${DEVDEPLOY}/lib/*.so* "$DEPLOY/lib"
|
||||||
|
mv ${DEPLOY}/lib/*.py "$DEVDEPLOY/lib"
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,9 @@ build() {
|
||||||
deploy() {
|
deploy() {
|
||||||
local INPUT="$1"
|
local INPUT="$1"
|
||||||
local OUTPUT="$2"
|
local OUTPUT="$2"
|
||||||
|
local DEPLOY="$3"
|
||||||
|
local DEVDEPLOY="$4"
|
||||||
|
|
||||||
export KBUILD_OUTPUT="$OUTPUT"
|
export KBUILD_OUTPUT="$OUTPUT"
|
||||||
make -C "$INPUT" O="$OUTPUT" ARCH="$LINUX_CPU" INSTALL_HDR_PATH="$TCDIR/$TARGET" headers_install
|
make -C "$INPUT" O="$OUTPUT" ARCH="$LINUX_CPU" INSTALL_HDR_PATH="$DEVDEPLOY" headers_install
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ SRCDIR="musl-$VERSION"
|
||||||
TARBALL="$SRCDIR.tar.gz"
|
TARBALL="$SRCDIR.tar.gz"
|
||||||
URL="https://www.musl-libc.org/releases"
|
URL="https://www.musl-libc.org/releases"
|
||||||
SHA256SUM="d017ee5d01aec0c522a1330fdff06b1e428cb409e1db819cc4935d5da4a5a118"
|
SHA256SUM="d017ee5d01aec0c522a1330fdff06b1e428cb409e1db819cc4935d5da4a5a118"
|
||||||
DEPENDS="tc-gcc1"
|
DEPENDS="tc-gcc1 tc-linux_hdr"
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
return
|
return
|
||||||
|
@ -21,8 +21,12 @@ deploy() {
|
||||||
local INPUT="$1"
|
local INPUT="$1"
|
||||||
local OUTPUT="$2"
|
local OUTPUT="$2"
|
||||||
local DEPLOY="$3"
|
local DEPLOY="$3"
|
||||||
|
local DEVDEPLOY="$4"
|
||||||
|
|
||||||
|
DESTDIR="$DEVDEPLOY" make install-headers
|
||||||
|
DESTDIR="$DEVDEPLOY" make install-libs
|
||||||
|
rm $DEVDEPLOY/lib/*.so*
|
||||||
|
|
||||||
DESTDIR="$TCDIR/$TARGET" make install
|
|
||||||
DESTDIR="$DEPLOY" make install-libs
|
DESTDIR="$DEPLOY" make install-libs
|
||||||
rm $DEPLOY/lib/*.a $DEPLOY/lib/*.o
|
rm $DEPLOY/lib/*.a $DEPLOY/lib/*.o
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
DEPENDS="tc-gcc2 tc-musl tc-pkg-config tc-file"
|
DEPENDS="tc-gcc2 tc-musl tc-linux_hdr tc-pkg-config tc-file"
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
return
|
return
|
||||||
|
@ -9,9 +9,6 @@ deploy() {
|
||||||
local OUTPUT="$2"
|
local OUTPUT="$2"
|
||||||
local DEPLOY="$3"
|
local DEPLOY="$3"
|
||||||
|
|
||||||
rsync -aH --files-from="$SCRIPTDIR/board/$BOARD/libgcc_files.txt" \
|
|
||||||
"$TCDIR/$TARGET" "$DEPLOY"
|
|
||||||
|
|
||||||
gen_cmake_toolchain_file
|
gen_cmake_toolchain_file
|
||||||
save_toolchain
|
save_toolchain
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,12 +7,12 @@ save_toolchain() {
|
||||||
}
|
}
|
||||||
|
|
||||||
restore_toolchain() {
|
restore_toolchain() {
|
||||||
if [ -e "${TCDIR}/${TARGET}.tar.gz" ]; then
|
|
||||||
pushd "$TCDIR/$TARGET" > /dev/null
|
pushd "$TCDIR/$TARGET" > /dev/null
|
||||||
rm -r include lib
|
rm -rf include lib
|
||||||
|
if [ -e "${TCDIR}/${TARGET}.tar.gz" ]; then
|
||||||
tar zxf "${TCDIR}/${TARGET}.tar.gz"
|
tar zxf "${TCDIR}/${TARGET}.tar.gz"
|
||||||
popd > /dev/null
|
|
||||||
fi
|
fi
|
||||||
|
popd > /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
install_build_deps() {
|
install_build_deps() {
|
||||||
|
|
Loading…
Reference in a new issue