* --target=powerpc64-linux_altivec: Use rs6000_linux64_override_options()?
@ 2022-10-28 17:34 Jan-Benedict Glaw
2022-10-28 19:19 ` Segher Boessenkool
0 siblings, 1 reply; 4+ messages in thread
From: Jan-Benedict Glaw @ 2022-10-28 17:34 UTC (permalink / raw)
To: Aldy Hernandez, David Edelsohn, Segher Boessenkool, Kewen Lin; +Cc: gcc
[-- Attachment #1: Type: text/plain, Size: 803 bytes --]
Hi!
While checking my bot build logs, I noticed that GCC configured for
--target=powerpc64-linux_altivec will pull in linux64.h and
linuxaltivec.h .
linux64.h
* Will "#define TARGET_USES_LINUX64_OPT 1" (to make static void
rs6000_linux64_override_options() available in rs6000.cc).
* Will "#define SUBSUBTARGET_OVERRIDE_OPTIONS" to use
rs6000_linux64_override_options().
linuxaltivec.h OTOH
* Will undef / "#define SUBSUBTARGET_OVERRIDE_OPTIONS rs6000_altivec_abi = 1"
and thus no longer use rs6000_linux64_override_options()
* That triggers a warning (unused-function).
To silence that warning, should linuxaltivec.h undefine
TARGET_USES_LINUX64_OPT? Or set rs6000_altivec_abi=1 and call
rs6000_linux64_override_options()?
Thanks,
Jan-Benedict
--
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: --target=powerpc64-linux_altivec: Use rs6000_linux64_override_options()?
2022-10-28 17:34 --target=powerpc64-linux_altivec: Use rs6000_linux64_override_options()? Jan-Benedict Glaw
@ 2022-10-28 19:19 ` Segher Boessenkool
2022-10-28 20:07 ` Jan-Benedict Glaw
0 siblings, 1 reply; 4+ messages in thread
From: Segher Boessenkool @ 2022-10-28 19:19 UTC (permalink / raw)
To: Jan-Benedict Glaw; +Cc: Aldy Hernandez, David Edelsohn, Kewen Lin, gcc
Hi!
On Fri, Oct 28, 2022 at 07:34:24PM +0200, Jan-Benedict Glaw wrote:
> While checking my bot build logs, I noticed that GCC configured for
> --target=powerpc64-linux_altivec will pull in linux64.h and
> linuxaltivec.h .
>
> linux64.h
> * Will "#define TARGET_USES_LINUX64_OPT 1" (to make static void
> rs6000_linux64_override_options() available in rs6000.cc).
> * Will "#define SUBSUBTARGET_OVERRIDE_OPTIONS" to use
> rs6000_linux64_override_options().
>
> linuxaltivec.h OTOH
> * Will undef / "#define SUBSUBTARGET_OVERRIDE_OPTIONS rs6000_altivec_abi = 1"
> and thus no longer use rs6000_linux64_override_options()
> * That triggers a warning (unused-function).
>
> To silence that warning, should linuxaltivec.h undefine
> TARGET_USES_LINUX64_OPT? Or set rs6000_altivec_abi=1 and call
> rs6000_linux64_override_options()?
Why do you use powerpc64-linux_altivec? This things (normally spelled
with a dash, not and underscore, btw) was made for 32-bit targets. It
never has done anything useful for 64-bit targets, afaik?
(And not for 32-bit targets either really, but that is another issue.)
Segher
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: --target=powerpc64-linux_altivec: Use rs6000_linux64_override_options()?
2022-10-28 19:19 ` Segher Boessenkool
@ 2022-10-28 20:07 ` Jan-Benedict Glaw
2022-10-28 21:13 ` Segher Boessenkool
0 siblings, 1 reply; 4+ messages in thread
From: Jan-Benedict Glaw @ 2022-10-28 20:07 UTC (permalink / raw)
To: Segher Boessenkool; +Cc: Aldy Hernandez, David Edelsohn, Kewen Lin, gcc
[-- Attachment #1: Type: text/plain, Size: 1791 bytes --]
Hi!
On Fri, 2022-10-28 14:19:10 -0500, Segher Boessenkool <segher@kernel.crashing.org> wrote:
> On Fri, Oct 28, 2022 at 07:34:24PM +0200, Jan-Benedict Glaw wrote:
> > While checking my bot build logs, I noticed that GCC configured for
> > --target=powerpc64-linux_altivec will pull in linux64.h and
> > linuxaltivec.h .
> >
> > linux64.h
> > * Will "#define TARGET_USES_LINUX64_OPT 1" (to make static void
> > rs6000_linux64_override_options() available in rs6000.cc).
> > * Will "#define SUBSUBTARGET_OVERRIDE_OPTIONS" to use
> > rs6000_linux64_override_options().
> >
> > linuxaltivec.h OTOH
> > * Will undef / "#define SUBSUBTARGET_OVERRIDE_OPTIONS rs6000_altivec_abi = 1"
> > and thus no longer use rs6000_linux64_override_options()
> > * That triggers a warning (unused-function).
> >
> > To silence that warning, should linuxaltivec.h undefine
> > TARGET_USES_LINUX64_OPT? Or set rs6000_altivec_abi=1 and call
> > rs6000_linux64_override_options()?
>
> Why do you use powerpc64-linux_altivec? This things (normally spelled
> with a dash, not and underscore, btw) was made for 32-bit targets. It
> never has done anything useful for 64-bit targets, afaik?
Because it's listed in ./contrib/config-list.mk:
/var/cache/git/gcc [master] # make -f contrib/config-list.mk show | tr ' ' $'\n' | grep altivec
powerpc-eabisimaltivec
powerpc-eabialtivec
powerpc64-linux_altivec
> (And not for 32-bit targets either really, but that is another issue.)
It seems to be on the target list since the very beginning, when
config-list.mk was created by Joern Rennecke. So somebody cared about
this configuration I guess?
If this configuration isn't ment to be used, we'd just drop it from
the list I guess.
MfG, JBG
--
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: --target=powerpc64-linux_altivec: Use rs6000_linux64_override_options()?
2022-10-28 20:07 ` Jan-Benedict Glaw
@ 2022-10-28 21:13 ` Segher Boessenkool
0 siblings, 0 replies; 4+ messages in thread
From: Segher Boessenkool @ 2022-10-28 21:13 UTC (permalink / raw)
To: Jan-Benedict Glaw; +Cc: Aldy Hernandez, David Edelsohn, Kewen Lin, gcc
On Fri, Oct 28, 2022 at 10:07:41PM +0200, Jan-Benedict Glaw wrote:
> On Fri, 2022-10-28 14:19:10 -0500, Segher Boessenkool <segher@kernel.crashing.org> wrote:
> > Why do you use powerpc64-linux_altivec? This things (normally spelled
> > with a dash, not and underscore, btw) was made for 32-bit targets. It
> > never has done anything useful for 64-bit targets, afaik?
>
> Because it's listed in ./contrib/config-list.mk:
>
> /var/cache/git/gcc [master] # make -f contrib/config-list.mk show | tr ' ' $'\n' | grep altivec
> powerpc-eabisimaltivec
> powerpc-eabialtivec
> powerpc64-linux_altivec
Huh. Okay, that is a bug. Has that target ever worked (or
alternatively, has it ever existed at all, other than it is recognised
by config.gcc by not very tight REs)?
> It seems to be on the target list since the very beginning, when
> config-list.mk was created by Joern Rennecke. So somebody cared about
> this configuration I guess?
No idea. rs6000_altivec_abi is always forced on on any linux
configuration that has VMX or VSX or 64 bit enabled:
===
/* The AltiVec ABI is the default for PowerPC-64 GNU/Linux. For
PowerPC-32 GNU/Linux, -maltivec implies the AltiVec ABI. It can
be explicitly overridden in either case. */
if (TARGET_ELF)
{
if (!OPTION_SET_P (rs6000_altivec_abi)
&& (TARGET_64BIT || TARGET_ALTIVEC || TARGET_VSX))
{
if (main_target_opt != NULL &&
!main_target_opt->x_rs6000_altivec_abi)
error ("target attribute or pragma changes AltiVec ABI");
else
rs6000_altivec_abi = 1;
}
}
===
> If this configuration isn't ment to be used, we'd just drop it from
> the list I guess.
Yeah, the config makes no sense.
Thanks,
Segher
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-10-28 21:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-28 17:34 --target=powerpc64-linux_altivec: Use rs6000_linux64_override_options()? Jan-Benedict Glaw
2022-10-28 19:19 ` Segher Boessenkool
2022-10-28 20:07 ` Jan-Benedict Glaw
2022-10-28 21:13 ` Segher Boessenkool
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).