mirror of
https://github.com/pygos/build.git
synced 2024-11-05 11:37:10 +01:00
2a1add41e7
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
49 lines
1.2 KiB
Text
Executable file
49 lines
1.2 KiB
Text
Executable file
# inherit package details from first stage GCC
|
|
source "$SCRIPTDIR/pkg/tc-gcc1/build"
|
|
DEPENDS="tc-gcc1 musl linux_headers"
|
|
|
|
build() {
|
|
$1/configure --prefix="$TCDIR" --target="$TARGET" \
|
|
--build="$HOSTTUPLE" --host="$HOSTTUPLE" \
|
|
--with-sysroot="$TCDIR/$TARGET" \
|
|
--disable-nls --enable-languages=c,c++ \
|
|
--enable-c99 --enable-long-long \
|
|
--enable-libmudflap --disable-multilib \
|
|
--enable-libssp \
|
|
--disable-libsanitizer \
|
|
--enable-default-pie --enable-default-ssp \
|
|
--with-arch="$GCC_CPU" $GCC_EXTRACFG \
|
|
--with-native-system-header-dir="/include"
|
|
|
|
make -j $NUMJOBS
|
|
}
|
|
|
|
deploy() {
|
|
local SOURCE="$1"
|
|
local DEPLOY="$2"
|
|
|
|
make install
|
|
|
|
local f dep
|
|
|
|
for f in $(ls ${TCDIR}/${TARGET}/include); do
|
|
for dep in $DEPENDS; do
|
|
if [ -e ${PKGDEPLOYDIR}/${dep}/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}/lib/$f ]; then
|
|
rm -rf "$TCDIR/$TARGET/lib/$f"
|
|
fi
|
|
done
|
|
done
|
|
|
|
mkdir -p "$DEPLOY/lib"
|
|
mv ${TCDIR}/${TARGET}/{include,lib} "$DEPLOY"
|
|
rm ${DEPLOY}/lib/*.la
|
|
cp "$SCRIPTDIR/pkg/$PKGNAME/rootfs_files.txt" "$DEPLOY"
|
|
}
|