2017-12-09 21:51:48 +01:00
|
|
|
# inherit package details from first stage GCC
|
2018-02-15 23:47:54 +01:00
|
|
|
source "$SCRIPTDIR/pkg/tc-gcc1/build"
|
2018-02-17 00:18:47 +01:00
|
|
|
DEPENDS="tc-gcc1 musl linux_headers"
|
2017-12-09 21:51:48 +01:00
|
|
|
|
|
|
|
build() {
|
2018-02-16 23:22:04 +01:00
|
|
|
$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 \
|
2018-10-08 22:05:04 +02:00
|
|
|
--enable-libmudflap --disable-multilib \
|
|
|
|
--enable-libssp \
|
2018-02-16 23:22:04 +01:00
|
|
|
--disable-libsanitizer \
|
2018-10-08 22:05:04 +02:00
|
|
|
--enable-default-pie --enable-default-ssp \
|
2018-02-16 23:22:04 +01:00
|
|
|
--with-arch="$GCC_CPU" $GCC_EXTRACFG \
|
|
|
|
--with-native-system-header-dir="/include"
|
2017-12-09 21:51:48 +01:00
|
|
|
|
|
|
|
make -j $NUMJOBS
|
|
|
|
}
|
|
|
|
|
|
|
|
deploy() {
|
2018-02-16 00:53:38 +01:00
|
|
|
local SOURCE="$1"
|
2018-02-16 23:22:04 +01:00
|
|
|
local DEPLOY="$2"
|
2018-02-16 00:53:38 +01:00
|
|
|
|
2017-12-09 21:51:48 +01:00
|
|
|
make install
|
2018-02-16 00:53:38 +01:00
|
|
|
|
|
|
|
local f dep
|
|
|
|
|
|
|
|
for f in $(ls ${TCDIR}/${TARGET}/include); do
|
|
|
|
for dep in $DEPENDS; do
|
2018-06-17 13:28:18 +02:00
|
|
|
if [ -e ${PKGDEPLOYDIR}/${dep}/include/$f ]; then
|
2018-02-16 00:53:38 +01:00
|
|
|
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"
|
2018-06-17 13:28:18 +02:00
|
|
|
mv ${TCDIR}/${TARGET}/{include,lib} "$DEPLOY"
|
|
|
|
rm ${DEPLOY}/lib/*.la
|
2018-06-16 17:46:17 +02:00
|
|
|
cp "$SCRIPTDIR/pkg/$PKGNAME/rootfs_files.txt" "$DEPLOY"
|
2017-12-09 21:51:48 +01:00
|
|
|
}
|