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

--- Comment #20 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Eric Botcazou from comment #19)
> So this would be:
> 
> diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h
> index 9ece60e65ec..558a1fa1fe2 100644
> --- a/gcc/config/sparc/linux64.h
> +++ b/gcc/config/sparc/linux64.h
> @@ -161,7 +161,7 @@ extern const char *host_detect_local_cpu (int argc,
> const char **argv);
>  #define CC1_SPEC GNU_USER_TARGET_CC1_SPEC ASAN_CC1_SPEC \
>  "%{m32:%{m64:%emay not use both -m32 and -m64}} \
>  %{m32:-mptr32 -mno-stack-bias %{!mlong-double-128:-mlong-double-64} \
> -  %{!mcpu*:-mcpu=cypress}} \
> +  %{!mcpu*:-mcpu=v9}} \
>  %{mv8plus:-m32 -mptr32 -mno-stack-bias
> %{!mlong-double-128:-mlong-double-64} \
>    %{!mcpu*:-mcpu=v9}} \
>  %{!m32:%{!mcpu*:-mcpu=ultrasparc}} \
> 
> but good luck seriously testing this in 2026...

libatomic/configure.tgt has

  sparc)
        case " ${CC} ${CFLAGS} " in
          *" -m64 "*)
            ;;
          *)
            if test -z "$with_cpu"; then
              XCFLAGS="${XCFLAGS} -mcpu=v9"
            fi
        esac
        ARCH=sparc
        ;;

Will libatomic be compiled with -mcpu=v9 when configured for sparc-linux?

Reply via email to