Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bugzilla DB migration completed. Please report issues to Infra team via email via infra@gentoo.org or IRC

Bug 582690

Summary: sys-libs/glibc-2.23-r2: gcc-6.1.0[ssp,pie] Fail to detect ssp on as default with -m32 in configure ssp check when pie is enable
Product: Gentoo Linux Reporter: Magnus Granberg <zorry>
Component: HardenedAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED FIXED    
Severity: normal CC: hardened
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://sourceware.org/bugzilla/show_bug.cgi?20662
See Also: https://sourceware.org/bugzilla/show_bug.cgi?id=20662
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 582084, 582688    
Attachments: x86 config.log
amd64 config.log
build log
patch for glibc configure

Description Magnus Granberg gentoo-dev 2016-05-10 22:05:41 UTC
When Gcc 6.1.0 have ssp enable as default the configure script fail to dectect if is enable or not.
with -m64 the configure test works fine but with -m32 it fail to detect so glibc
fail to compile

* Running toolchain-glibc_src_configure for ABI amd64

 * Configuring glibc for nptl
 *             ABI:   amd64
 *          CBUILD:   x86_64-pc-linux-gnu
 *           CHOST:   x86_64-pc-linux-gnu
 *         CTARGET:   x86_64-pc-linux-gnu
 *      CBUILD_OPT:   x86_64-pc-linux-gnu
 *     CTARGET_OPT:   x86_64-pc-linux-gnu
 *              CC:   x86_64-pc-linux-gnu-gcc -m64
 *              LD:   
 *         ASFLAGS:   
 *          CFLAGS:   -pipe -march=native -O2 -fno-strict-aliasing
 *        CPPFLAGS:   
 *        CXXFLAGS:   -pipe -march=native -O2 -fno-strict-aliasing
 *         LDFLAGS:   -Wl,-O1 -Wl,--as-needed
 *       Manual CC:   x86_64-pc-linux-gnu-gcc -m64 -Wl,-O1 -Wl,--as-needed

/var/tmp/portage/sys-libs/glibc-2.23-r2/work/glibc-2.23/configure --disable-stackguard-randomization --enable-kernel=2.6.32 --enable-add-ons=c_stubs,libidn --without-selinux --without-cvs --disable-werror --enable-bind-now --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --disable-profile --without-gd --with-headers=/usr/include --prefix=/usr --libdir=/usr/lib64 --mandir=/usr/share/man --infodir=/usr/share/info --libexecdir=/usr/lib64/misc/glibc --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion=Gentoo 2.23-r2 p4 --enable-obsolete-rpc --disable-systemtap --disable-nscd --disable-timezone-tools
....
checking for libgd... no
checking for _FORTIFY_SOURCE predefine... yes
checking whether x86_64-pc-linux-gnu-gcc -m64 -Wl,-O1 -Wl,--as-needed implicitly enables -fstack-protector... yes
checking whether the linker provides working __ehdr_start... yes
....
* Running toolchain-glibc_src_configure for ABI x86

 * Configuring glibc for nptl
 *             ABI:   x86
 *          CBUILD:   x86_64-pc-linux-gnu
 *           CHOST:   x86_64-pc-linux-gnu
 *         CTARGET:   x86_64-pc-linux-gnu
 *      CBUILD_OPT:   i686-pc-linux-gnu
 *     CTARGET_OPT:   i686-pc-linux-gnu
 *              CC:   x86_64-pc-linux-gnu-gcc -m32
 *              LD:   
 *         ASFLAGS:   
 *          CFLAGS:   -pipe -march=native -O2 -fno-strict-aliasing
 *        CPPFLAGS:   
 *        CXXFLAGS:   -pipe -march=native -O2 -fno-strict-aliasing
 *         LDFLAGS:   -Wl,-O1 -Wl,--as-needed
 *       Manual CC:   x86_64-pc-linux-gnu-gcc -m32 -Wl,-O1 -Wl,--as-needed

/var/tmp/portage/sys-libs/glibc-2.23-r2/work/glibc-2.23/configure --disable-stackguard-randomization --enable-kernel=2.6.32 --enable-add-ons=c_stubs,libidn --without-selinux --without-cvs --disable-werror --enable-bind-now --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --disable-profile --without-gd --with-headers=/usr/include --prefix=/usr --libdir=/usr/lib32 --mandir=/usr/share/man --infodir=/usr/share/info --libexecdir=/usr/lib32/misc/glibc --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion=Gentoo 2.23-r2 p4 --enable-obsolete-rpc --disable-systemtap --disable-nscd --disable-timezone-tools
...
checking for libgd... no
checking for _FORTIFY_SOURCE predefine... yes
checking whether x86_64-pc-linux-gnu-gcc -m32 -Wl,-O1 -Wl,--as-needed implicitly enables -fstack-protector... no
checking whether the linker provides working __ehdr_start... yes


Reproducible: Always
Comment 1 Magnus Granberg gentoo-dev 2016-05-10 22:17:01 UTC
/var/tmp/portage/sys-libs/glibc-2.23-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/librtld.os: In function `lookup_doit':
rtld.c:(.text+0x115): undefined reference to `__stack_chk_fail_local'
/var/tmp/portage/sys-libs/glibc-2.23-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/librtld.os: In function `process_dl_debug':
rtld.c:(.text+0x55e): undefined reference to `__stack_chk_fail_local'
/var/tmp/portage/sys-libs/glibc-2.23-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/librtld.os: In function `print_statistics':
rtld.c:(.text+0xb43): undefined reference to `__stack_chk_fail_local'
/var/tmp/portage/sys-libs/glibc-2.23-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/librtld.os: In function `.L247':
rtld.c:(.text+0x2c3b): undefined reference to `__stack_chk_fail_local'
/var/tmp/portage/sys-libs/glibc-2.23-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/librtld.os: In function `.L1176':
rtld.c:(.text+0x461b): undefined reference to `__stack_chk_fail_local'
/var/tmp/portage/sys-libs/glibc-2.23-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/librtld.os:dl-load.c:(.text+0x4877): more undefined references to `__stack_chk_fail_local' follow
/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/sys-libs/glibc-2.23-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/ld.so.new: hidden symbol `__stack_chk_fail_local' isn't defined
/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
Makefile:380: recipe for target '/var/tmp/portage/sys-libs/glibc-2.23-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/ld.so' failed
make[2]: *** [/var/tmp/portage/sys-libs/glibc-2.23-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/ld.so] Error 1
make[2]: Leaving directory '/var/tmp/portage/sys-libs/glibc-2.23-r2/work/glibc-2.23/elf'
Makefile:215: recipe for target 'elf/subdir_lib' failed
make[1]: *** [elf/subdir_lib] Error 2
make[1]: Leaving directory '/var/tmp/portage/sys-libs/glibc-2.23-r2/work/glibc-2.23'
Makefile:9: recipe for target 'all' failed
make: *** [all] Error 2
make: Leaving directory '/var/tmp/portage/sys-libs/glibc-2.23-r2/work/build-x86-x86_64-pc-linux-gnu-nptl'
 * ERROR: sys-libs/glibc-2.23-r2::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=sys-libs/glibc-2.23-r2::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-libs/glibc-2.23-r2::gentoo'`.
 * The complete build log is located at '/var/log/portage/sys-libs:glibc-2.23-r2:20160510-222543.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/sys-libs/glibc-2.23-r2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-libs/glibc-2.23-r2/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-libs/glibc-2.23-r2/work/glibc-2.23'
 * S: '/var/tmp/portage/sys-libs/glibc-2.23-r2/work/glibc-2.23'
Comment 2 SpanKY gentoo-dev 2016-05-10 22:53:59 UTC
can you attach the config.log ?

since gcc-6 has IUSE=+ssp, issues that arise from USE="ssp -pie" configs should be assigned to toolchain@.
Comment 3 Magnus Granberg gentoo-dev 2016-05-11 15:05:06 UTC
Created attachment 433972 [details]
x86 config.log
Comment 4 Magnus Granberg gentoo-dev 2016-05-11 15:05:45 UTC
Created attachment 433974 [details]
amd64 config.log
Comment 5 Magnus Granberg gentoo-dev 2016-05-11 15:11:47 UTC
Portage 2.2.28 (python 3.4.3-final-0, default/linux/amd64/13.0, gcc-6.1.0, glibc-2.23-r2, 4.4.6-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.4.6-gentoo-x86_64-AMD_Opteron-TM-_Processor_6272-with-gentoo-2.2
KiB Mem:    32948116 total,  28190972 free
KiB Swap:    2000372 total,   2000372 free
Timestamp of repository gentoo: Mon, 09 May 2016 19:15:01 +0000
sh bash 4.3_p42-r2
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p42-r2::gentoo
dev-lang/perl:            5.22.2::gentoo
dev-lang/python:          2.7.11-r2::gentoo, 3.4.3-r7::gentoo, 3.5.1-r2::gentoo
dev-util/pkgconfig:       0.29.1::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.20.5::gentoo
sys-apps/sandbox:         2.10-r2::gentoo
sys-devel/autoconf:       2.69-r2::gentoo
sys-devel/automake:       1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.3::gentoo, 5.3.0::gentoo, 6.1.0::x-portage
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.5::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.europe.gentoo.org/gentoo-portage
    priority: -1000

x-portage
    location: /usr/local/portage
    masters: gentoo
    priority: 0

ABI="amd64"
ABI_X86="32 64"
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
ACCEPT_PROPERTIES="*"
ACCEPT_RESTRICT="*"
ALSA_CARDS="hda-intel intel8x0 intel8x0m"
ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol"
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"
ARCH="amd64"
AUTOCLEAN="yes"
BOOTSTRAP_USE="cxx unicode internal-glib python_targets_python3_4 python_targets_python2_7 multilib"
CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author"
CAMERAS="ptp2"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native -fno-diagnostics-color"
CFLAGS_amd64="-m64"
CFLAGS_x32="-mx32"
CFLAGS_x86="-m32"
CHOST="x86_64-pc-linux-gnu"
CHOST_amd64="x86_64-pc-linux-gnu"
CHOST_x32="x86_64-pc-linux-gnux32"
CHOST_x86="i686-pc-linux-gnu"
CLEAN_DELAY="5"
COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog"
COLLISION_IGNORE="/lib/modules/* *.py[co] *$py.class */dropin.cache"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/portage/package.use/99_autounmask /etc/sandbox.d /etc/terminfo"
CPU_FLAGS_X86="mmx sse sse2"
CXXFLAGS="-O2 -pipe -march=native -fno-diagnostics-color"
DEFAULT_ABI="amd64"
DISTDIR="/usr/portage/distfiles"
EDITOR="/bin/nano"
ELIBC="glibc"
EMERGE_DEFAULT_OPTS="-v --binpkg-respect-use=y --rebuild-if-new-rev=y --rebuilt-binaries=y --binpkg-changed-deps=y --autounmask=y --autounmask-write=y --jobs=3 --load-average=5.0"
EMERGE_WARNING_DELAY="10"
EPREFIX=""
EROOT="/"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles merge-sync parallel-fetch preserve-libs protect-owned sandbox sfperms strict test-fail-continue unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FETCHCOMMAND="wget -t 3 -T 60 --passive-ftp -O "${DISTDIR}/${FILE}" "${URI}""
FETCHCOMMAND_RSYNC="rsync -avP "${URI}" "${DISTDIR}/${FILE}""
FETCHCOMMAND_SFTP="bash -c "x=\${2#sftp://} ; host=\${x%%/*} ; port=\${host##*:} ; host=\${host%:*} ; [[ \${host} = \${port} ]] && port=22 ; eval \"declare -a ssh_opts=(\${3})\" ; exec sftp -P \${port} \"\${ssh_opts[@]}\" \"\${host}:/\${x#*/}\" \"\$1\"" sftp "${DISTDIR}/${FILE}" "${URI}" "${PORTAGE_SSH_OPTS}""
FETCHCOMMAND_SSH="bash -c "x=\${2#ssh://} ; host=\${x%%/*} ; port=\${host##*:} ; host=\${host%:*} ; [[ \${host} = \${port} ]] && port=22 ; exec rsync --rsh=\"ssh -p\${port} \${3}\" -avP \"\${host}:/\${x#*/}\" \"\$1\"" rsync "${DISTDIR}/${FILE}" "${URI}" "${PORTAGE_SSH_OPTS}""
FFLAGS="-O2 -pipe"
GCC_COLORS=""
GCC_SPECS=""
GENTOO_MIRRORS="ftp://mirror.mdfnet.se/gentoo ftp://trumpetti.atm.tut.fi/gentoo/ http://distfiles.gentoo.org"
GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx"
GRUB_PLATFORMS="pc"
GUILE_LOAD_PATH="/usr/share/guile/1.8"
HOME="/root"
INFOPATH="/usr/share/info:/usr/share/gcc-data/x86_64-pc-linux-gnu/6.1.0/info:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.25.1/info"
INPUT_DEVICES="keyboard mouse synaptics evdev"
IUSE_IMPLICIT="abi_x86_64 prefix prefix-guest"
KERNEL="linux"
LANG="en_US.utf8"
LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text"
LC_MESSAGES="C"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LDFLAGS_amd64="-m elf_x86_64"
LDFLAGS_x32="-m elf32_x86_64"
LDFLAGS_x86="-m elf_i386"
LESS="-R -M --shift 5"
LESSOPEN="|lesspipe %s"
LIBDIR_amd64="lib64"
LIBDIR_amd64_fbsd="lib64"
LIBDIR_arm="lib"
LIBDIR_arm64="lib64"
LIBDIR_n32="lib32"
LIBDIR_n64="lib64"
LIBDIR_o32="lib"
LIBDIR_ppc="lib32"
LIBDIR_ppc64="lib64"
LIBDIR_s390="lib32"
LIBDIR_s390x="lib64"
LIBDIR_sparc32="lib32"
LIBDIR_sparc64="lib64"
LIBDIR_x32="libx32"
LIBDIR_x86="lib32"
LIBDIR_x86_fbsd="lib32"
LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer"
LINGUAS="en"
LOGNAME="root"
MAIL="/var/mail/root"
MAKEOPTS="-j6"
MANPAGER="manpager"
MANPATH="/usr/local/share/man:/usr/share/man:/usr/share/gcc-data/x86_64-pc-linux-gnu/6.1.0/man:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.25.1/man"
MULTILIB_ABIS="amd64 x86"
MULTILIB_STRICT_DENY="64-bit.*shared object"
MULTILIB_STRICT_DIRS="/lib32 /lib /usr/lib32 /usr/lib /usr/kde/*/lib32 /usr/kde/*/lib /usr/qt/*/lib32 /usr/qt/*/lib /usr/X11R6/lib32 /usr/X11R6/lib"
MULTILIB_STRICT_EXEMPT="(perl5|gcc|gcc-lib|binutils|eclipse-3|debug|portage|udev|systemd|clang|python-exec)"
MULTIOSDIRS="../lib64:../lib32"
NETBEANS="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml"
NOCOLOR="true"
OFFICE_IMPLEMENTATION="libreoffice"
OLDPWD="/root"
PAGER="/usr/bin/less"
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/6.1.0"
PHP_TARGETS="php5-5"
PKGDIR="/usr/portage/packages"
PORTAGE_ARCHLIST="alpha amd64 amd64-fbsd amd64-linux arm arm-linux arm64 hppa hppa-hpux ia64 ia64-hpux ia64-linux m68k m68k-mint mips nios2 ppc ppc-aix ppc-macos ppc-openbsd ppc64 ppc64-linux riscv s390 sh sparc sparc-fbsd sparc-solaris sparc64-freebsd sparc64-solaris x64-cygwin x64-freebsd x64-macos x64-openbsd x64-solaris x86 x86-cygwin x86-fbsd x86-freebsd x86-interix x86-linux x86-macos x86-netbsd x86-openbsd x86-solaris x86-winnt"
PORTAGE_BIN_PATH="/usr/lib/portage/python3.4"
PORTAGE_COMPRESS_EXCLUDE_SUFFIXES="css gif htm[l]? jp[e]?g js pdf png"
PORTAGE_CONFIGROOT="/"
PORTAGE_DEBUG="0"
PORTAGE_DEPCACHEDIR="/var/cache/edb/dep"
PORTAGE_ELOG_CLASSES=""
PORTAGE_ELOG_MAILFROM="portage@localhost"
PORTAGE_ELOG_MAILSUBJECT="[portage] ebuild log for ${PACKAGE} on ${HOST}"
PORTAGE_ELOG_MAILURI="root"
PORTAGE_ELOG_SYSTEM="save"
PORTAGE_FETCH_CHECKSUM_TRY_MIRRORS="5"
PORTAGE_FETCH_RESUME_MIN_SIZE="350K"
PORTAGE_GID="250"
PORTAGE_GPG_SIGNING_COMMAND="gpg --sign --digest-algo SHA256 --clearsign --yes --default-key "${PORTAGE_GPG_KEY}" --homedir "${PORTAGE_GPG_DIR}" "${FILE}""
PORTAGE_INST_GID="0"
PORTAGE_INST_UID="0"
PORTAGE_INTERNAL_CALLER="1"
PORTAGE_OVERRIDE_EPREFIX=""
PORTAGE_PYM_PATH="/usr/lib64/python3.4/site-packages"
PORTAGE_PYTHONPATH="/usr/lib64/python3.4/site-packages"
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_RSYNC_RETRIES="-1"
PORTAGE_SYNC_STALE="30"
PORTAGE_TMPDIR="/var/tmp"
PORTAGE_TMPFS="/dev/shm"
PORTAGE_VERBOSE="1"
PORTAGE_WORKDIR_MODE="0700"
PORTAGE_XATTR_EXCLUDE="btrfs.* security.evm security.ima 	security.selinux system.nfs4_acl"
PORT_LOGDIR="/var/log/portage"
PORT_LOGDIR_CLEAN="find "${PORT_LOGDIR}" -type f ! -name "summary.log*" -mtime +7 -delete"
PROFILE_ONLY_VARIABLES="ARCH ELIBC IUSE_IMPLICIT KERNEL USERLAND USE_EXPAND_IMPLICIT USE_EXPAND_UNPREFIXED USE_EXPAND_VALUES_ARCH USE_EXPAND_VALUES_ELIBC USE_EXPAND_VALUES_KERNEL USE_EXPAND_VALUES_USERLAND"
PWD="/root"
PYTHONDONTWRITEBYTECODE="1"
PYTHON_SINGLE_TARGET="python2_7"
PYTHON_TARGETS="python2_7 python3_4 python3_5"
RESUMECOMMAND="wget -c -t 3 -T 60 --passive-ftp -O "${DISTDIR}/${FILE}" "${URI}""
RESUMECOMMAND_RSYNC="rsync -avP "${URI}" "${DISTDIR}/${FILE}""
RESUMECOMMAND_SSH="bash -c "x=\${2#ssh://} ; host=\${x%%/*} ; port=\${host##*:} ; host=\${host%:*} ; [[ \${host} = \${port} ]] && port=22 ; exec rsync --rsh=\"ssh -p\${port} \${3}\" -avP \"\${host}:/\${x#*/}\" \"\$1\"" rsync "${DISTDIR}/${FILE}" "${URI}" "${PORTAGE_SSH_OPTS}""
ROOT="/"
ROOTPATH="/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/6.1.0"
RPMDIR="/usr/portage/rpm"
RUBY_TARGETS="ruby20 ruby21 ruby22"
SHELL="/bin/bash"
SHLVL="1"
SSH_CLIENT="192.168.1.2 57043 22"
SSH_CONNECTION="192.168.1.2 57043 192.168.1.16 22"
SSH_TTY="/dev/pts/0"
SYMLINK_LIB="yes"
TERM="xterm"
UNINSTALL_IGNORE="/lib/modules/* /var/run /var/lock"
USE="X acl amd64 berkdb bzip2 cli cracklib crypt cxx dri fortran gdbm iconv ipv6 mmx mmxext modules multilib ncurses nls nptl openmp pam pcre qt3support readline seccomp session sse sse2 ssl tcpd unicode xattr zlib" ABI_X86="32 64" ALSA_CARDS="hda-intel intel8x0 intel8x0m" 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 
garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="keyboard mouse synaptics evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4 python3_5" RUBY_TARGETS="ruby20 ruby21 ruby22" USERLAND="GNU" VIDEO_CARDS="radeon" 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"
USER="root"
USERLAND="GNU"
USE_EXPAND="ABI_MIPS ABI_PPC ABI_S390 ABI_X86 ALSA_CARDS APACHE2_MODULES APACHE2_MPMS CALLIGRA_FEATURES CAMERAS COLLECTD_PLUGINS CPU_FLAGS_X86 CROSSCOMPILE_OPTS CURL_SSL DRACUT_MODULES DVB_CARDS ELIBC ENLIGHTENMENT_MODULES FCDSL_CARDS FFTOOLS FOO2ZJS_DEVICES FRITZCAPI_CARDS GPSD_PROTOCOLS GRUB_PLATFORMS INPUT_DEVICES KERNEL LCD_DEVICES LIBREOFFICE_EXTENSIONS LINGUAS LIRC_DEVICES 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 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_HIDDEN="ABI_MIPS ABI_PPC ABI_S390 CROSSCOMPILE_OPTS ELIBC KERNEL USERLAND"
USE_EXPAND_IMPLICIT="ARCH ELIBC KERNEL USERLAND"
USE_EXPAND_UNPREFIXED="ARCH"
USE_EXPAND_VALUES_ARCH="alpha amd64 amd64-fbsd amd64-linux arm arm-linux arm64 hppa hppa-hpux ia64 ia64-hpux ia64-linux m68k m68k-mint mips nios2 ppc ppc64 ppc64-linux ppc-aix ppc-macos ppc-openbsd riscv s390 sh sparc sparc64-freebsd sparc64-solaris sparc-fbsd sparc-solaris x64-cygwin x64-freebsd x64-macos x64-openbsd x64-solaris x86 x86-cygwin x86-fbsd x86-freebsd x86-interix x86-linux x86-macos x86-netbsd x86-openbsd x86-solaris x86-winnt"
USE_EXPAND_VALUES_ELIBC="AIX Cygwin Darwin DragonFly FreeBSD glibc HPUX Interix mintlib musl NetBSD OpenBSD SunOS uclibc Winnt"
USE_EXPAND_VALUES_KERNEL="AIX Darwin FreeBSD freemint HPUX linux NetBSD OpenBSD SunOS Winnt"
USE_EXPAND_VALUES_USERLAND="BSD GNU"
USE_ORDER="env:pkg:conf:defaults:pkginternal:repo:env.d"
VIDEO_CARDS="radeon"
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"

=================================================================
                        Package Settings
=================================================================


sys-devel/gcc-6.1.0::x-portage was built with the following:
USE="cxx fortran (multilib) nls nptl openmp pie sanitize ssp vtv (-altivec) (-awt) -cilk -debug -doc (-fixed-point) -gcj -go -graphite (-hardened) -jit (-libssp) -multislot -objc -objc++ -objc-gc -pch -regression-test -vanilla" ABI_X86="64"
CFLAGS="-O2 -pipe -march=native"
CXXFLAGS="-O2 -pipe -march=native"


sys-libs/glibc-2.23-r2::gentoo was built with the following:
USE="(multilib) rpc -audit -caps -debug -gd (-hardened) -nscd -profile (-selinux) -suid -systemtap -vanilla" ABI_X86="64"
CFLAGS="-pipe -march=native -O2 -fno-strict-aliasing"
CXXFLAGS="-pipe -march=native -O2 -fno-strict-aliasing"
Comment 6 Magnus Granberg gentoo-dev 2016-05-11 15:16:17 UTC
Created attachment 433978 [details]
build log
Comment 7 Magnus Granberg gentoo-dev 2016-05-31 20:37:06 UTC
When i pass -fno-PIE to the test it pass when the compiler use pie as default.
Comment 8 Denis Kaganovich 2016-08-28 22:24:16 UTC
Created attachment 444352 [details, diff]
patch for glibc configure

Looks like glibc-2.23-r2+ (at least) have support for both symbols - __stack_chk_fail & __stack_chk_fail_local (described as "in some architectures..."), but test for only __stack_chk_fail. So, this patch must be correct. Another way - conditionally define: "export libc_cv_predef_stack_protector=yes", related to +ssp|-nossp useflag before configure.
Comment 9 Magnus Granberg gentoo-dev 2016-11-12 18:55:35 UTC
spanKY can this be commited upstream and in or patchset?
https://sourceware.org/ml/libc-alpha/2016-10/msg00345.html
Comment 10 SpanKY gentoo-dev 2016-11-15 19:39:29 UTC
pushed upstream and pulled back into our 2.23-r3 and 2.24 ebuilds

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=88c5bc34df3b085a459ca2c6e201faca7b504d15