[PATCH] D74704: Support -fuse-ld=lld for riscv

Leonard Chan via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 26 12:05:35 PST 2020


Yup, I added it to both *-extra.c files and it seemed to fix the tests.

On Wed, Feb 26, 2020 at 11:37 AM Serge Guelton <sguelton at redhat.com> wrote:

> Does adding
>
> // REQUIRES: platform-linker
>
> to Driver/riscv32-toolchain-extra.c fixes your issue?
>
>
> On Wed, Feb 26, 2020 at 06:25:39PM +0000, Leonard Chan via Phabricator
> wrote:
> > leonardchan added a comment.
> >
> > Hi again, I think e058667a2e017d3225a9bb067dbac7f2159576f7 <
> https://reviews.llvm.org/rGe058667a2e017d3225a9bb067dbac7f2159576f7>
> might've broken our toolchain again:
> >
> >   FAIL: Clang :: Driver/riscv32-toolchain-extra.c (5723 of 17018)
> >   ******************** TEST 'Clang :: Driver/riscv32-toolchain-extra.c'
> FAILED ********************
> >   Script:
> >   --
> >   : 'RUN: at line 14';   mkdir -p
> /b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv32-baremetal-nogcc/bin
> >   : 'RUN: at line 15';   [ ! -s
> /b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv32-baremetal-nogcc/bin/clang
> ] || rm
> /b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv32-baremetal-nogcc/bin/clang
> >   : 'RUN: at line 16';   [ ! -s
> /b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv32-baremetal-nogcc/bin/riscv32-unknown-elf-ld
> ] || rm
> /b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv32-baremetal-nogcc/bin/riscv32-unknown-elf-ld
> >   : 'RUN: at line 17';   [ ! -s
> /b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv32-baremetal-nogcc/riscv32-unknown-elf
> ] || rm
> /b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv32-baremetal-nogcc/riscv32-unknown-elf
> >   : 'RUN: at line 18';   ln -s
> /b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/bin/clang
> /b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv32-baremetal-nogcc/bin/clang
> >   : 'RUN: at line 19';   ln -s
> /b/fuchsia-x86_64-linux/llvm.src/clang/test/Driver/Inputs/basic_riscv32_nogcc_tree/bin/riscv32-unknown-elf-ld
> /b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv32-baremetal-nogcc/bin/riscv32-unknown-elf-ld
> >   : 'RUN: at line 20';   ln -s
> /b/fuchsia-x86_64-linux/llvm.src/clang/test/Driver/Inputs/basic_riscv32_nogcc_tree/riscv32-unknown-elf
> /b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv32-baremetal-nogcc/riscv32-unknown-elf
> >   : 'RUN: at line 21';
>  /b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv32-baremetal-nogcc/bin/clang
> /b/fuchsia-x86_64-linux/llvm.src/clang/test/Driver/riscv32-toolchain-extra.c
> -### -no-canonical-prefixes
>  --gcc-toolchain=/b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv32-baremetal-nogcc/invalid
>    -target riscv32-unknown-elf --rtlib=platform 2>&1     |
> /b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/bin/FileCheck
> -check-prefix=C-RV32-BAREMETAL-ILP32-NOGCC
> /b/fuchsia-x86_64-linux/llvm.src/clang/test/Driver/riscv32-toolchain-extra.c
> >   --
> >   Exit Code: 1
> >
> >   Command Output (stderr):
> >   --
> >
>  /b/fuchsia-x86_64-linux/llvm.src/clang/test/Driver/riscv32-toolchain-extra.c:27:34:
> error: C-RV32-BAREMETAL-ILP32-NOGCC: expected string not found in input
> >   // C-RV32-BAREMETAL-ILP32-NOGCC:
> "{{.*}}Output/testroot-riscv32-baremetal-nogcc/bin/riscv32-unknown-elf-ld"
> >                                    ^
> >   <stdin>:5:1070: note: scanning from here
> >
> "/b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv32-baremetal-nogcc/bin/clang"
> "-cc1" "-triple" "riscv32-unknown-unknown-elf" "-emit-obj" "-mrelax-all"
> "--mrelax-relocations" "-disable-free" "-disable-llvm-verifier"
> "-discard-value-names" "-main-file-name" "riscv32-toolchain-extra.c"
> "-mrelocation-model" "static" "-mthread-model" "posix"
> "-mframe-pointer=all" "-fmath-errno" "-fno-rounding-math" "-masm-verbose"
> "-mconstructor-aliases" "-nostdsysteminc" "-target-feature" "+m"
> "-target-feature" "+a" "-target-feature" "+c" "-target-feature" "+relax"
> "-target-feature" "-save-restore" "-target-abi" "ilp32"
> "-dwarf-column-info" "-fno-split-dwarf-inlining" "-debugger-tuning=gdb"
> "-resource-dir"
> "/b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv32-baremetal-nogcc/lib/clang/11.0.0"
> "-internal-isystem"
> "/b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv32-baremetal-nogcc/bin/../riscv32-unknown-elf/include"
> "-fdebug-compilation-dir"
> "/b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver"
> "-ferror-limit" "19" "-fmessage-length" "0" "-fno-signed-char"
> "-fgnuc-version=4.2.1" "-fobjc-runtime=gcc" "-fdiagnostics-show-option"
> "-faddrsig" "-o" "/tmp/riscv32-toolchain-extra-b2b7d0.o" "-x" "c"
> "/b/fuchsia-x86_64-linux/llvm.src/clang/test/Driver/riscv32-toolchain-extra.c"
> >
>
>
>
>
>
>
>
>
>
>
>
>
>
>           ^
> >   <stdin>:6:169: note: possible intended match here
> >    "/b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/bin/ld.lld"
> "-m" "elf32lriscv"
> "/b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv32-baremetal-nogcc/bin/../riscv32-unknown-elf/lib/crt0.o"
> "/b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv32-baremetal-nogcc/lib/clang/11.0.0/lib/clang_rt.crtbegin-riscv32.o"
> "-L/b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv32-baremetal-nogcc/bin/../riscv32-unknown-elf/lib"
> "/tmp/riscv32-toolchain-extra-b2b7d0.o" "--start-group" "-lc" "-lgloss"
> "--end-group"
> "/b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv32-baremetal-nogcc/lib/clang/11.0.0/lib/libclang_rt.builtins-riscv32.a"
> "/b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv32-baremetal-nogcc/lib/clang/11.0.0/lib/clang_rt.crtend-riscv32.o"
> "-o" "a.out"
> >
>
>                      ^
> >
> >   --
> >
> >   ********************
> >   Testing:  0.. 10.. 20.. 30
> >   FAIL: Clang :: Driver/riscv64-toolchain-extra.c (5733 of 17018)
> >   ******************** TEST 'Clang :: Driver/riscv64-toolchain-extra.c'
> FAILED ********************
> >   Script:
> >   --
> >   : 'RUN: at line 14';   mkdir -p
> /b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv64-baremetal-nogcc/bin
> >   : 'RUN: at line 15';   [ ! -s
> /b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv64-baremetal-nogcc/bin/clang
> ] || rm
> /b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv64-baremetal-nogcc/bin/clang
> >   : 'RUN: at line 16';   [ ! -s
> /b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv64-baremetal-nogcc/bin/riscv64-unknown-elf-ld
> ] || rm
> /b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv64-baremetal-nogcc/bin/riscv64-unknown-elf-ld
> >   : 'RUN: at line 17';   [ ! -s
> /b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv64-baremetal-nogcc/riscv64-unknown-elf
> ] || rm
> /b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv64-baremetal-nogcc/riscv64-unknown-elf
> >   : 'RUN: at line 18';   ln -s
> /b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/bin/clang
> /b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv64-baremetal-nogcc/bin/clang
> >   : 'RUN: at line 19';   ln -s
> /b/fuchsia-x86_64-linux/llvm.src/clang/test/Driver/Inputs/basic_riscv64_nogcc_tree/bin/riscv64-unknown-elf-ld
> /b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv64-baremetal-nogcc/bin/riscv64-unknown-elf-ld
> >   : 'RUN: at line 20';   ln -s
> /b/fuchsia-x86_64-linux/llvm.src/clang/test/Driver/Inputs/basic_riscv64_nogcc_tree/riscv64-unknown-elf
> /b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv64-baremetal-nogcc/riscv64-unknown-elf
> >   : 'RUN: at line 21';
>  /b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv64-baremetal-nogcc/bin/clang
> /b/fuchsia-x86_64-linux/llvm.src/clang/test/Driver/riscv64-toolchain-extra.c
> -### -no-canonical-prefixes
>  --gcc-toolchain=/b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv64-baremetal-nogcc/invalid
>    -target riscv64-unknown-elf --rtlib=platform 2>&1     |
> /b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/bin/FileCheck
> -check-prefix=C-RV64-BAREMETAL-LP64-NOGCC
> /b/fuchsia-x86_64-linux/llvm.src/clang/test/Driver/riscv64-toolchain-extra.c
> >   --
> >   Exit Code: 1
> >
> >   Command Output (stderr):
> >   --
> >
>  /b/fuchsia-x86_64-linux/llvm.src/clang/test/Driver/riscv64-toolchain-extra.c:27:33:
> error: C-RV64-BAREMETAL-LP64-NOGCC: expected string not found in input
> >   // C-RV64-BAREMETAL-LP64-NOGCC:
> "{{.*}}Output/testroot-riscv64-baremetal-nogcc/bin/riscv64-unknown-elf-ld"
> >                                   ^
> >   <stdin>:5:1069: note: scanning from here
> >
> "/b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv64-baremetal-nogcc/bin/clang"
> "-cc1" "-triple" "riscv64-unknown-unknown-elf" "-emit-obj" "-mrelax-all"
> "--mrelax-relocations" "-disable-free" "-disable-llvm-verifier"
> "-discard-value-names" "-main-file-name" "riscv64-toolchain-extra.c"
> "-mrelocation-model" "static" "-mthread-model" "posix"
> "-mframe-pointer=all" "-fmath-errno" "-fno-rounding-math" "-masm-verbose"
> "-mconstructor-aliases" "-nostdsysteminc" "-target-feature" "+m"
> "-target-feature" "+a" "-target-feature" "+c" "-target-feature" "+relax"
> "-target-feature" "-save-restore" "-target-abi" "lp64" "-dwarf-column-info"
> "-fno-split-dwarf-inlining" "-debugger-tuning=gdb" "-resource-dir"
> "/b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv64-baremetal-nogcc/lib/clang/11.0.0"
> "-internal-isystem"
> "/b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv64-baremetal-nogcc/bin/../riscv64-unknown-elf/include"
> "-fdebug-compilation-dir"
> "/b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver"
> "-ferror-limit" "19" "-fmessage-length" "0" "-fno-signed-char"
> "-fgnuc-version=4.2.1" "-fobjc-runtime=gcc" "-fdiagnostics-show-option"
> "-faddrsig" "-o" "/tmp/riscv64-toolchain-extra-0b21db.o" "-x" "c"
> "/b/fuchsia-x86_64-linux/llvm.src/clang/test/Driver/riscv64-toolchain-extra.c"
> >
>
>
>
>
>
>
>
>
>
>
>
>
>
>          ^
> >   <stdin>:6:169: note: possible intended match here
> >    "/b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/bin/ld.lld"
> "-m" "elf64lriscv"
> "/b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv64-baremetal-nogcc/bin/../riscv64-unknown-elf/lib/crt0.o"
> "/b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv64-baremetal-nogcc/lib/clang/11.0.0/lib/clang_rt.crtbegin-riscv64.o"
> "-L/b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv64-baremetal-nogcc/bin/../riscv64-unknown-elf/lib"
> "/tmp/riscv64-toolchain-extra-0b21db.o" "--start-group" "-lc" "-lgloss"
> "--end-group"
> "/b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv64-baremetal-nogcc/lib/clang/11.0.0/lib/libclang_rt.builtins-riscv64.a"
> "/b/fuchsia-x86_64-linux/llvm.obj/tools/clang/stage2-bins/tools/clang/test/Driver/Output/testroot-riscv64-baremetal-nogcc/lib/clang/11.0.0/lib/clang_rt.crtend-riscv64.o"
> "-o" "a.out"
> >
>
>                      ^
> >
> >   --
> >
> >   ********************
> >   Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
> >
> >   Testing Time: 44.02s
> >   ********************
> >   Failing Tests (2):
> >       Clang :: Driver/riscv32-toolchain-extra.c
> >       Clang :: Driver/riscv64-toolchain-extra.c
> >
> > Could you take a look? Thanks.
> >
> > Log:
> http://lab.llvm.org:8011/builders/fuchsia-x86_64-linux/builds/613/steps/check/logs/stdio
> >
> >
> > Repository:
> >   rG LLVM Github Monorepo
> >
> > CHANGES SINCE LAST ACTION
> >   https://reviews.llvm.org/D74704/new/
> >
> > https://reviews.llvm.org/D74704
> >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200226/69018240/attachment-0001.html>


More information about the cfe-commits mailing list