mirror of
https://github.com/pygos/build.git
synced 2024-11-22 11:09:46 +01:00
45 lines
1.3 KiB
Text
Executable file
45 lines
1.3 KiB
Text
Executable file
# inherit package details from first stage GCC
|
|
source "$SCRIPTDIR/pkg/tc-gcc1/build"
|
|
DEPENDS="tc-gcc1 libc-dev linux-dev"
|
|
SUBPKG="crt libstdc++ libstdc++-dev libgcc libgcc-dev crt-dev"
|
|
|
|
build() {
|
|
local extra="--disable-libssp"
|
|
|
|
if [ "x$TC_HARDENING" = "xyes" ]; then
|
|
extra="$extra --enable-default-pie"
|
|
extra="$extra --enable-default-ssp"
|
|
fi
|
|
|
|
$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 \
|
|
--disable-libsanitizer --disable-libquadmath \
|
|
--with-as="$TCDIR/bin/$TARGET-as" \
|
|
--with-ld="$TCDIR/bin/$TARGET-ld" \
|
|
--with-arch="$GCC_CPU" $extra $GCC_EXTRACFG \
|
|
--with-native-system-header-dir="/include"
|
|
|
|
make -j $NUMJOBS
|
|
}
|
|
|
|
deploy() {
|
|
make install
|
|
|
|
mkdir -p "$PKGDEPLOYDIR/lib"
|
|
mv ${TCDIR}/${TARGET}/{include,lib} "$PKGDEPLOYDIR"
|
|
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
|
|
|
|
pkg_scan_dir "$PKGDEPLOYDIR/include/c++" |\
|
|
sed "s#$PKGDEPLOYDIR/##g" >> "$PKGDEPLOYDIR/libstdc++-dev.files"
|
|
|
|
if [ -f "$PKGDEPLOYDIR/lib/libmpx.a" ]; then
|
|
cat >> "$PKGDEPLOYDIR/libgcc-dev.files" <<_EOF
|
|
file lib/libmpx.a 0644 0 0
|
|
file lib/libmpxwrappers.a 0644 0 0
|
|
_EOF
|
|
fi
|
|
}
|