public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] PATCH: add CPU_FLAGS_PPC USE_EXPAND
@ 2019-08-31  7:03 Georgy Yakovlev
  2019-08-31  7:03 ` [gentoo-dev] [PATCH 1/2] profiles/desc: descriptions for CPU_FLAGS_PPC use_expand Georgy Yakovlev
  2019-08-31  7:03 ` [gentoo-dev] [PATCH 2/2] profiles: Add CPU_FLAGS_PPC to USE_EXPAND Georgy Yakovlev
  0 siblings, 2 replies; 7+ messages in thread
From: Georgy Yakovlev @ 2019-08-31  7:03 UTC (permalink / raw
  To: gentoo-dev

Possible users from the tree: 
  altivec useflag consumers (many)
  media libraries (x264, x265, libpng and others.)

also firefox-70[1] will have auto-detection of features but we may want to
prevent automagic optimizations.


cpuid2cpuflags support[2] is ready and and will be merged soon,
so users will have a gentoo-way of setting those flags.


And this patch in github PR[3] format for easy viewing

[1] https://hg.mozilla.org/mozilla-central/rev/252643ff91c5
[2] https://github.com/mgorny/cpuid2cpuflags/pull/13
[3] https://github.com/gentoo/gentoo/pull/12829




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gentoo-dev] [PATCH 1/2] profiles/desc: descriptions for CPU_FLAGS_PPC use_expand
  2019-08-31  7:03 [gentoo-dev] PATCH: add CPU_FLAGS_PPC USE_EXPAND Georgy Yakovlev
@ 2019-08-31  7:03 ` Georgy Yakovlev
  2019-08-31  7:11   ` Michał Górny
  2019-08-31  7:03 ` [gentoo-dev] [PATCH 2/2] profiles: Add CPU_FLAGS_PPC to USE_EXPAND Georgy Yakovlev
  1 sibling, 1 reply; 7+ messages in thread
From: Georgy Yakovlev @ 2019-08-31  7:03 UTC (permalink / raw
  To: gentoo-dev; +Cc: Georgy Yakovlev

Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
---
 profiles/desc/cpu_flags_ppc.desc | 6 ++++++
 1 file changed, 6 insertions(+)
 create mode 100644 profiles/desc/cpu_flags_ppc.desc

diff --git a/profiles/desc/cpu_flags_ppc.desc b/profiles/desc/cpu_flags_ppc.desc
new file mode 100644
index 00000000000..abd2434c4f5
--- /dev/null
+++ b/profiles/desc/cpu_flags_ppc.desc
@@ -0,0 +1,6 @@
+# Copyright 2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+altivec - Use the AltiVec instruction set
+vsx - Use the Vector Scalar Extension instruction set (POWER7 and later)
+vsx3 - Use the Vector Scalar Extension v.3 instruction set (POWER9 and later)
-- 
2.23.0



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-dev] [PATCH 2/2] profiles: Add CPU_FLAGS_PPC to USE_EXPAND
  2019-08-31  7:03 [gentoo-dev] PATCH: add CPU_FLAGS_PPC USE_EXPAND Georgy Yakovlev
  2019-08-31  7:03 ` [gentoo-dev] [PATCH 1/2] profiles/desc: descriptions for CPU_FLAGS_PPC use_expand Georgy Yakovlev
@ 2019-08-31  7:03 ` Georgy Yakovlev
  1 sibling, 0 replies; 7+ messages in thread
From: Georgy Yakovlev @ 2019-08-31  7:03 UTC (permalink / raw
  To: gentoo-dev; +Cc: Georgy Yakovlev

hide everywhere, and unhide in top level powerpc profile

Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
---
 profiles/arch/powerpc/make.defaults | 9 +++++++++
 profiles/base/make.defaults         | 4 ++--
 2 files changed, 11 insertions(+), 2 deletions(-)
 create mode 100644 profiles/arch/powerpc/make.defaults

diff --git a/profiles/arch/powerpc/make.defaults b/profiles/arch/powerpc/make.defaults
new file mode 100644
index 00000000000..8613dd7619e
--- /dev/null
+++ b/profiles/arch/powerpc/make.defaults
@@ -0,0 +1,9 @@
+# Copyright 2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# All extra USE/etc should be specified in sub-profiles.
+# DO NOT POLLUTE USE ON THIS PROFILE.
+
+# Georgy Yakovlev <gyakovlev@gentoo.org (2019-08-30)
+# Unhide PPC specific USE_EXPANDs.
+USE_EXPAND_HIDDEN="-CPU_FLAGS_PPC"
diff --git a/profiles/base/make.defaults b/profiles/base/make.defaults
index 678b493f867..a269b84f9eb 100644
--- a/profiles/base/make.defaults
+++ b/profiles/base/make.defaults
@@ -13,11 +13,11 @@ USE_EXPAND_VALUES_USERLAND="BSD GNU"
 
 # Env vars to expand into USE vars.  Modifying this requires prior
 # discussion on gentoo-dev@lists.gentoo.org.
-USE_EXPAND="ABI_MIPS ABI_PPC ABI_RISCV ABI_S390 ABI_X86 ALSA_CARDS APACHE2_MODULES APACHE2_MPMS CALLIGRA_FEATURES CAMERAS COLLECTD_PLUGINS CPU_FLAGS_ARM CPU_FLAGS_X86 CURL_SSL ELIBC ENLIGHTENMENT_MODULES FFTOOLS GPSD_PROTOCOLS GRUB_PLATFORMS INPUT_DEVICES KERNEL L10N LCD_DEVICES LIBREOFFICE_EXTENSIONS LIRC_DEVICES LLVM_TARGETS MONKEYD_PLUGINS NETBEANS_MODULES NGINX_MODULES_HTTP NGINX_MODULES_MAIL NGINX_MODULES_STREAM OFED_DRIVERS OFFICE_IMPLEMENTATION OPENMPI_FABRICS OPENMPI_OFED_FEATURES OPENMPI_RM PHP_TARGETS POSTGRES_TARGETS PYTHON_SINGLE_TARGET PYTHON_TARGETS QEMU_SOFTMMU_TARGETS QEMU_USER_TARGETS ROS_MESSAGES RUBY_TARGETS SANE_BACKENDS USERLAND UWSGI_PLUGINS VIDEO_CARDS VOICEMAIL_STORAGE XFCE_PLUGINS XTABLES_ADDONS"
+USE_EXPAND="ABI_MIPS ABI_PPC ABI_RISCV ABI_S390 ABI_X86 ALSA_CARDS APACHE2_MODULES APACHE2_MPMS CALLIGRA_FEATURES CAMERAS COLLECTD_PLUGINS CPU_FLAGS_ARM CPU_FLAGS_PPC CPU_FLAGS_X86 CURL_SSL ELIBC ENLIGHTENMENT_MODULES FFTOOLS GPSD_PROTOCOLS GRUB_PLATFORMS INPUT_DEVICES KERNEL L10N LCD_DEVICES LIBREOFFICE_EXTENSIONS LIRC_DEVICES LLVM_TARGETS MONKEYD_PLUGINS NETBEANS_MODULES NGINX_MODULES_HTTP NGINX_MODULES_MAIL NGINX_MODULES_STREAM OFED_DRIVERS OFFICE_IMPLEMENTATION OPENMPI_FABRICS OPENMPI_OFED_FEATURES OPENMPI_RM PHP_TARGETS POSTGRES_TARGETS PYTHON_SINGLE_TARGET PYTHON_TARGETS QEMU_SOFTMMU_TARGETS QEMU_USER_TARGETS ROS_MESSAGES RUBY_TARGETS SANE_BACKENDS USERLAND UWSGI_PLUGINS VIDEO_CARDS VOICEMAIL_STORAGE XFCE_PLUGINS XTABLES_ADDONS"
 
 # USE_EXPAND variables whose contents are not shown in package manager
 # output. Changes need discussion on gentoo-dev.
-USE_EXPAND_HIDDEN="USERLAND KERNEL ELIBC ABI_MIPS ABI_PPC ABI_RISCV ABI_S390 ABI_X86 CPU_FLAGS_ARM CPU_FLAGS_X86"
+USE_EXPAND_HIDDEN="USERLAND KERNEL ELIBC ABI_MIPS ABI_PPC ABI_RISCV ABI_S390 ABI_X86 CPU_FLAGS_ARM CPU_FLAGS_PPC CPU_FLAGS_X86"
 
 CONFIG_PROTECT="/etc"
 CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf"
-- 
2.23.0



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [gentoo-dev] [PATCH 1/2] profiles/desc: descriptions for CPU_FLAGS_PPC use_expand
  2019-08-31  7:03 ` [gentoo-dev] [PATCH 1/2] profiles/desc: descriptions for CPU_FLAGS_PPC use_expand Georgy Yakovlev
@ 2019-08-31  7:11   ` Michał Górny
  2019-08-31  7:19     ` Georgy Yakovlev
  0 siblings, 1 reply; 7+ messages in thread
From: Michał Górny @ 2019-08-31  7:11 UTC (permalink / raw
  To: gentoo-dev; +Cc: Georgy Yakovlev

[-- Attachment #1: Type: text/plain, Size: 963 bytes --]

On Sat, 2019-08-31 at 00:03 -0700, Georgy Yakovlev wrote:
> Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
> ---
>  profiles/desc/cpu_flags_ppc.desc | 6 ++++++
>  1 file changed, 6 insertions(+)
>  create mode 100644 profiles/desc/cpu_flags_ppc.desc
> 
> diff --git a/profiles/desc/cpu_flags_ppc.desc b/profiles/desc/cpu_flags_ppc.desc
> new file mode 100644
> index 00000000000..abd2434c4f5
> --- /dev/null
> +++ b/profiles/desc/cpu_flags_ppc.desc
> @@ -0,0 +1,6 @@
> +# Copyright 2019 Gentoo Authors
> +# Distributed under the terms of the GNU General Public License v2
> +
> +altivec - Use the AltiVec instruction set
> +vsx - Use the Vector Scalar Extension instruction set (POWER7 and later)
> +vsx3 - Use the Vector Scalar Extension v.3 instruction set (POWER9 and later)

Do all those flags have real use cases in ::gentoo?  I'd really prefer
not having more 'unused flag' warnings ;-).

-- 
Best regards,
Michał Górny


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 618 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-dev] [PATCH 1/2] profiles/desc: descriptions for CPU_FLAGS_PPC use_expand
  2019-08-31  7:11   ` Michał Górny
@ 2019-08-31  7:19     ` Georgy Yakovlev
  2019-08-31  7:29       ` Michał Górny
  0 siblings, 1 reply; 7+ messages in thread
From: Georgy Yakovlev @ 2019-08-31  7:19 UTC (permalink / raw
  To: gentoo-dev; +Cc: Georgy Yakovlev


[-- Attachment #1.1: Type: text/plain, Size: 812 bytes --]

On 8/30/19 11:11 PM, Michał Górny wrote:
> On Sat, 2019-08-31 at 00:03 -0700, Georgy Yakovlev wrote:
<snip>
>> +altivec - Use the AltiVec instruction set
>> +vsx - Use the Vector Scalar Extension instruction set (POWER7 and later)
>> +vsx3 - Use the Vector Scalar Extension v.3 instruction set (POWER9 and later)
> 
> Do all those flags have real use cases in ::gentoo?  I'd really prefer
> not having more 'unused flag' warnings ;-).
> 

yeah, I have mentioned possible users above and there are plenty I
haven't identified yet. patches to ebuilds will follow, I promise =)

for example x264 if built with proper flags gives a noticeable boost,
(at least 2x at encoding), totally worth it.

ppc will not have a lot of flags like on arm or x86, maybe a couple
more, but that's it for now.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-dev] [PATCH 1/2] profiles/desc: descriptions for CPU_FLAGS_PPC use_expand
  2019-08-31  7:19     ` Georgy Yakovlev
@ 2019-08-31  7:29       ` Michał Górny
  2019-08-31  7:44         ` Georgy Yakovlev
  0 siblings, 1 reply; 7+ messages in thread
From: Michał Górny @ 2019-08-31  7:29 UTC (permalink / raw
  To: gentoo-dev; +Cc: Georgy Yakovlev

[-- Attachment #1: Type: text/plain, Size: 1071 bytes --]

On Sat, 2019-08-31 at 00:19 -0700, Georgy Yakovlev wrote:
> On 8/30/19 11:11 PM, Michał Górny wrote:
> > On Sat, 2019-08-31 at 00:03 -0700, Georgy Yakovlev wrote:
> <snip>
> > > +altivec - Use the AltiVec instruction set
> > > +vsx - Use the Vector Scalar Extension instruction set (POWER7 and later)
> > > +vsx3 - Use the Vector Scalar Extension v.3 instruction set (POWER9 and later)
> > 
> > Do all those flags have real use cases in ::gentoo?  I'd really prefer
> > not having more 'unused flag' warnings ;-).
> > 
> 
> yeah, I have mentioned possible users above and there are plenty I
> haven't identified yet. patches to ebuilds will follow, I promise =)
> 
> for example x264 if built with proper flags gives a noticeable boost,
> (at least 2x at encoding), totally worth it.
> 
> ppc will not have a lot of flags like on arm or x86, maybe a couple
> more, but that's it for now.
> 

Just to be clear: we're not talking about -m compiler flags, are we? 
'cause those should be handled via CFLAGS.

-- 
Best regards,
Michał Górny


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 618 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-dev] [PATCH 1/2] profiles/desc: descriptions for CPU_FLAGS_PPC use_expand
  2019-08-31  7:29       ` Michał Górny
@ 2019-08-31  7:44         ` Georgy Yakovlev
  0 siblings, 0 replies; 7+ messages in thread
From: Georgy Yakovlev @ 2019-08-31  7:44 UTC (permalink / raw
  To: gentoo-dev


[-- Attachment #1.1: Type: text/plain, Size: 1284 bytes --]

On 8/30/19 11:29 PM, Michał Górny wrote:
> On Sat, 2019-08-31 at 00:19 -0700, Georgy Yakovlev wrote:
>> On 8/30/19 11:11 PM, Michał Górny wrote:
>>> On Sat, 2019-08-31 at 00:03 -0700, Georgy Yakovlev wrote:
>> <snip>
>>>> +altivec - Use the AltiVec instruction set
>>>> +vsx - Use the Vector Scalar Extension instruction set (POWER7 and later)
>>>> +vsx3 - Use the Vector Scalar Extension v.3 instruction set (POWER9 and later)
>>>
>>> Do all those flags have real use cases in ::gentoo?  I'd really prefer
>>> not having more 'unused flag' warnings ;-).
>>>
>>
>> yeah, I have mentioned possible users above and there are plenty I
>> haven't identified yet. patches to ebuilds will follow, I promise =)
>>
>> for example x264 if built with proper flags gives a noticeable boost,
>> (at least 2x at encoding), totally worth it.
>>
>> ppc will not have a lot of flags like on arm or x86, maybe a couple
>> more, but that's it for now.
>>
> 
> Just to be clear: we're not talking about -m compiler flags, are we? 
> 'cause those should be handled via CFLAGS.
> 

of course not just compiler flags, that's clear.

for example libpng has --enable-powerpc-vsx ./configure flag, and build
system will do it's black magic with intrinsics if it's passed.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-08-31  7:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-31  7:03 [gentoo-dev] PATCH: add CPU_FLAGS_PPC USE_EXPAND Georgy Yakovlev
2019-08-31  7:03 ` [gentoo-dev] [PATCH 1/2] profiles/desc: descriptions for CPU_FLAGS_PPC use_expand Georgy Yakovlev
2019-08-31  7:11   ` Michał Górny
2019-08-31  7:19     ` Georgy Yakovlev
2019-08-31  7:29       ` Michał Górny
2019-08-31  7:44         ` Georgy Yakovlev
2019-08-31  7:03 ` [gentoo-dev] [PATCH 2/2] profiles: Add CPU_FLAGS_PPC to USE_EXPAND Georgy Yakovlev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox