感谢提点!
我使用了双路E5-2696 v4 CPU, 按产品线属于broadwell, 但gentoo官方的安全CFLAGS手册中没有提到E5 v4系列, 我之前设置CFLAGS="-march=broadwell" 倒也没出什么问题. emacs出现问题后, 我把CFLAGS改回-march=native, 并重新编译了emacs, nettle和glibc, 但问题仍然存在.
以下是make.conf
CFLAGS="-march=native -O3 -pipe"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j89"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
CHOST="x86_64-pc-linux-gnu"
# These are the USE and USE_EXPAND flags that were used for
# buidling in addition to what is provided by the profile.
USE="X abi_x86_64"
CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3 sse4 sse4a"
PORTDIR="/usr/portage"
DISTDIR="${PORTDIR}/distfiles"
PKGDIR="${PORTDIR}/packages"
PYTHON_TARGETS="python2_7 python3_5 python3_6"
#iiPYTHON_TARGETS="python3_5"
GENTOO_MIRRORS="http://mirrors.163.com/gentoo/"
source /var/lib/layman/make.conf
PORTDIR_OVERLAY=${PORTDIR_OVERLAY}
APACHE2_MPMS="event"
NGINX_MODULES_HTTP="cache_purge gzip rewrite proxy memcached fastcgi map dav dav_ext auth_basic auth_pam auth_request"
NGINX_MODULES_STREAM="upstream"
PHP_TARGETS="php5-6 php7-1"
GRUB_PLATFORMS="efi-64"
LINGUAS="en zh_CN"
L10N="zh"
以下是emerge --info
Portage 2.3.24 (python 3.5.4-final-0, default/linux/amd64/17.0/no-multilib, gcc-6.4.0, glibc-2.25-r11, 4.9.6-gentoo-r1-Enigma x86_64)
=================================================================
System uname: Linux-4.9.6-gentoo-r1-Enigma-x86_64-Intel-R-_Xeon-R-_CPU_E5-2696_v4_@_2.20GHz-with-gentoo-2.3
KiB Mem: 131903576 total, 103661872 free
KiB Swap: 134217724 total, 134217724 free
Timestamp of repository gentoo: Wed, 30 May 2018 02:00:01 +0000
Head commit of repository gentoo: 826b0d45dfea7e855ce336f4592acd9a1c9149ac
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash: 4.3_p48-r1::gentoo
dev-java/java-config: 2.2.0-r4::gentoo
dev-lang/perl: 5.24.1-r1::gentoo
dev-lang/python: 2.7.12::gentoo, 3.4.5::gentoo, 3.5.4::gentoo, 3.6.5::gentoo
dev-util/cmake: 3.9.6::gentoo
dev-util/pkgconfig: 0.28-r2::gentoo
sys-apps/baselayout: 2.3::gentoo
sys-apps/openrc: 0.32.1::gentoo
sys-apps/sandbox: 2.10-r3::gentoo
sys-devel/autoconf: 2.13::gentoo, 2.69::gentoo
sys-devel/automake: 1.9.6-r4::gentoo, 1.14.1::gentoo, 1.15.1-r2::gentoo
sys-devel/binutils: 2.25.1-r1::gentoo, 2.28.1::gentoo, 2.29.1-r1::gentoo
sys-devel/gcc: 4.8.5::gentoo, 4.9.4::gentoo, 5.4.0-r3::gentoo, 6.4.0-r1::gentoo, 7.3.0-r1::gentoo
sys-devel/gcc-config: 1.8-r1::gentoo
sys-devel/libtool: 2.4.6-r2::gentoo
sys-devel/make: 4.1-r1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc: 2.25-r11::gentoo
Repositories:
gentoo
location: /usr/portage
sync-type: rsync
sync-uri: rsync://rsync.gentoo.org/gentoo-portage
priority: -1000
sync-rsync-verify-metamanifest: no
sync-rsync-extra-opts:
archenroot
location: /var/lib/layman/archenroot
masters: gentoo
priority: 50
betagarden
location: /var/lib/layman/betagarden
masters: gentoo
priority: 50
cg
location: /var/lib/layman/cg
masters: gentoo
priority: 50
dotnet
location: /var/lib/layman/dotnet
masters: gentoo
priority: 50
jm-overlay
location: /var/lib/layman/jm-overlay
masters: dotnet gentoo
priority: 50
pigfoot
location: /var/lib/layman/pigfoot
masters: gentoo
priority: 50
proaudio
location: /var/lib/layman/proaudio
masters: gentoo
priority: 50
seeds
location: /var/lib/layman/seeds
masters: gentoo
priority: 50
ssnb
location: /var/lib/layman/ssnb
masters: gentoo
priority: 50
ultrabug
location: /var/lib/layman/ultrabug
masters: gentoo
priority: 50
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O3 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.0/conf /usr/share/maven-bin-3.3/conf"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/apache2-php7.1/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cgi-php7.1/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/php/cli-php7.1/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirrors.163.com/gentoo/"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en zh_CN"
MAKEOPTS="-j89"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X acl amd64 berkdb bzip2 cli crypt cxx dri fortran gdbm iconv ipv6 modules ncurses nls nptl openmp pam pcre readline seccomp ssl tcpd unicode xattr zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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" APACHE2_MPMS="event" CALLIGRA_FEATURES="karbon plan sheets stage words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3 sse4 sse4a" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" L10N="zh" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NGINX_MODULES_HTTP="cache_purge gzip rewrite proxy memcached fastcgi map dav dav_ext auth_basic auth_pam auth_request" NGINX_MODULES_STREAM="upstream" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5 python3_6" RUBY_TARGETS="ruby23" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS