mirror of
https://github.com/pygos/build.git
synced 2024-11-10 21:57:10 +01:00
74 lines
2.8 KiB
Text
Executable file
74 lines
2.8 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"
|
|
|
|
cat >> "$PKGDEPLOYDIR/libstdc++-dev.files" <<_EOF
|
|
dir include 0755 0 0
|
|
dir include/c++ 0755 0 0
|
|
dir include/c++/8.2.0 0755 0 0
|
|
dir include/c++/8.2.0/$TARGET 0775 0 0
|
|
dir include/c++/8.2.0/$TARGET/bits 0775 0 0
|
|
dir include/c++/8.2.0/$TARGET/ext 0775 0 0
|
|
file include/c++/8.2.0/$TARGET/bits/stdtr1c++.h 0644 0 0
|
|
file include/c++/8.2.0/$TARGET/bits/gthr-single.h 0644 0 0
|
|
file include/c++/8.2.0/$TARGET/bits/ctype_inline.h 0644 0 0
|
|
file include/c++/8.2.0/$TARGET/bits/gthr-posix.h 0644 0 0
|
|
file include/c++/8.2.0/$TARGET/bits/ctype_base.h 0644 0 0
|
|
file include/c++/8.2.0/$TARGET/bits/c++io.h 0644 0 0
|
|
file include/c++/8.2.0/$TARGET/bits/gthr.h 0644 0 0
|
|
file include/c++/8.2.0/$TARGET/bits/c++locale.h 0644 0 0
|
|
file include/c++/8.2.0/$TARGET/bits/cpu_defines.h 0644 0 0
|
|
file include/c++/8.2.0/$TARGET/bits/c++config.h 0644 0 0
|
|
file include/c++/8.2.0/$TARGET/bits/atomic_word.h 0644 0 0
|
|
file include/c++/8.2.0/$TARGET/bits/os_defines.h 0644 0 0
|
|
file include/c++/8.2.0/$TARGET/bits/time_members.h 0644 0 0
|
|
file include/c++/8.2.0/$TARGET/bits/basic_file.h 0644 0 0
|
|
file include/c++/8.2.0/$TARGET/bits/gthr-default.h 0644 0 0
|
|
file include/c++/8.2.0/$TARGET/bits/cxxabi_tweaks.h 0644 0 0
|
|
file include/c++/8.2.0/$TARGET/bits/opt_random.h 0644 0 0
|
|
file include/c++/8.2.0/$TARGET/bits/extc++.h 0644 0 0
|
|
file include/c++/8.2.0/$TARGET/bits/stdc++.h 0644 0 0
|
|
file include/c++/8.2.0/$TARGET/bits/c++allocator.h 0644 0 0
|
|
file include/c++/8.2.0/$TARGET/bits/error_constants.h 0644 0 0
|
|
file include/c++/8.2.0/$TARGET/bits/messages_members.h 0644 0 0
|
|
file include/c++/8.2.0/$TARGET/ext/opt_random.h 0644 0 0
|
|
_EOF
|
|
|
|
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
|
|
}
|