Bug 1627500

Summary: Cross compiling to non-natiive targets not possible anymore
Product: [Fedora] Fedora Reporter: sedrubal <fedora>
Component: clangAssignee: Dave Airlie <airlied>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 29CC: airlied, davejohansen, sbergman, siddharth.kde, tstellar
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: clang-7.0.0-0.14.rc3.fc29 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-22 18:04:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description sedrubal 2018-09-10 17:46:27 UTC
Description of problem:

In Fedora 28 it was easy to cross compile on x86_64 to other non-native targets like AArch64 by just using clang. Since Fedora 29 non-native targets are disabled, because of their small use case and the huge memory usage and long build times.

Version-Release number of selected component (if applicable):

clang-7.0.0-0.2.rc1.fc29.x86_64

Steps to Reproduce:

1. echo '// Test' | clang -target armv8a-none-elf -x c -std=c99 -c -o /dev/null -
2. llc -version

Actual results:

On Fedora 29:
The first command displays the error message:
> error: unable to create target: 'No available targets are compatible with this triple.'
The second command shows only native targets:
[...]
  Registered Targets:
    amdgcn  - AMD GCN GPUs
    bpf     - BPF (host endian)
    bpfeb   - BPF (big endian)
    bpfel   - BPF (little endian)
    nvptx   - NVIDIA PTX 32-bit
    nvptx64 - NVIDIA PTX 64-bit
    r600    - AMD GPUs HD2XXX-HD6XXX
    x86     - 32-bit X86: Pentium-Pro and above
    x86-64  - 64-bit X86: EM64T and AMD64

Expected results:

On Fedora 28:
The first command works (no error message).
The second also shows non-native targets like AArch64, ARM and many more:
[...]
  Registered Targets:
    aarch64    - AArch64 (little endian)
    aarch64_be - AArch64 (big endian)
    amdgcn     - AMD GCN GPUs
    arm        - ARM
    arm64      - ARM64 (little endian)
    armeb      - ARM (big endian)
    bpf        - BPF (host endian)
    bpfeb      - BPF (big endian)
    bpfel      - BPF (little endian)
    mips       - Mips
    mips64     - Mips64 [experimental]
    mips64el   - Mips64el [experimental]
    mipsel     - Mipsel
    nvptx      - NVIDIA PTX 32-bit
    nvptx64    - NVIDIA PTX 64-bit
    ppc32      - PowerPC 32
    ppc64      - PowerPC 64
    ppc64le    - PowerPC 64 LE
    r600       - AMD GPUs HD2XXX-HD6XXX
    systemz    - SystemZ
    thumb      - Thumb
    thumbeb    - Thumb (big endian)
    x86        - 32-bit X86: Pentium-Pro and above
    x86-64     - 64-bit X86: EM64T and AMD64

Comment 1 Fedora Update System 2018-09-18 06:17:26 UTC
clang-7.0.0-0.14.rc3.fc29, compiler-rt-7.0.0-0.4.rc3.fc29, libcxx-7.0.0-0.1.rc3.fc29, libcxxabi-7.0.0-0.1.rc3.fc29, libomp-7.0.0-0.2.rc3.fc29, lld-7.0.0-0.4.rc3.fc29, lldb-7.0.0-0.4.rc3.fc29, llvm-7.0.0-0.15.rc3.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-5834add20e

Comment 2 sedrubal 2018-09-19 18:00:51 UTC
It looks like, you enabled some more targets (e.g. aarch64) again. Thanks! If you keep this enabled, you can close this issue ;)

Comment 3 Tom Stellard 2018-09-19 18:02:34 UTC
If you have tested this update and it works for you, can you give feedback on the update:
https://bodhi.fedoraproject.org/updates/FEDORA-2018-5834add20e

Comment 4 Fedora Update System 2018-09-22 18:04:58 UTC
clang-7.0.0-0.14.rc3.fc29, compiler-rt-7.0.0-0.4.rc3.fc29, libcxx-7.0.0-0.1.rc3.fc29, libcxxabi-7.0.0-0.1.rc3.fc29, libomp-7.0.0-0.2.rc3.fc29, lld-7.0.0-0.4.rc3.fc29, lldb-7.0.0-0.4.rc3.fc29, llvm-7.0.0-0.15.rc3.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.