Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clang-12: error: unknown argument: '-mepi' #27

Open
Kuntin555 opened this issue Sep 23, 2021 · 4 comments
Open

clang-12: error: unknown argument: '-mepi' #27

Kuntin555 opened this issue Sep 23, 2021 · 4 comments

Comments

@Kuntin555
Copy link

when I use llvm from PLTC (https://github.com/plctlab/llvm-project) compile the RVV benchmark(https://github.com/RALC88/riscv-vectorized-benchmark-suite/tree/rvv-1.0)
it can't find argument '-mepi'.
My steps are as follows:

  1. compile and install the llvm
    export RISCV=~/opt/riscv-vector
    git clone https://github.com/plctlab/llvm-project.git
    cd llvm-project-rvv-iscas
    mkdir build
    cd build
    cmake -G "Unix Makefiles"
    -DLLVM_TARGETS_TO_BUILD="RISCV"
    -DCMAKE_INSTALL_PREFIX=$RISCV
    -DCMAKE_BUILD_TYPE=Release
    -DLLVM_USE_LINKER=gold
    -DLLVM_ENABLE_PROJECTS="clang;libcxx;libcxxabi;lld" ../llvm
    make -j12
    make install
  2. compile the rvv benchmark
    git clone https://github.com/RALC88/riscv-vectorized-benchmark-suite.git
    cd riscv-vectorized-benchmark-suite
    export LLVM=/opt/riscv-vector
    export PATH=$PATH:
    /opt/riscv-vector/bin
    make all
    clang-12: error: unknown argument: '-mepi'
@ChunyuLiao
Copy link
Collaborator

@ChunyuLiao
Copy link
Collaborator

@Kuntin555

@Kuntin555
Copy link
Author

yes

@ChunyuLiao
Copy link
Collaborator

Bin/blacksholes_vector.exe come from the https://github.com/RALC88/riscv-vectorized-benchmark-suite/tree/rvv-0.7. You should recompile the binaries , eg: rvv-test

  1. compile riscv-gnu-toolchain: newlib

  2. example _axpy:
    2.1 clang -Wall --target=riscv64-unknown-elf -march=rv64gcv1p0 -menable-experimental-extensions -O2 --sysroot=/newlib/riscv64-unknown-elf --gcc-toolchain=/home/liaochunyu/install/upstream-newlib/ -c -o src/axpy.o src/axpy.c
    2.2 clang -Wall --target=riscv64-unknown-elf -march=rv64gcv1p0 -menable-experimental-extensions -O2 --sysroot=
    /newlib/riscv64-unknown-elf --gcc-toolchain=/newlib/ -c -o src/main.o src/main.c
    clang -Wall --target=riscv64-unknown-elf -march=rv64gcv1p0 -menable-experimental-extensions -O2 --sysroot=
    /newlib/riscv64-unknown-elf --gcc-toolchain=/newlib/ -c -o src/utils.o src/utils.c
    2.3 clang -Wall --target=riscv64-unknown-elf -march=rv64gcv1p0 -menable-experimental-extensions -O2 --sysroot=
    /newlib/riscv64-unknown-elf --gcc-toolchain=~/newlib/ -O2 -o bin/rvv-test src/*.o -lm

  3. objdump:
    llvm-objdump --mattr=+m,+f,+d,+a,+c,+experimental-v -ds bin/rvv-test

melonedo added a commit to melonedo/llvm-project that referenced this issue Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants