Skip to content

Commit

Permalink
[wip] Update to GCC 14.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Kartatz committed May 17, 2024
1 parent 497cc35 commit f37f9bf
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -218,17 +218,17 @@ sed -i 's/#include <stdint.h>/#include <stdint.h>\n#include <stdio.h>/g' "${tool
[ -d "${binutils_directory}/build" ] || mkdir "${binutils_directory}/build"

declare -r targets=(
'amd64'
'armv7'
'riscv64'
'arm64'
'powerpc64'
'macppc'
'sparc64'
'octeon'
'loongson'
'loongson'
'hppa'
'alpha'
'amd64'
'i386'
)

Expand Down Expand Up @@ -274,9 +274,9 @@ for target in "${targets[@]}"; do
fi

if (( require_lld )); then
extra_binutils_flags+=' --disable-ld --disable-gold --disable-lto'
extra_binutils_flags+='--disable-ld --disable-gold --disable-lto '
else
extra_binutils_flags+=' --enable-ld --enable-gold --enable-lto'
extra_binutils_flags+='--enable-ld --enable-gold --enable-lto '
fi

../configure \
Expand Down Expand Up @@ -338,8 +338,8 @@ for target in "${targets[@]}"; do
extra_configure_flags+='--disable-lto '
fi

if [ "${target}" = 'armv7' ]; then
extra_configure_flags+=' --disable-libatomic'
if [ "${target}" = 'armv7' ] || [ "${target}" = 'amd64' ]; then
extra_configure_flags+='--disable-libatomic '
fi

../configure \
Expand Down Expand Up @@ -404,7 +404,10 @@ for target in "${targets[@]}"; do
rm --recursive "${toolchain_directory}/share"
rm --recursive "${toolchain_directory}/lib/gcc/${triplet}/"*"/include-fixed"

patchelf --add-rpath '$ORIGIN/../../../../lib' "${toolchain_directory}/libexec/gcc/${triplet}/"*"/cc1"
if (( supports_lto )); then
patchelf --add-rpath '$ORIGIN/../../../../lib' "${toolchain_directory}/libexec/gcc/${triplet}/"*"/cc1"
fi

patchelf --add-rpath '$ORIGIN/../../../../lib' "${toolchain_directory}/libexec/gcc/${triplet}/"*"/cc1plus"
patchelf --add-rpath '$ORIGIN/../../../../lib' "${toolchain_directory}/libexec/gcc/${triplet}/"*"/lto1"
exit 1
Expand Down

0 comments on commit f37f9bf

Please sign in to comment.