toolchain/ports: Use strip install targets
I just found that these exist. This is much cleaner than manually stripping the executables!
This commit is contained in:
parent
463ce05da0
commit
2b2130ff42
|
@ -4,6 +4,7 @@ NAME='binutils'
|
||||||
VERSION='2.44'
|
VERSION='2.44'
|
||||||
DOWNLOAD_URL="https://ftp.gnu.org/gnu/binutils/binutils-$VERSION.tar.gz#0cdd76777a0dfd3dd3a63f215f030208ddb91c2361d2bcc02acec0f1c16b6a2e"
|
DOWNLOAD_URL="https://ftp.gnu.org/gnu/binutils/binutils-$VERSION.tar.gz#0cdd76777a0dfd3dd3a63f215f030208ddb91c2361d2bcc02acec0f1c16b6a2e"
|
||||||
DEPENDENCIES=('zlib')
|
DEPENDENCIES=('zlib')
|
||||||
|
MAKE_INSTALL_TARGETS=('install-strip')
|
||||||
CONFIGURE_OPTIONS=(
|
CONFIGURE_OPTIONS=(
|
||||||
"--target=$BANAN_TOOLCHAIN_TRIPLE"
|
"--target=$BANAN_TOOLCHAIN_TRIPLE"
|
||||||
'--with-sysroot=/'
|
'--with-sysroot=/'
|
||||||
|
@ -14,8 +15,3 @@ CONFIGURE_OPTIONS=(
|
||||||
'--disable-nls'
|
'--disable-nls'
|
||||||
'--disable-werror'
|
'--disable-werror'
|
||||||
)
|
)
|
||||||
|
|
||||||
build() {
|
|
||||||
make -j$(nproc) || exit 1
|
|
||||||
find . -type f -executable -exec $STRIP --strip-unneeded {} + 2>/dev/null
|
|
||||||
}
|
|
||||||
|
|
|
@ -4,6 +4,8 @@ NAME='gcc'
|
||||||
VERSION='15.1.0'
|
VERSION='15.1.0'
|
||||||
DOWNLOAD_URL="https://ftp.gnu.org/gnu/gcc/gcc-$VERSION/gcc-$VERSION.tar.gz#51b9919ea69c980d7a381db95d4be27edf73b21254eb13d752a08003b4d013b1"
|
DOWNLOAD_URL="https://ftp.gnu.org/gnu/gcc/gcc-$VERSION/gcc-$VERSION.tar.gz#51b9919ea69c980d7a381db95d4be27edf73b21254eb13d752a08003b4d013b1"
|
||||||
DEPENDENCIES=('binutils' 'gmp' 'mpfr' 'mpc')
|
DEPENDENCIES=('binutils' 'gmp' 'mpfr' 'mpc')
|
||||||
|
MAKE_BUILD_TARGETS=('all-gcc' 'all-target-libgcc' 'all-target-libstdc++-v3')
|
||||||
|
MAKE_INSTALL_TARGETS=('install-strip-gcc' 'install-strip-target-libgcc' 'install-strip-target-libstdc++-v3')
|
||||||
CONFIGURE_OPTIONS=(
|
CONFIGURE_OPTIONS=(
|
||||||
"--target=$BANAN_TOOLCHAIN_TRIPLE"
|
"--target=$BANAN_TOOLCHAIN_TRIPLE"
|
||||||
'--with-sysroot=/'
|
'--with-sysroot=/'
|
||||||
|
@ -15,16 +17,3 @@ CONFIGURE_OPTIONS=(
|
||||||
'--disable-nls'
|
'--disable-nls'
|
||||||
'--enable-languages=c,c++'
|
'--enable-languages=c,c++'
|
||||||
)
|
)
|
||||||
|
|
||||||
build() {
|
|
||||||
make -j$(nproc) all-gcc || exit 1
|
|
||||||
make -j$(nproc) all-target-libgcc || exit 1
|
|
||||||
make -j$(nproc) all-target-libstdc++-v3 || exit 1
|
|
||||||
find . -type f -executable -exec strip --strip-unneeded {} + 2>/dev/null
|
|
||||||
}
|
|
||||||
|
|
||||||
install() {
|
|
||||||
make install-gcc DESTDIR="$BANAN_SYSROOT" || exit 1
|
|
||||||
make install-target-libgcc DESTDIR="$BANAN_SYSROOT" || exit 1
|
|
||||||
make install-target-libstdc++-v3 DESTDIR="$BANAN_SYSROOT" || exit 1
|
|
||||||
}
|
|
||||||
|
|
|
@ -94,7 +94,7 @@ build_binutils () {
|
||||||
--disable-werror
|
--disable-werror
|
||||||
|
|
||||||
make $MAKE_JOBS
|
make $MAKE_JOBS
|
||||||
make install
|
make install-strip
|
||||||
}
|
}
|
||||||
|
|
||||||
build_gcc () {
|
build_gcc () {
|
||||||
|
@ -131,8 +131,8 @@ build_gcc () {
|
||||||
|
|
||||||
make $MAKE_JOBS all-gcc
|
make $MAKE_JOBS all-gcc
|
||||||
make $MAKE_JOBS all-target-libgcc CFLAGS_FOR_TARGET="$XCFLAGS"
|
make $MAKE_JOBS all-target-libgcc CFLAGS_FOR_TARGET="$XCFLAGS"
|
||||||
make install-gcc
|
make install-strip-gcc
|
||||||
make install-target-libgcc
|
make install-strip-target-libgcc
|
||||||
}
|
}
|
||||||
|
|
||||||
build_libstdcpp () {
|
build_libstdcpp () {
|
||||||
|
@ -143,7 +143,7 @@ build_libstdcpp () {
|
||||||
|
|
||||||
cd $BANAN_BUILD_DIR/toolchain/$GCC_VERSION/build-$BANAN_ARCH
|
cd $BANAN_BUILD_DIR/toolchain/$GCC_VERSION/build-$BANAN_ARCH
|
||||||
make $MAKE_JOBS all-target-libstdc++-v3
|
make $MAKE_JOBS all-target-libstdc++-v3
|
||||||
make install-target-libstdc++-v3
|
make install-strip-target-libstdc++-v3
|
||||||
}
|
}
|
||||||
|
|
||||||
build_grub () {
|
build_grub () {
|
||||||
|
@ -275,5 +275,3 @@ if (($BUILD_LIBSTDCPP)); then
|
||||||
|
|
||||||
build_libstdcpp
|
build_libstdcpp
|
||||||
fi
|
fi
|
||||||
|
|
||||||
find "$BANAN_TOOLCHAIN_PREFIX" -type f -executable -exec strip --strip-unneeded {} + 2>/dev/null
|
|
||||||
|
|
Loading…
Reference in New Issue