llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

error: unknown target CPU 'armv8-a+nofp'

Open zhangxin6483 opened this issue 2 years ago • 4 comments

While buildingJailhouse with enabling clang am receiving the below error,

error: unknown target CPU 'armv8-a+nofp' note: valid target CPU values are: nocona, core2, penryn, bonnell, atom, silvermont, slm, goldmont, goldmont-plus, tremont, nehalem, corei7, westmere, sandybridge, corei7-avx, ivybridge, core-avx-i, haswell, core-avx2, broadwell, skylake, skylake-avx512, skx, cascadelake, cooperlake, cannonlake, icelake-client, icelake-server, tigerlake, sapphirerapids, alderlake, knl, knm, k8, athlon64, athlon-fx, opteron, k8-sse3, athlon64-sse3, opteron-sse3, amdfam10, barcelona, btver1, btver2, bdver1, bdver2, bdver3, bdver4, znver1, znver2, znver3, x86-64, x86-64-v2, x86-64-v3, x86-64-v4

kroot@tracy-pc:/home/jailhouse/src/jailhouse# clang -print-supported-cpus Android (7284624, based on r416183b) clang version 12.0.5 (https://android.googlesource.com/toolchain/llvm-project c935d99d7cf2016289302412d708641d52d2f7ee) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /home/zhangshizong/itx3588j-aosp12/prebuilts/clang/host/linux-x86/clang-r416183b/bin Available CPUs for this target:

    alderlake
    amdfam10
    athlon
    athlon-4
    athlon-fx
    athlon-mp
    athlon-tbird
    athlon-xp
    athlon64
    athlon64-sse3
    atom
    barcelona
    bdver1
    bdver2
    bdver3
    bdver4
    bonnell
    broadwell
    btver1
    btver2
    c3
    c3-2
    cannonlake
    cascadelake
    cooperlake
    core-avx-i
    core-avx2
    core2
    corei7
    corei7-avx
    generic
    geode
    goldmont
    goldmont-plus
    haswell
    i386
    i486
    i586
    i686
    icelake-client
    icelake-server
    ivybridge
    k6
    k6-2
    k6-3
    k8
    k8-sse3
    knl
    knm
    lakemont
    nehalem
    nocona
    opteron
    opteron-sse3
    penryn
    pentium
    pentium-m
    pentium-mmx
    pentium2
    pentium3
    pentium3m
    pentium4
    pentium4m
    pentiumpro
    prescott
    sandybridge
    sapphirerapids
    silvermont
    skx
    skylake
    skylake-avx512
    slm
    tigerlake
    tremont
    westmere
    winchip-c6
    winchip2
    x86-64
    x86-64-v2
    x86-64-v3
    x86-64-v4
    yonah
    znver1
    znver2
    znver3

Use -mcpu or -mtune to specify the target's processor. For example, clang --target=aarch64-unknown-linux-gui -mcpu=cortex-a35

Can I get more information on how to make it work for armv8-a+nofp?

tks.

zhangxin6483 avatar Apr 07 '24 03:04 zhangxin6483

@llvm/issue-subscribers-backend-aarch64

Author: None (zhangxin6483)

While buildingJailhouse with enabling clang am receiving the below error,

error: unknown target CPU 'armv8-a+nofp' note: valid target CPU values are: nocona, core2, penryn, bonnell, atom, silvermont, slm, goldmont, goldmont-plus, tremont, nehalem, corei7, westmere, sandybridge, corei7-avx, ivybridge, core-avx-i, haswell, core-avx2, broadwell, skylake, skylake-avx512, skx, cascadelake, cooperlake, cannonlake, icelake-client, icelake-server, tigerlake, sapphirerapids, alderlake, knl, knm, k8, athlon64, athlon-fx, opteron, k8-sse3, athlon64-sse3, opteron-sse3, amdfam10, barcelona, btver1, btver2, bdver1, bdver2, bdver3, bdver4, znver1, znver2, znver3, x86-64, x86-64-v2, x86-64-v3, x86-64-v4

kroot@tracy-pc:/home/jailhouse/src/jailhouse# clang -print-supported-cpus Android (7284624, based on r416183b) clang version 12.0.5 (https://android.googlesource.com/toolchain/llvm-project c935d99d7cf2016289302412d708641d52d2f7ee) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /home/zhangshizong/itx3588j-aosp12/prebuilts/clang/host/linux-x86/clang-r416183b/bin Available CPUs for this target:

    alderlake
    amdfam10
    athlon
    athlon-4
    athlon-fx
    athlon-mp
    athlon-tbird
    athlon-xp
    athlon64
    athlon64-sse3
    atom
    barcelona
    bdver1
    bdver2
    bdver3
    bdver4
    bonnell
    broadwell
    btver1
    btver2
    c3
    c3-2
    cannonlake
    cascadelake
    cooperlake
    core-avx-i
    core-avx2
    core2
    corei7
    corei7-avx
    generic
    geode
    goldmont
    goldmont-plus
    haswell
    i386
    i486
    i586
    i686
    icelake-client
    icelake-server
    ivybridge
    k6
    k6-2
    k6-3
    k8
    k8-sse3
    knl
    knm
    lakemont
    nehalem
    nocona
    opteron
    opteron-sse3
    penryn
    pentium
    pentium-m
    pentium-mmx
    pentium2
    pentium3
    pentium3m
    pentium4
    pentium4m
    pentiumpro
    prescott
    sandybridge
    sapphirerapids
    silvermont
    skx
    skylake
    skylake-avx512
    slm
    tigerlake
    tremont
    westmere
    winchip-c6
    winchip2
    x86-64
    x86-64-v2
    x86-64-v3
    x86-64-v4
    yonah
    znver1
    znver2
    znver3

Use -mcpu or -mtune to specify the target's processor. For example, clang --target=aarch64-unknown-linux-gui -mcpu=cortex-a35

Can I get more information on how to make it work for armv8-a+nofp?

tks.

llvmbot avatar Apr 07 '24 03:04 llvmbot

Maybe what you want is a cross-toolchain (host=x86 and target=aarch64), you can

  1. Download release binary directly from https://github.com/llvm/llvm-project/releases/tag/llvmorg-18.1.2
  2. Build cross-toolchain from source code : https://llvm.org/docs/GettingStarted.html#getting-the-source-code-and-building-llvm
  3. Compile code online if you only want to get assembly results as soon as possible : https://godbolt.org/z/crq3rfExb

Luhaocong avatar Apr 08 '24 08:04 Luhaocong

Maybe what you want is a cross-toolchain (host=x86 and target=aarch64), you can

  1. Download release binary directly from https://github.com/llvm/llvm-project/releases/tag/llvmorg-18.1.2
  2. Build cross-toolchain from source code : https://llvm.org/docs/GettingStarted.html#getting-the-source-code-and-building-llvm
  3. Compile code online if you only want to get assembly results as soon as possible : https://godbolt.org/z/crq3rfExb

ok, thank you.

zhangxin6483 avatar Apr 09 '24 07:04 zhangxin6483

question was answered, this can be closed now.

c-rhodes avatar Jul 22 '25 09:07 c-rhodes