diff options
author | Eli Schwartz <eschwartz@gentoo.org> | 2024-08-27 00:33:01 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz@gentoo.org> | 2024-08-27 02:52:13 -0400 |
commit | 9655793b0f9a93d99d562d5cecae589deed0e1ba (patch) | |
tree | ab12ab1abeaa4de1bc8ead06fffbfe40183d7097 | |
parent | add server package of qtbase (diff) | |
download | binhost-9655793b0f9a93d99d562d5cecae589deed0e1ba.tar.gz binhost-9655793b0f9a93d99d562d5cecae589deed0e1ba.tar.bz2 binhost-9655793b0f9a93d99d562d5cecae589deed0e1ba.zip |
start implementing LTO; activate PGO builds
We run one builder with USE="lto pgo" and the rest without, because we
want to also build packages for the default USE flags (no lto/pgo).
Although USE=lto is being phased out, the GCC package in particular
hasn't migrated.
Start opting a few packages in to LTO via *FLAGS as well. Remaining
sys-devel packages are a good target for this.
Note: xorg-server must be built with xvfb support for firefox to do PGO.
It otherwise uses the same config for gnome/kde anyway.
Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
26 files changed, 110 insertions, 14 deletions
diff --git a/builders/milou/gnome-23/portage/env/lto.conf b/builders/milou/gnome-23/portage/env/lto.conf new file mode 100644 index 0000000..37647dd --- /dev/null +++ b/builders/milou/gnome-23/portage/env/lto.conf @@ -0,0 +1,5 @@ +CFLAGS="${CFLAGS} -flto" +CXXFLAGS="${CXXFLAGS} -flto" +FCFLAGS="${FCFLAGS} -flto" +FFLAGS="${FFLAGS} -flto" +LDFLAGS="${LDFLAGS} -flto" diff --git a/builders/milou/gnome-23/portage/make.conf b/builders/milou/gnome-23/portage/make.conf index 537f5b4..787eb6f 100644 --- a/builders/milou/gnome-23/portage/make.conf +++ b/builders/milou/gnome-23/portage/make.conf @@ -2,12 +2,17 @@ # built this stage. # Please consult /usr/share/portage/config/make.conf.example for a more # detailed example. -COMMON_FLAGS="-O2 -pipe -march=x86-64 -mtune=generic" + +# For now, we enforce LTO warnings but only enable LTO for certain packages. +LTOFLAGS="-Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing" +COMMON_FLAGS="-O2 -pipe -march=x86-64 -mtune=generic ${LTOFLAGS}" CFLAGS="${COMMON_FLAGS}" CXXFLAGS="${COMMON_FLAGS}" FCFLAGS="${COMMON_FLAGS}" FFLAGS="${COMMON_FLAGS}" +LDFLAGS="${LDFLAGS} ${LTOFLAGS}" + # NOTE: This stage was built with the bindist Use flag enabled PORTDIR="/var/db/repos/gentoo" DISTDIR="/var/cache/distfiles" @@ -26,11 +31,10 @@ FEATURES="binpkg-multi-instance buildpkg compress-index -network-sandbox" BINPKG_FORMAT="gpkg" BINPKG_COMPRESS="xz" -USE="bindist cet" +USE="bindist cet lto pgo" ACCEPT_RESTRICT="* -bindist" ACCEPT_LICENSE="@FREE MPEG-4" LC_ALL="en_US.utf8" - diff --git a/builders/milou/gnome-23/portage/package.env/lto b/builders/milou/gnome-23/portage/package.env/lto new file mode 100644 index 0000000..91d5f6b --- /dev/null +++ b/builders/milou/gnome-23/portage/package.env/lto @@ -0,0 +1,2 @@ +dev-lang/python lto.conf +sys-devel/* lto.conf diff --git a/builders/milou/gnome-23/portage/package.use/pgo b/builders/milou/gnome-23/portage/package.use/pgo new file mode 100644 index 0000000..07b62df --- /dev/null +++ b/builders/milou/gnome-23/portage/package.use/pgo @@ -0,0 +1,2 @@ +# needed by firefox +x11-base/xorg-server xvfb diff --git a/builders/milou/gnome-v3-23/portage/env/lto.conf b/builders/milou/gnome-v3-23/portage/env/lto.conf new file mode 100644 index 0000000..37647dd --- /dev/null +++ b/builders/milou/gnome-v3-23/portage/env/lto.conf @@ -0,0 +1,5 @@ +CFLAGS="${CFLAGS} -flto" +CXXFLAGS="${CXXFLAGS} -flto" +FCFLAGS="${FCFLAGS} -flto" +FFLAGS="${FFLAGS} -flto" +LDFLAGS="${LDFLAGS} -flto" diff --git a/builders/milou/gnome-v3-23/portage/make.conf b/builders/milou/gnome-v3-23/portage/make.conf index 18a732c..a33e112 100644 --- a/builders/milou/gnome-v3-23/portage/make.conf +++ b/builders/milou/gnome-v3-23/portage/make.conf @@ -2,12 +2,17 @@ # built this stage. # Please consult /usr/share/portage/config/make.conf.example for a more # detailed example. -COMMON_FLAGS="-O2 -pipe -march=x86-64-v3" + +# For now, we enforce LTO warnings but only enable LTO for certain packages. +LTOFLAGS="-Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing" +COMMON_FLAGS="-O2 -pipe -march=x86-64-v3 ${LTOFLAGS}" CFLAGS="${COMMON_FLAGS}" CXXFLAGS="${COMMON_FLAGS}" FCFLAGS="${COMMON_FLAGS}" FFLAGS="${COMMON_FLAGS}" +LDFLAGS="${LDFLAGS} ${LTOFLAGS}" + # NOTE: This stage was built with the bindist Use flag enabled PORTDIR="/var/db/repos/gentoo" DISTDIR="/var/cache/distfiles" @@ -26,7 +31,7 @@ FEATURES="binpkg-multi-instance buildpkg compress-index -network-sandbox" BINPKG_FORMAT="gpkg" BINPKG_COMPRESS="xz" -USE="bindist cet" +USE="bindist cet lto pgo" ACCEPT_RESTRICT="* -bindist" diff --git a/builders/milou/gnome-v3-23/portage/package.env/lto b/builders/milou/gnome-v3-23/portage/package.env/lto new file mode 100644 index 0000000..91d5f6b --- /dev/null +++ b/builders/milou/gnome-v3-23/portage/package.env/lto @@ -0,0 +1,2 @@ +dev-lang/python lto.conf +sys-devel/* lto.conf diff --git a/builders/milou/gnome-v3-23/portage/package.use/pgo b/builders/milou/gnome-v3-23/portage/package.use/pgo new file mode 100644 index 0000000..07b62df --- /dev/null +++ b/builders/milou/gnome-v3-23/portage/package.use/pgo @@ -0,0 +1,2 @@ +# needed by firefox +x11-base/xorg-server xvfb diff --git a/builders/milou/kde-23/portage/env/lto.conf b/builders/milou/kde-23/portage/env/lto.conf new file mode 100644 index 0000000..37647dd --- /dev/null +++ b/builders/milou/kde-23/portage/env/lto.conf @@ -0,0 +1,5 @@ +CFLAGS="${CFLAGS} -flto" +CXXFLAGS="${CXXFLAGS} -flto" +FCFLAGS="${FCFLAGS} -flto" +FFLAGS="${FFLAGS} -flto" +LDFLAGS="${LDFLAGS} -flto" diff --git a/builders/milou/kde-23/portage/make.conf b/builders/milou/kde-23/portage/make.conf index 537f5b4..105f980 100644 --- a/builders/milou/kde-23/portage/make.conf +++ b/builders/milou/kde-23/portage/make.conf @@ -2,12 +2,17 @@ # built this stage. # Please consult /usr/share/portage/config/make.conf.example for a more # detailed example. -COMMON_FLAGS="-O2 -pipe -march=x86-64 -mtune=generic" + +# For now, we enforce LTO warnings but only enable LTO for certain packages. +LTOFLAGS="-Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing" +COMMON_FLAGS="-O2 -pipe -march=x86-64 -mtune=generic ${LTOFLAGS}" CFLAGS="${COMMON_FLAGS}" CXXFLAGS="${COMMON_FLAGS}" FCFLAGS="${COMMON_FLAGS}" FFLAGS="${COMMON_FLAGS}" +LDFLAGS="${LDFLAGS} ${LTOFLAGS}" + # NOTE: This stage was built with the bindist Use flag enabled PORTDIR="/var/db/repos/gentoo" DISTDIR="/var/cache/distfiles" @@ -33,4 +38,3 @@ ACCEPT_RESTRICT="* -bindist" ACCEPT_LICENSE="@FREE MPEG-4" LC_ALL="en_US.utf8" - diff --git a/builders/milou/kde-23/portage/package.env/lto b/builders/milou/kde-23/portage/package.env/lto new file mode 100644 index 0000000..91d5f6b --- /dev/null +++ b/builders/milou/kde-23/portage/package.env/lto @@ -0,0 +1,2 @@ +dev-lang/python lto.conf +sys-devel/* lto.conf diff --git a/builders/milou/kde-v3-23/portage/env/lto.conf b/builders/milou/kde-v3-23/portage/env/lto.conf new file mode 100644 index 0000000..37647dd --- /dev/null +++ b/builders/milou/kde-v3-23/portage/env/lto.conf @@ -0,0 +1,5 @@ +CFLAGS="${CFLAGS} -flto" +CXXFLAGS="${CXXFLAGS} -flto" +FCFLAGS="${FCFLAGS} -flto" +FFLAGS="${FFLAGS} -flto" +LDFLAGS="${LDFLAGS} -flto" diff --git a/builders/milou/kde-v3-23/portage/make.conf b/builders/milou/kde-v3-23/portage/make.conf index 18a732c..80e255d 100644 --- a/builders/milou/kde-v3-23/portage/make.conf +++ b/builders/milou/kde-v3-23/portage/make.conf @@ -2,12 +2,17 @@ # built this stage. # Please consult /usr/share/portage/config/make.conf.example for a more # detailed example. -COMMON_FLAGS="-O2 -pipe -march=x86-64-v3" + +# For now, we enforce LTO warnings but only enable LTO for certain packages. +LTOFLAGS="-Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing" +COMMON_FLAGS="-O2 -pipe -march=x86-64-v3 ${LTOFLAGS}" CFLAGS="${COMMON_FLAGS}" CXXFLAGS="${COMMON_FLAGS}" FCFLAGS="${COMMON_FLAGS}" FFLAGS="${COMMON_FLAGS}" +LDFLAGS="${LDFLAGS} ${LTOFLAGS}" + # NOTE: This stage was built with the bindist Use flag enabled PORTDIR="/var/db/repos/gentoo" DISTDIR="/var/cache/distfiles" diff --git a/builders/milou/kde-v3-23/portage/package.env/lto b/builders/milou/kde-v3-23/portage/package.env/lto new file mode 100644 index 0000000..91d5f6b --- /dev/null +++ b/builders/milou/kde-v3-23/portage/package.env/lto @@ -0,0 +1,2 @@ +dev-lang/python lto.conf +sys-devel/* lto.conf diff --git a/builders/milou/openrc-23/portage/env/lto.conf b/builders/milou/openrc-23/portage/env/lto.conf new file mode 100644 index 0000000..37647dd --- /dev/null +++ b/builders/milou/openrc-23/portage/env/lto.conf @@ -0,0 +1,5 @@ +CFLAGS="${CFLAGS} -flto" +CXXFLAGS="${CXXFLAGS} -flto" +FCFLAGS="${FCFLAGS} -flto" +FFLAGS="${FFLAGS} -flto" +LDFLAGS="${LDFLAGS} -flto" diff --git a/builders/milou/openrc-23/portage/make.conf b/builders/milou/openrc-23/portage/make.conf index 537f5b4..105f980 100644 --- a/builders/milou/openrc-23/portage/make.conf +++ b/builders/milou/openrc-23/portage/make.conf @@ -2,12 +2,17 @@ # built this stage. # Please consult /usr/share/portage/config/make.conf.example for a more # detailed example. -COMMON_FLAGS="-O2 -pipe -march=x86-64 -mtune=generic" + +# For now, we enforce LTO warnings but only enable LTO for certain packages. +LTOFLAGS="-Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing" +COMMON_FLAGS="-O2 -pipe -march=x86-64 -mtune=generic ${LTOFLAGS}" CFLAGS="${COMMON_FLAGS}" CXXFLAGS="${COMMON_FLAGS}" FCFLAGS="${COMMON_FLAGS}" FFLAGS="${COMMON_FLAGS}" +LDFLAGS="${LDFLAGS} ${LTOFLAGS}" + # NOTE: This stage was built with the bindist Use flag enabled PORTDIR="/var/db/repos/gentoo" DISTDIR="/var/cache/distfiles" @@ -33,4 +38,3 @@ ACCEPT_RESTRICT="* -bindist" ACCEPT_LICENSE="@FREE MPEG-4" LC_ALL="en_US.utf8" - diff --git a/builders/milou/openrc-23/portage/package.env/lto b/builders/milou/openrc-23/portage/package.env/lto new file mode 100644 index 0000000..91d5f6b --- /dev/null +++ b/builders/milou/openrc-23/portage/package.env/lto @@ -0,0 +1,2 @@ +dev-lang/python lto.conf +sys-devel/* lto.conf diff --git a/builders/milou/openrc-v3-23/portage/env/lto.conf b/builders/milou/openrc-v3-23/portage/env/lto.conf new file mode 100644 index 0000000..37647dd --- /dev/null +++ b/builders/milou/openrc-v3-23/portage/env/lto.conf @@ -0,0 +1,5 @@ +CFLAGS="${CFLAGS} -flto" +CXXFLAGS="${CXXFLAGS} -flto" +FCFLAGS="${FCFLAGS} -flto" +FFLAGS="${FFLAGS} -flto" +LDFLAGS="${LDFLAGS} -flto" diff --git a/builders/milou/openrc-v3-23/portage/make.conf b/builders/milou/openrc-v3-23/portage/make.conf index 18a732c..80e255d 100644 --- a/builders/milou/openrc-v3-23/portage/make.conf +++ b/builders/milou/openrc-v3-23/portage/make.conf @@ -2,12 +2,17 @@ # built this stage. # Please consult /usr/share/portage/config/make.conf.example for a more # detailed example. -COMMON_FLAGS="-O2 -pipe -march=x86-64-v3" + +# For now, we enforce LTO warnings but only enable LTO for certain packages. +LTOFLAGS="-Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing" +COMMON_FLAGS="-O2 -pipe -march=x86-64-v3 ${LTOFLAGS}" CFLAGS="${COMMON_FLAGS}" CXXFLAGS="${COMMON_FLAGS}" FCFLAGS="${COMMON_FLAGS}" FFLAGS="${COMMON_FLAGS}" +LDFLAGS="${LDFLAGS} ${LTOFLAGS}" + # NOTE: This stage was built with the bindist Use flag enabled PORTDIR="/var/db/repos/gentoo" DISTDIR="/var/cache/distfiles" diff --git a/builders/milou/openrc-v3-23/portage/package.env/lto b/builders/milou/openrc-v3-23/portage/package.env/lto new file mode 100644 index 0000000..91d5f6b --- /dev/null +++ b/builders/milou/openrc-v3-23/portage/package.env/lto @@ -0,0 +1,2 @@ +dev-lang/python lto.conf +sys-devel/* lto.conf diff --git a/builders/milou/server-23/portage/env/lto.conf b/builders/milou/server-23/portage/env/lto.conf new file mode 100644 index 0000000..37647dd --- /dev/null +++ b/builders/milou/server-23/portage/env/lto.conf @@ -0,0 +1,5 @@ +CFLAGS="${CFLAGS} -flto" +CXXFLAGS="${CXXFLAGS} -flto" +FCFLAGS="${FCFLAGS} -flto" +FFLAGS="${FFLAGS} -flto" +LDFLAGS="${LDFLAGS} -flto" diff --git a/builders/milou/server-23/portage/make.conf b/builders/milou/server-23/portage/make.conf index 537f5b4..105f980 100644 --- a/builders/milou/server-23/portage/make.conf +++ b/builders/milou/server-23/portage/make.conf @@ -2,12 +2,17 @@ # built this stage. # Please consult /usr/share/portage/config/make.conf.example for a more # detailed example. -COMMON_FLAGS="-O2 -pipe -march=x86-64 -mtune=generic" + +# For now, we enforce LTO warnings but only enable LTO for certain packages. +LTOFLAGS="-Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing" +COMMON_FLAGS="-O2 -pipe -march=x86-64 -mtune=generic ${LTOFLAGS}" CFLAGS="${COMMON_FLAGS}" CXXFLAGS="${COMMON_FLAGS}" FCFLAGS="${COMMON_FLAGS}" FFLAGS="${COMMON_FLAGS}" +LDFLAGS="${LDFLAGS} ${LTOFLAGS}" + # NOTE: This stage was built with the bindist Use flag enabled PORTDIR="/var/db/repos/gentoo" DISTDIR="/var/cache/distfiles" @@ -33,4 +38,3 @@ ACCEPT_RESTRICT="* -bindist" ACCEPT_LICENSE="@FREE MPEG-4" LC_ALL="en_US.utf8" - diff --git a/builders/milou/server-23/portage/package.env/lto b/builders/milou/server-23/portage/package.env/lto new file mode 100644 index 0000000..91d5f6b --- /dev/null +++ b/builders/milou/server-23/portage/package.env/lto @@ -0,0 +1,2 @@ +dev-lang/python lto.conf +sys-devel/* lto.conf diff --git a/builders/milou/server-v3-23/portage/env/lto.conf b/builders/milou/server-v3-23/portage/env/lto.conf new file mode 100644 index 0000000..37647dd --- /dev/null +++ b/builders/milou/server-v3-23/portage/env/lto.conf @@ -0,0 +1,5 @@ +CFLAGS="${CFLAGS} -flto" +CXXFLAGS="${CXXFLAGS} -flto" +FCFLAGS="${FCFLAGS} -flto" +FFLAGS="${FFLAGS} -flto" +LDFLAGS="${LDFLAGS} -flto" diff --git a/builders/milou/server-v3-23/portage/make.conf b/builders/milou/server-v3-23/portage/make.conf index 18a732c..80e255d 100644 --- a/builders/milou/server-v3-23/portage/make.conf +++ b/builders/milou/server-v3-23/portage/make.conf @@ -2,12 +2,17 @@ # built this stage. # Please consult /usr/share/portage/config/make.conf.example for a more # detailed example. -COMMON_FLAGS="-O2 -pipe -march=x86-64-v3" + +# For now, we enforce LTO warnings but only enable LTO for certain packages. +LTOFLAGS="-Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing" +COMMON_FLAGS="-O2 -pipe -march=x86-64-v3 ${LTOFLAGS}" CFLAGS="${COMMON_FLAGS}" CXXFLAGS="${COMMON_FLAGS}" FCFLAGS="${COMMON_FLAGS}" FFLAGS="${COMMON_FLAGS}" +LDFLAGS="${LDFLAGS} ${LTOFLAGS}" + # NOTE: This stage was built with the bindist Use flag enabled PORTDIR="/var/db/repos/gentoo" DISTDIR="/var/cache/distfiles" diff --git a/builders/milou/server-v3-23/portage/package.env/lto b/builders/milou/server-v3-23/portage/package.env/lto new file mode 100644 index 0000000..91d5f6b --- /dev/null +++ b/builders/milou/server-v3-23/portage/package.env/lto @@ -0,0 +1,2 @@ +dev-lang/python lto.conf +sys-devel/* lto.conf |