On Wed, Aug 27, 2025 at 07:45:14PM +0200, Tobias Burnus wrote:
> PR debug/119367
> * configure.ac (check_leb128_asflags): For gcn, use "--filetype=obj
> --arch=amdgcn", if supported.
> * configure: Regenerate.
> * doc/install.texi (amdgcn-*-*): Also add llvm-objdump to the list of
> to-be-copied files.
>
> --- a/gcc/configure.ac
> +++ b/gcc/configure.ac
> @@ -3301,6 +3301,14 @@ case $target in
> gcc_cv_as_mno_relax,[-mno-relax],[.text],,
> [check_leb128_asflags=-mno-relax])
> ;;
> + amdgcn*-*-*)
> + check_leb128_asflags=
> + # llvm-mc requires those flags to produce a proper .o file
> + # readable by either binutils' objdump or llvm-objdump
> + gcc_GAS_CHECK_FEATURE([--filetype=obj --arch=amdgcn],
> + gcc_cv_as_filetype_arch,[--filetype=obj --arch=amdgcn],[.text],,
> + [check_leb128_asflags="--filetype=obj --arch=amdgcn"])
> + ;;
Ugh, so what exactly it outputs by default?
Does the gcc driver pass those options to as all the time?
In any case, don't all the other gcc_cv_as tests need the same options?
Sure, some tests use gcc_GAS_CHECK_FEATURE and only care if something
assembles, don't check conftest.o.
But e.g. gcc_cv_as_subsection_m1 test uses nm on conftest.o,
gcc_cv_ld_ro_rw_mix uses ld on it, gcc_fn_eh_frame_ro uses objdump,
gcc_cv_as_cfi_advance_working does as well, etc.
So if the defaults are insane, perhaps they should be appended to
gcc_cv_as var?
Jakub