https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124172

            Bug ID: 124172
           Summary: Building a RISC-V cross-compiler fails when using
                    Clang
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: driver
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kartatz at amanoteam dot com
  Target Milestone: ---

Building a cross-compiler targeting RISC-V is currently failing with the
following error:

```
$ /tmp/gcc-master/configure \
    [...]
    --disable-werror \
    --enable-languages=c,c++ \
    --host=x86_64-apple-darwin \
    --target=riscv64-linux-android \
    --with-arch=rv64gc \
    --with-abi=lp64d
$ make all
[...]
../../gcc/config/riscv/riscv.cc:15011:3: error: no matching function for call
to 'parse_features_for_version'
 15011 |   parse_features_for_version (v1, UNKNOWN_LOCATION, mask1, prio1);
       |   ^~~~~~~~~~~~~~~~~~~~~~~~~~
../../gcc/config/riscv/riscv.cc:14925:1: note: candidate function not viable:
no known conversion from 'location_t' (aka 'unsigned long long') to 'location_t
*' (aka 'unsigned long long *') for 2nd argument
 14925 | parse_features_for_version (string_slice version_str,
       | ^
 14926 |                             location_t *loc,
       |                             ~~~~~~~~~~~~~~~
../../gcc/config/riscv/riscv.cc:15012:3: error: no matching function for call
to 'parse_features_for_version'
 15012 |   parse_features_for_version (v2, UNKNOWN_LOCATION, mask2, prio2);
       |   ^~~~~~~~~~~~~~~~~~~~~~~~~~
../../gcc/config/riscv/riscv.cc:14925:1: note: candidate function not viable:
no known conversion from 'location_t' (aka 'unsigned long long') to 'location_t
*' (aka 'unsigned long long *') for 2nd argument
 14925 | parse_features_for_version (string_slice version_str,
       | ^
 14926 |                             location_t *loc,
       |                             ~~~~~~~~~~~~~~~
[...]
15 warnings and 2 errors generated.
make[2]: *** [Makefile:2777: riscv.o] Error 1
make[2]: Leaving directory '/tmp/gcc-master/build/gcc'
make[1]: *** [Makefile:4426: all-gcc] Error 2
make[1]: Leaving directory '/tmp/gcc-master/build'
make: *** [Makefile:1097: all] Error 2
```

This works when using GCC, so it appears to be a Clang-specific issue.

Reply via email to