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

--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to Robin Dapp from comment #3)
> Is there a way to test it short of a cross compile?

I guess not - but compiling shouldn't be difficult as no libraries are needed.


Otherwise, I use for a full cross compile:
  in GCC's main source directory, a sym link: newlib ->
../newlib-cygwin/newlib/
  (and https://sourceware.org/git/newlib-cygwin.git)
And using LLVM >= 15 and $AMD_DIR = build dir:

mkdir -p "$AMD_DIR/target-tools/bin"
ln -s /usr/lib/llvm-$LLVM_VER/bin/llvm-ar
"$AMD_DIR/target-tools/bin/amdgcn-amdhsa-ar"
ln -s /usr/lib/llvm-$LLVM_VER/bin/llvm-mc
"$AMD_DIR/target-tools/bin/amdgcn-amdhsa-as"
ln -s /usr/lib/llvm-$LLVM_VER/bin/lld    
"$AMD_DIR/target-tools/bin/amdgcn-amdhsa-ld"
ln -s /usr/lib/llvm-$LLVM_VER/bin/llvm-nm
"$AMD_DIR/target-tools/bin/amdgcn-amdhsa-nm"
ln -s /usr/lib/llvm-$LLVM_VER/bin/llvm-ranlib
"$AMD_DIR/target-tools/bin/amdgcn-amdhsa-ranlib"

cd "$AMD_DIR"
    PATH="`pwd`/target-tools/bin:$PATH"
--- ^^^ those might not be needed for testing the attached reduced test
    as it only needs cc1 and no library support. ------------------------------

"$SOURCE_DIR/configure" --prefix="$DEST_DIR" --disable-bootstrap \
   --disable-libstdcxx-pch \
   --enable-languages=c,c++,fortran,lto \
   --enable-as-accelerator-for=x86_64-pc-linux-gnu \
                                    --target=amdgcn-amdhsa

Reply via email to