21
21
# `--deploy` flag to the `build_tarballs.jl` script. You can either build &
22
22
# deploy the compilers one by one or run something like
23
23
#
24
- # for p in i686-linux-gnu x86_64-linux-gnu aarch64-linux-gnu armv7l-linux-gnueabihf powerpc64le-linux-gnu i686-linux-musl x86_64-linux-musl aarch64-linux-musl armv7l-linux-musleabihf x86_64-apple-darwin14 x86_64-unknown-freebsd13.2 aarch64-unknown-freebsd13.2 i686-w64-mingw32 x86_64-w64-mingw32; do julia build_tarballs.jl --debug --verbose --deploy "${p}"; done
24
+ # for p in i686-linux-gnu x86_64-linux-gnu aarch64-linux-gnu armv7l-linux-gnueabihf powerpc64le-linux-gnu riscv64-linux-gnu i686-linux-musl x86_64-linux-musl aarch64-linux-musl armv7l-linux-musleabihf x86_64-apple-darwin14 x86_64-unknown-freebsd13.2 aarch64-unknown-freebsd13.2 i686-w64-mingw32 x86_64-w64-mingw32; do julia build_tarballs.jl --debug --verbose --deploy "${p}"; done
25
25
26
26
include (" ./common.jl" )
27
27
include (" ./gcc_sources.jl" )
@@ -70,6 +70,10 @@ function gcc_script(compiler_target::Platform)
70
70
ppc64*)
71
71
LIB64=lib64
72
72
;;
73
+ risc64*)
74
+ # TODO: Is this correct?
75
+ LIB64=lib64
76
+ ;;
73
77
*)
74
78
LIB64=lib
75
79
;;
@@ -295,6 +299,7 @@ function gcc_script(compiler_target::Platform)
295
299
if [[ ${COMPILER_TARGET} == *-gnu* ]]; then
296
300
# patch glibc
297
301
cd ${WORKSPACE}/srcdir/glibc-*
302
+
298
303
# patch glibc to keep around libgcc_s_resume on arm
299
304
# ref: https://sourceware.org/ml/libc-alpha/2014-05/msg00573.html
300
305
atomic_patch -p1 $WORKSPACE/srcdir/patches/glibc_arm_gcc_fix.patch || true
@@ -336,13 +341,13 @@ function gcc_script(compiler_target::Platform)
336
341
337
342
# Patches for building glibc 2.17 on ppc64le
338
343
for p in ${WORKSPACE}/srcdir/patches/glibc-ppc64le-*.patch; do
339
- atomic_patch -p1 ${p} || true;
344
+ atomic_patch -p1 ${p} || true
340
345
done
341
346
342
347
# Patch bad `movq` argument in glibc 2.17, adapted from:
343
348
# https://github.com/bminor/glibc/commit/b1ec623ed50bb8c7b9b6333fa350c3866dbde87f
344
349
# X-ref: https://github.com/crosstool-ng/crosstool-ng/issues/1825#issuecomment-1437918391
345
- atomic_patch -p1 $WORKSPACE/srcdir/patches/glibc_movq_fix.patch
350
+ atomic_patch -p1 $WORKSPACE/srcdir/patches/glibc_movq_fix.patch || true
346
351
347
352
# Various configure overrides
348
353
GLIBC_CONFIGURE_OVERRIDES=( libc_cv_forced_unwind=yes libc_cv_c_cleanup=yes )
@@ -352,6 +357,12 @@ function gcc_script(compiler_target::Platform)
352
357
GLIBC_CONFIGURE_OVERRIDES+=( libc_cv_ssp=no libc_cv_ssp_strong=no )
353
358
fi
354
359
360
+ if [[ ${COMPILER_TARGET} == riscv64-* ]]; then
361
+ # Explicitly disable C++
362
+ # (Disable for all architectures?)
363
+ GLIBC_CONFIGURE_OVERRIDES+=( CXX=false )
364
+ fi
365
+
355
366
# Configure glibc
356
367
mkdir ${WORKSPACE}/srcdir/glibc_build
357
368
cd ${WORKSPACE}/srcdir/glibc_build
@@ -478,7 +489,7 @@ function gcc_script(compiler_target::Platform)
478
489
479
490
# Back to GCC-land, install libgcc
480
491
cd ${WORKSPACE}/srcdir/gcc_stage1
481
- make all-target-libgcc -j ${nproc}
492
+ make all-target-libgcc -j${nproc}
482
493
make install-target-libgcc
483
494
484
495
# Finish off libc
@@ -578,7 +589,7 @@ function gcc_script(compiler_target::Platform)
578
589
${GCC_CONF_ARGS}
579
590
580
591
## Build, build, build!
581
- make -j ${nproc}
592
+ make -j${nproc}
582
593
make install
583
594
584
595
# Remove misleading libtool archives
0 commit comments