clang-11 says it supports arm64_32 but when I try to use "-march=arm64_32" it says it does not

Viewed 448

I am trying to compile a program that needs to use 32 bit pointers and ints (long very depressing story) for a new board that is aarch64. I tried clang-11 -print-targets a and got:

$ clang-11 -print-targets
  Registered Targets:
    aarch64    - AArch64 (little endian)
    aarch64_32 - AArch64 (little endian ILP32)
    aarch64_be - AArch64 (big endian)
    amdgcn     - AMD GCN GPUs
    arm        - ARM
    arm64      - ARM64 (little endian)
    arm64_32   - ARM64 (little endian ILP32)
    armeb      - ARM (big endian)
    avr        - Atmel AVR Microcontroller
    bpf        - BPF (host endian)
    ...

but when I try to compile a simple test program I get:

/usr/bin/clang-11 -g <redacted>/arm_pointer_size/arm_pointer_size.c -march=arm64_32 --target=arm64-linux-gnueabihf -fuse-ld=lld -o <redacted>/arm_pointer_size/arm_pointer_size

clang: error: the clang compiler does not support '-march=arm64_32'

when I remove the -march=arm64_32 the build works. If I try putting the "_32" in the triple I get:

/usr/bin/clang-11 -g <redacted>/arm_pointer_size/arm_pointer_size.c --target=arm64_32-linux-gnueabihf -fuse-ld=lld -o <redacted>/arm_pointer_size/arm_pointer_size 

clang: error: unknown target triple 'arm64_32-unknown-linux-gnueabihf', please use -triple or -arch

I'm using llvm/clang from the Debian repos but it seems like that shouldn't matter. Why does clang say its registered targets include arm64_32 but then doesn't support it?

0 Answers
Related