Skip to content
This repository was archived by the owner on Jan 16, 2023. It is now read-only.
This repository was archived by the owner on Jan 16, 2023. It is now read-only.

Error while building riscv-tests - Multiple definitions of tohost and fromhost - riscv64-unknown-elf-gcc 10.1.0 #316

@0ena

Description

@0ena

Hi,

I am using riscv64-unknown-elf-gcc (GCC) 10.1.0 version and I am trying to build the riscv-tools.
While trying to build the riscv-tests, I get the following error:

/eda/tools/riscv/gnu-toolchain/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/bin/ld: /tmp/ccjlTEE7.o: in function `tohost':
(.tohost+0x0): multiple definition of `tohost'; /tmp/cc1LzG1S.o:(.sbss+0x10): first defined here
/eda/tools/riscv/gnu-toolchain/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/bin/ld: /tmp/ccjlTEE7.o: in function `fromhost':
(.tohost+0x40): multiple definition of `fromhost'; /tmp/cc1LzG1S.o:(.sbss+0x8): first defined here
collect2: error: ld returned 1 exit status
make[1]: *** [rv32ui-v-simple] Error 1
make: *** [isa] Error 2

From a search I did, it is reported twice in the parent repo of the riscv-tests as an issue

riscv-software-src/riscv-tests#282
riscv-software-src/riscv-tests#286

It seems that the version of gcc is causing all the fuzz.
Are there any workarounds to finish building (besides using an older version of gcc or a precompiled toolchain)?

Thank you in advance for your responses and help.

Kind regards,
Nassos

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions