On Feb 28 2022, Jakub Jelinek via Gcc-patches wrote:

> On Mon, Feb 28, 2022 at 04:27:19PM +0800, Xi Ruoyao wrote:
>> On Mon, 2022-02-28 at 07:06 +0100, Jakub Jelinek via Gcc-patches wrote:
>> > +++ libatomic/Makefile.am       2022-02-25 17:25:16.298314196 +0100
>> > @@ -138,8 +138,9 @@ IFUNC_OPTIONS            = -march=i586
>> >  libatomic_la_LIBADD += $(addsuffix _8_1_.lo,$(SIZEOBJS))
>> >  endif
>> >  if ARCH_X86_64
>> > -IFUNC_OPTIONS       = -mcx16
>> > -libatomic_la_LIBADD += $(addsuffix _16_1_.lo,$(SIZEOBJS))
>> > +IFUNC_OPTIONS       = -mcx16 -mcx16
>> 
>> The duplication of "-mcx16" is unintentional, I guess?
>
> No, it is intentional.
> The only place IFUNC_OPTIONS is used is in:
> IFUNC_OPT       = $(word $(PAT_S),$(IFUNC_OPTIONS))
> so for *_1.*o it uses the first word in IFUNC_OPTIONS, for
> *_2.*o second word etc.
> The thing that is not currently supported is if we'd need more than one
> option for one ifunc variant (which is possibly in the future, if e.g.
> -matomic-loadstore-16 option is added, unless that option also
> implies -mcx16, we'd need a way for one option to include both.
> Maybe -Wc,-mcx16,-matomic-loadstore-16 would work though.

Or use a separate variable for each variant:

IFUNC_OPTIONS_1 = ...
IFUNC_OPTIONS_2 = ...
IFUNC_OPT       = $(IFUNC_OPTIONS_$(PAT_S))

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

Reply via email to