Hardware can use either size, it's a built time option. 64K is standard and is what we use by default and 99% of distros use. 4K is more compatible with desktop applications and GPU drivers, which often assume 4K page size.
Problem from switching page sizes on reboot: btrfs and swaps break, other filesystems like ext4 may become unmountable, sepending on direction of switch 4K <-> 64K. Our installcd provides both kernel options, so users can choose which one to boot. Planned consumers of this flag: sys-kernel/gentoo-kernel sys-kernel/gentoo-kernel-bin ( in the future ) sys-kernel/vanilla-kernel dev-util/google-perftools any other application that has a build time switch to optimize for or set page size. Also can be used by applications that are known to be broken with specific page size. Mesa and amdgpu drivers used to have some problems in the past, but it was fixed, however broken apps still exist. Signed-off-by: Georgy Yakovlev <gyakov...@gentoo.org> --- profiles/arch/powerpc/ppc64/make.defaults | 6 +++++- profiles/base/make.defaults | 4 ++-- profiles/desc/ppc_pagesize.desc | 5 +++++ profiles/embedded/make.defaults | 4 ++-- 4 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 profiles/desc/ppc_pagesize.desc diff --git a/profiles/arch/powerpc/ppc64/make.defaults b/profiles/arch/powerpc/ppc64/make.defaults index ff2526a2530..6555ec277b7 100644 --- a/profiles/arch/powerpc/ppc64/make.defaults +++ b/profiles/arch/powerpc/ppc64/make.defaults @@ -1,41 +1,45 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 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 <gyakov...@gentoo.org> (2022-01-04) +# Unhide PPC specific USE_EXPANDs. +USE_EXPAND_HIDDEN="-PPC_PAGESIZE" + ARCH="ppc64" ACCEPT_KEYWORDS="${ARCH}" CHOST="powerpc64-unknown-linux-gnu" CFLAGS="-O2 -pipe" CXXFLAGS="${CFLAGS}" FFLAGS="${CFLAGS}" FCFLAGS="${CFLAGS}" USE="ibm" MULTILIB_ABIS="ppc64" DEFAULT_ABI="ppc64" KERNEL_ABI="ppc64" PROFILE_ARCH="ppc64" ABI="ppc64" #CFLAGS_ppc64="-m64" LDFLAGS_ppc64="-m elf64ppc" CHOST_ppc64="powerpc64-unknown-linux-gnu" CFLAGS_ppc="-m32" LDFLAGS_ppc="-m elf32ppc" CHOST_ppc="powerpc-unknown-linux-gnu" # Michał Górny <mgo...@gentoo.org> (2014-06-27) # Make the ABI flag implicit for compatibility with native ebuilds. IUSE_IMPLICIT="abi_ppc_64" # Donnie Berkholz <dberkh...@gentoo.org> (2006-08-18) # Defaults for video drivers VIDEO_CARDS="fbdev mga nv r128 radeon" # Enable abi_ppc_64 for packages that don't have it forced. ABI_PPC="64" diff --git a/profiles/base/make.defaults b/profiles/base/make.defaults index 547c7b31e83..0056543be29 100644 --- a/profiles/base/make.defaults +++ b/profiles/base/make.defaults @@ -1,179 +1,179 @@ # Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # # System-wide defaults for the Portage system # See portage(5) manpage # Profile IUSE injection (applies only to ebuilds which use EAPI 5 or later) IUSE_IMPLICIT="prefix prefix-guest prefix-stack" USE_EXPAND_IMPLICIT="ELIBC KERNEL USERLAND" USE_EXPAND_VALUES_ELIBC="AIX bionic Cygwin Darwin DragonFly glibc HPUX Interix mingw musl NetBSD OpenBSD SunOS Winnt" USE_EXPAND_VALUES_KERNEL="AIX Darwin FreeBSD freemint HPUX linux NetBSD OpenBSD SunOS Winnt" 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_S390 ABI_X86 ADA_TARGET ALSA_CARDS APACHE2_MODULES APACHE2_MPMS CALLIGRA_FEATURES CAMERAS COLLECTD_PLUGINS CPU_FLAGS_ARM CPU_FLAGS_PPC CPU_FLAGS_X86 CURL_SSL ELIBC FFTOOLS GPSD_PROTOCOLS GRUB_PLATFORMS INPUT_DEVICES KERNEL L10N LCD_DEVICES LIBREOFFICE_EXTENSIONS LLVM_TARGETS LUA_SINGLE_TARGET LUA_TARGETS MONKEYD_PLUGINS 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 XTABLES_ADDONS" +USE_EXPAND="ABI_MIPS ABI_PPC ABI_S390 ABI_X86 ADA_TARGET ALSA_CARDS APACHE2_MODULES APACHE2_MPMS CALLIGRA_FEATURES CAMERAS COLLECTD_PLUGINS CPU_FLAGS_ARM CPU_FLAGS_PPC CPU_FLAGS_X86 CURL_SSL ELIBC FFTOOLS GPSD_PROTOCOLS GRUB_PLATFORMS INPUT_DEVICES KERNEL L10N LCD_DEVICES LIBREOFFICE_EXTENSIONS LLVM_TARGETS LUA_SINGLE_TARGET LUA_TARGETS MONKEYD_PLUGINS NGINX_MODULES_HTTP NGINX_MODULES_MAIL NGINX_MODULES_STREAM OFED_DRIVERS OFFICE_IMPLEMENTATION OPENMPI_FABRICS OPENMPI_OFED_FEATURES OPENMPI_RM PHP_TARGETS POSTGRES_TARGETS PPC_PAGESIZE PYTHON_SINGLE_TARGET PYTHON_TARGETS QEMU_SOFTMMU_TARGETS QEMU_USER_TARGETS ROS_MESSAGES RUBY_TARGETS SANE_BACKENDS USERLAND UWSGI_PLUGINS VIDEO_CARDS VOICEMAIL_STORAGE 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_S390 ABI_X86 CPU_FLAGS_ARM CPU_FLAGS_PPC CPU_FLAGS_X86" +USE_EXPAND_HIDDEN="USERLAND KERNEL ELIBC ABI_MIPS ABI_PPC ABI_S390 ABI_X86 CPU_FLAGS_ARM CPU_FLAGS_PPC CPU_FLAGS_X86 PPC_PAGESIZE" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf" # EAPI 7 environment variable blacklist. # # DBUS_SESSION_BUS_ADDRESS to avoid trying to access the user's session # bus. # # DISPLAY and XAUTHORITY to avoid trying to access the user's X11. # # CARGO_HOME may leak to build env if package is not using cargo.eclass # such leak will result in sandbox violations # # XDG_* since the values coming from user environment can collide with # ebuild-set ${HOME} (e.g. by referring to user's home directory). # We exclude XDG_DATA_DIRS & XDG_CONFIG_DIRS as those are set in env.d. # # PERL_MM_OPT PERL5LIB PERL5OPT PERL_MB_OPT PERL_CORE PERLPREFIX: # These are guaranteed to confuse perl module installation. Pre-EAPI7 # the Perl eclasses bail out if they are set. Now we declare them here. # # GOBIN needs to be cleaned as random values in GOBIN can affect the # building of some packages: # https://archives.gentoo.org/gentoo-dev/message/163010f83ae7819d80c0cfdf797cbfe0 ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY CARGO_HOME XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR PERL_MM_OPT PERL5LIB PERL5OPT PERL_MB_OPT PERL_CORE PERLPREFIX GOBIN GOPATH" # Variables that are set exclusively by the profile # and not by user configuration files. PROFILE_ONLY_VARIABLES="${PROFILE_ONLY_VARIABLES} ELIBC IUSE_IMPLICIT KERNEL USERLAND USE_EXPAND_IMPLICIT USE_EXPAND_UNPREFIXED USE_EXPAND_VALUES_ELIBC USE_EXPAND_VALUES_KERNEL USE_EXPAND_VALUES_USERLAND" # 'Sane' defaults ELIBC="glibc" KERNEL="linux" USERLAND="GNU" INPUT_DEVICES="libinput" # Accept only licenses in the FREE license group, i.e., with # the freedom to use, share, modify and share modifications ACCEPT_LICENSE="-* @FREE" # Tomáš Chvátal <scarab...@gentoo.org> (2013-03-23) # By default enable libreoffice implementation only. OFFICE_IMPLEMENTATION="libreoffice" # Tomáš Chvátal <scarab...@gentoo.org> (2011-08-12) # By default do not build any grub platform and let it guess. GRUB_PLATFORMS="" # Tomáš Chvátal <scarab...@gentoo.org> (2013-05-05) # By default enable all extensions with no dependencies LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" # Andreas K. Hüttel <dilfri...@gentoo.org> (2011-08-19, 2012-03-25) # Johannes Huber <j...@gentoo.org> (2018-04-15) # Andreas Sturmlechner <ast...@gentoo.org> (2019-01-01) # By default build all calligra features (except unmaintained: stage). CALLIGRA_FEATURES="karbon sheets words" # Andreas K. Huettel <dilfri...@gentoo.org> (2010-09-28) # Small default list of enabled plugins for collectd COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" # Tomáš Chvátal <scarab...@gentoo.org> (2010-10-26) # By default enable all protocols for average GPS user GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" # Benedikt Böhm <hol...@gentoo.org> (2007-11-27) # Sane defaults for built-in apache modules # Patrick Lauer <patr...@gentoo.org> (2012-10-12) # extend for apache 2.4 APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" # Peter Volkov <p...@gentoo.org> (2010-04-29) # Set some defaults or package will fail to build (Check mconfig in package sources) XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account" # Robert Buchholz <r...@gentoo.org> (2006-01-17) # Some common lcd devices LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" # Manuel Rüger <mr...@gentoo.org> (2015-09-09) # Default Ruby build target(s) # Updated to include ruby27 on 2021-10-10 RUBY_TARGETS="ruby26 ruby27" # Enable extended filesystem attribute support by default. # https://archives.gentoo.org/gentoo-dev/message/ba0e3457e4b807e79816f0df03566af0 USE="${USE} xattr" # Mike Gilbert <flop...@gentoo.org> (2019-07-14) # Enable split-usr by default to keep existing installs as-is. USE="${USE} split-usr" # Tiziano Müller <dev-z...@gentoo.org> (2010-01-24) # We usually don't want python to (re)write .py[co] files during phase runs # since it could cause sandbox violations PYTHONDONTWRITEBYTECODE="1" # Jorge Manuel B. S. Vicetto <jmbsvice...@gentoo.org> (2011-11-16) # Add default USE value for bootstrap and rename it from STAGE1_USE to BOOTSTRAP_USE # Add in expanded PYTHON_TARGETS or stage1 builds break because of USE="-* ${BOOTSTRAP_USE}" # This MUST be kept in sync with the PYTHON_TARGETS below # Mike Gilbert <flop...@gentoo.org> (2018-05-23) # sys-apps/baselayout-2.5 needs split-usr enabled. BOOTSTRAP_USE="unicode internal-glib pkg-config split-usr xml python_targets_python3_9" # Mike Gilbert <flop...@gentoo.org> (2012-05-15) # Default target(s) for python-r1.eclass # Michał Górny <mgo...@gentoo.org> (2021-06-01) # Updated to python3.9 PYTHON_TARGETS="python3_9" PYTHON_SINGLE_TARGET="python3_9" # Michał Górny <mgo...@gentoo.org> (2013-08-10) # Moved from portage's make.globals. # 1) do not uninstall kernel modules and therefore allow replacing them, # 2,3) removed wrt bug #663170, # 4) protect /var/{run,lock} symlinks for bug 519620 COLLISION_IGNORE="/lib/modules/*" UNINSTALL_IGNORE="/lib/modules/* /var/run /var/lock" # Andreas K. Hüttel <dilfri...@gentoo.org> (2013-08-23) # Make emerge messages default to English as per Council decision LC_MESSAGES="C" # Brian Dolbec <dol...@gentoo.org> (2017-06-16) # disable twisted's plugin cache update to prevent access violations # call /usr/bin/twisted-regen-cache in pkg_postinst() TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE="1" # Aaron W. Swenson <titanof...@gentoo.org> (2017-07-09) # Default target(s) for postgres{,-multi}.eclass POSTGRES_TARGETS="postgres12 postgres13" # Michael Orlitzky <m...@gentoo.org> (2017-11-17) # # Default PHP targets, used only for extensions at the moment. # # The value of this variable should be chosen to be "least annoying by # default." For example, some packages support only php-5.x and some # only php-7.x. By having both "php5-6" and php7-0" in PHP_TARGETS, we # ensure that users who don't care one way or the other don't have to # mess with this variable in order to install those packages. # # Moreover, it should only contain targets that have a stable version # of PHP, to avoid pulling in an unstable PHP on stable systems. # PHP_TARGETS="php7-3 php7-4" # Alfredo Tupone <tup...@gentoo.org> (2019-09-03) # # Default ADA target ADA_TARGET="gnat_2020" # Marek Szuba <mare...@gentoo.org> (2020-10-15) # Default targets for lua{,-single}.eclass LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" diff --git a/profiles/desc/ppc_pagesize.desc b/profiles/desc/ppc_pagesize.desc new file mode 100644 index 00000000000..3e1f616257d --- /dev/null +++ b/profiles/desc/ppc_pagesize.desc @@ -0,0 +1,5 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +4K - Configure for 4K page size (4096 bytes) +64K - Configure for 64K page size (65536 bytes) diff --git a/profiles/embedded/make.defaults b/profiles/embedded/make.defaults index 4320f726a5e..cb409cc713a 100644 --- a/profiles/embedded/make.defaults +++ b/profiles/embedded/make.defaults @@ -1,45 +1,45 @@ # Copyright 2008-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 USE="kdrive minimal multicall zlib" CFLAGS="-Os -pipe" CXXFLAGS="${CFLAGS}" FFLAGS="${CFLAGS}" FCFLAGS="${CFLAGS}" CLEAN_DELAY="0" EPAUSE_IGNORE="1" EBEEP_IGNORE="1" PORTAGE_WORKDIR_MODE="2775" PORTAGE_ECLASS_WARNING_ENABLE="0" INPUT_DEVICES="evdev" VIDEO_CARDS="fbdev" KERNEL="linux" USERLAND="GNU" LINGUAS="en" # Profile IUSE injection (applies only to ebuilds which use EAPI 5 or later) IUSE_IMPLICIT="prefix prefix-guest prefix-stack" USE_EXPAND_UNPREFIXED="ARCH" USE_EXPAND_IMPLICIT="ARCH ELIBC KERNEL USERLAND" USE_EXPAND_VALUES_ARCH="alpha amd64 amd64-fbsd amd64-linux arm arm64 hppa ia64 m68k mips ppc ppc64 ppc64-linux ppc-macos riscv s390 sparc sparc64-solaris sparc-solaris x64-cygwin x64-macos x64-solaris x64-winnt x86 x86-fbsd x86-linux x86-solaris x86-winnt" USE_EXPAND_VALUES_ELIBC="AIX bionic Cygwin Darwin DragonFly glibc HPUX Interix mingw musl NetBSD OpenBSD SunOS Winnt" USE_EXPAND_VALUES_KERNEL="AIX Darwin FreeBSD freemint HPUX linux NetBSD OpenBSD SunOS Winnt" 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_S390 ABI_X86 ADA_TARGET ALSA_CARDS APACHE2_MODULES APACHE2_MPMS CALLIGRA_FEATURES CAMERAS COLLECTD_PLUGINS CPU_FLAGS_ARM CPU_FLAGS_PPC CPU_FLAGS_X86 CURL_SSL ELIBC FFTOOLS GPSD_PROTOCOLS GRUB_PLATFORMS INPUT_DEVICES KERNEL L10N LCD_DEVICES LIBREOFFICE_EXTENSIONS LLVM_TARGETS LUA_SINGLE_TARGET LUA_TARGETS MONKEYD_PLUGINS 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 XTABLES_ADDONS" +USE_EXPAND="ABI_MIPS ABI_PPC ABI_S390 ABI_X86 ADA_TARGET ALSA_CARDS APACHE2_MODULES APACHE2_MPMS CALLIGRA_FEATURES CAMERAS COLLECTD_PLUGINS CPU_FLAGS_ARM CPU_FLAGS_PPC CPU_FLAGS_X86 CURL_SSL ELIBC FFTOOLS GPSD_PROTOCOLS GRUB_PLATFORMS INPUT_DEVICES KERNEL L10N LCD_DEVICES LIBREOFFICE_EXTENSIONS LLVM_TARGETS LUA_SINGLE_TARGET LUA_TARGETS MONKEYD_PLUGINS 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 PPC_PAGESIZE PYTHON_TARGETS QEMU_SOFTMMU_TARGETS QEMU_USER_TARGETS ROS_MESSAGES RUBY_TARGETS SANE_BACKENDS USERLAND UWSGI_PLUGINS VIDEO_CARDS VOICEMAIL_STORAGE 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_S390 ABI_X86 CPU_FLAGS_ARM CPU_FLAGS_PPC CPU_FLAGS_X86" +USE_EXPAND_HIDDEN="USERLAND KERNEL ELIBC ABI_MIPS ABI_PPC ABI_S390 ABI_X86 CPU_FLAGS_ARM CPU_FLAGS_PPC CPU_FLAGS_X86 PPC_PAGESIZE" # Variables that are set exclusively by the profile # and not by user configuration files. PROFILE_ONLY_VARIABLES="IUSE_IMPLICIT USERLAND USE_EXPAND_IMPLICIT USE_EXPAND_UNPREFIXED USE_EXPAND_VALUES_ARCH USE_EXPAND_VALUES_ELIBC USE_EXPAND_VALUES_KERNEL USE_EXPAND_VALUES_USERLAND" # Accept only licenses in the FREE license group, i.e., with # the freedom to use, share, modify and share modifications ACCEPT_LICENSE="-* @FREE" -- 2.34.1