Created attachment 475056 [details]
the zip of the failure logs as requested by emerge
I was following the instructions on the Gentoo MinGW site and ended up failing after running:
crossdev --ov-output /usr/portage i686-w64-mingw32
crossdev --ov-output /usr/portage x86_64-w64-mingw32
Apparently ld does not support the -z option. What gets me is I don't see where in the (very busy) log ld is being run with -z.
Portage 2.3.5 (python 2.7.12-final-0, hardened/linux/amd64, gcc-5.4.0, glibc-2.23-r3, 4.4.6-gentoo x86_64)
System uname: Linux-4.4.6-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_E5507_@_2.27GHz-with-gentoo-2.3
KiB Mem: 49448288 total, 15723340 free
KiB Swap: 100663292 total, 100632256 free
Timestamp of repository gentoo: Mon, 05 Jun 2017 17:30:01 +0000
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
dev-lang/python: 2.7.12::gentoo, 3.4.5::gentoo
sys-devel/autoconf: 2.13::gentoo, 2.69::gentoo
sys-devel/automake: 1.14.1::gentoo, 1.15-r2::gentoo
sys-devel/binutils: 2.25.1-r1::gentoo, 2.26.1::gentoo
sys-devel/gcc: 4.9.3::gentoo, 4.9.4::gentoo, 5.4.0-r3::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/apache2-php7.0/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/php/cli-php7.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
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"
USE="acl amd64 apache2 bash-completion berkdb bzip2 cairo cli cracklib crypt cxx dri gdbm git graphviz hardened iconv ipv6 jpeg justify modules multilib ncurses nls nptl openmp pam pax_kernel pcre perl php pie png postgres readline seccomp session ssl ssp static-libs tcpd unicode urandom xattr xtpax zip 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3" 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" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21 ruby22" 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, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment on attachment 475056 [details]
the zip of the failure logs as requested by emerge
This is a zip containing the following files:
It is sad to read that you have problems with crossdev. The situation seems to be a bit more complicate and requires some analysis.
We can not help you efficiently via bug tracker. The bug tracker aims rather on specific problems in .ebuilds and less on individual systems.
I have had very good experience on the gentoo IRC  with questions like this. Of course there are also forums and mailing lists [2,3].
I hope you understand, that I will close the bug here therefore and wish you good luck on one of the mentioned channels .
Please reopen the ticket in order to provide an indication for an error in the ebuild.
Allow me to take the long way around on this.
Today we know very little about how the Vikings lived or worshiped their gods. Even though many, if not most of them were literate, the facts about their daily lives and religion were obvious to them and since "everybody knows it" nobody bothered to write these things down in a place with some form of permanence, and now nobody knows it. Today we have the writings of Snorri Sturlson, who wrote down what was passed through oral tradition after five hundred years of Christianity. Oh, and we cannot forget what was written on the Osburg Ship, the single script we have to go by from their day regarding their beliefs and culture which translates to "Man knows little."
Continuing in the oral tradition are great technologies like IRC. All of the time, effort and wisdom passed through IRC becomes whispers on the wind. Truth be told, I've posted of problems perhaps twice or three times in the long and storied history of my Gentoo usage primarily because there are people who have not used IRC to ask their questions, and those questions have been answered. And I was able to use those answers to solve the very problems that I had.
I had two machines that were built with pretty much the same hardware. They were loaded a few months apart, so I didn't consider looking at the similarities and differences until last night. It turns out the problematic machine was running with the HARDENED profile, where the machine that built MinGW flawlessly was not. This profile set certain USE flags that were breaking the MinGW build. To be exact, "pie ssp vtv" are the offending USE flags.
Given that on hardened profile those flag are forced shouldn't crossdev add them automatically to package.use.force as it does with multilib?
(In reply to Rob Stoddard from comment #4)
> To be exact, "pie ssp vtv" are the offending USE flags.
Turning these off when building has been no help. I have no idea how to follow up on this.
cross-x86_64-w64-mingw32/gcc -fortran -vtv -pie -hardened -sanitize
If using portage, unmask kernel_Winnt and elibc_mingw and mask kernel_linux and elibc_glibc in the profile.