Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 702370 - sys-devel/binutils-2.33.1 fails to link sys-libs/glibc-2.30-r3 when LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--fix-cortex-a53-843419 -Wl,--fix-cortex-a53-835769 -Wl,--no-map-whole-files" is passed
Summary: sys-devel/binutils-2.33.1 fails to link sys-libs/glibc-2.30-r3 when LDFLAGS="...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM64 Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: https://sourceware.org/PR25210
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-09 19:16 UTC by Roy Bamford
Modified: 2020-03-03 21:12 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
bzip2 build log (sys-libs:glibc-2.30-r3:20191209-172728.log.bz2,93.18 KB, application/x-bzip)
2019-12-09 19:21 UTC, Roy Bamford
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roy Bamford gentoo-dev 2019-12-09 19:16:37 UTC
Passing -Wl,--fix-cortex-a53-843419 -Wl,--fix-cortex-a53-835769 in LDFLAGS causes emerge -1 glibc to fail with 

/usr/lib/gcc/aarch64-unknown-linux-gnu/9.2.0/../../../../aarch64-unknown-linux-gnu/bin/ld.bfd: can not size stub section: invalid operation
/usr/lib/gcc/aarch64-unknown-linux-gnu/9.2.0/../../../../aarch64-unknown-linux-gnu/bin/ld.bfd: linker stubs: file class ELFCLASSNONE incompatible with ELFCLASS64
/usr/lib/gcc/aarch64-unknown-linux-gnu/9.2.0/../../../../aarch64-unknown-linux-gnu/bin/ld.bfd: final link failed: file in wrong format

The other three combinations of -Wl,--fix-cortex-a53-843419 -Wl,--fix-cortex-a53-835769 build.

It looks like https://sourceware.org/bugzilla/show_bug.cgi?id=25210 but we already have the first hunk of that patch.
binutils-2.32 works as expected.


Reproducible: Always

Steps to Reproduce:
1. Described above
2. 
3.
Actual Results:  
Build log to follow

Expected Results:  
glibc builds cleanly

arm64-build / # emerge --info glibc
Portage 2.3.81 (python 3.6.9-final-0, default/linux/arm64/17.0/desktop, gcc-9.2.0, glibc-2.30-r3, 4.9.0-4-arm64 aarch64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.9.0-4-arm64-aarch64-with-gentoo-2.6
KiB Mem:   131544964 total,  62204376 free
KiB Swap:    3321056 total,   3321000 free
Timestamp of repository gentoo: Sat, 07 Dec 2019 09:45:01 +0000
Head commit of repository gentoo: 09350ccb6684867678c1710bccc769b549697dda
sh bash 5.0_p11
ld GNU gold (Gentoo 2.33.1 p1 2.33.1) 1.16
distcc 3.3.3 aarch64-unknown-linux-gnu [disabled]
app-shells/bash:          5.0_p11::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.17::gentoo, 3.6.9::gentoo, 3.7.5-r1::gentoo
dev-util/cmake:           3.16.0::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.1-r2::gentoo
sys-devel/binutils:       2.32-r1::gentoo, 2.33.1::gentoo
sys-devel/gcc:            9.2.0-r2::gentoo
sys-devel/gcc-config:     2.1::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.3-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.30-r3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.namerica.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts: 
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24

Pi_aarch64
    location: /usr/local/last_out_of_the_past
    masters: gentoo

bunder
    location: /var/lib/layman/bunder
    masters: gentoo
    priority: 50

mrueg
    location: /var/lib/layman/mrueg
    masters: gentoo
    priority: 50

palemoon
    location: /var/lib/layman/palemoon
    masters: gentoo
    priority: 50

Installed sets: @DateTime_set, @kde_remains, @kicad
ACCEPT_KEYWORDS="arm64 ~arm64"
ACCEPT_LICENSE="@FREE all-rights-reserved bh-luxi bluez-firmware fairuse FraunhoferFDK freedist IUPAC-InChi linux-firmware linux-fw-redistributable MPEG-4 no-source-code SSPL-1 xgraph"
CBUILD="aarch64-unknown-linux-gnu"
CFLAGS="-mcpu=cortex-a53+crc -mtune=cortex-a53 -ftree-vectorize -O2 -pipe -fomit-frame-pointer -flto"
CHOST="aarch64-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.2/ext-active/ /etc/php/apache2-php7.3/ext-active/ /etc/php/cgi-php7.2/ext-active/ /etc/php/cgi-php7.3/ext-active/ /etc/php/cli-php7.2/ext-active/ /etc/php/cli-php7.3/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="-mcpu=cortex-a53+crc -mtune=cortex-a53 -ftree-vectorize -O2 -pipe -fomit-frame-pointer -flto"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2"
GENTOO_MIRRORS="http://ftp.heanet.ie/pub/gentoo/                  http://mirror.mdfnet.se/gentoo                  http://mirrors.163.com/gentoo/                  http://gentoo.mirror.web4u.cz/                  http://64.50.236.52/                  http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/                  http://gentoo.mneisen.org/                  http://gentoo.mirror.pw.edu.pl/                  http://gentoo.prz.rzeszow.pl                  http://mirror.mdfnet.se/mirror/gentoo                  http://ftp.gentoo.bg/                  http://distfiles.gentoo.bg/                  http://mirrors.ludost.net/gentoo/                  http://mirror.hamakor.org.il/pub/mirrors/gentoo/                  http://ftp.dei.uc.pt/pub/linux/gentoo/"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--fix-cortex-a53-843419 -Wl,--fix-cortex-a53-835769 -Wl,--no-map-whole-files"
LINGUAS="en en_GB"
MAKEOPTS="-j100"
PKGDIR="/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 a52 aac acl acpi alsa arm64 berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit context cracklib crypt cups cxx dbus doc dot dri dts dvd dvdnav dvdr eds egl emboss encode exif fam flac fontconfig fortran gdbm gif gles1 gnome-keyring gpm gstreamer gtk gtk3 iconv icu introspection iptables ipv6 jadetex jpeg latex lcms ldap libnotify libtirpc mad minizip mng modemmanager mp3 mp4 mpeg mysql mysqli ncurses nls nptl nss ogg opengl openmp openssl pam pango pcre pcre16 pdf pie png policykit postproc ppds python qt5 readline script seccomp skia spell split-usr sqlite ssl ssp startup-notification svc svg tcpd threads tiff tk truetype udev udisks unicode upower usb vala virt-network vorbis wxwidgets x264 xattr xcb xml xpm xv xvfb xvid xvmc zlib" ADA_TARGET="gnat_2018" 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="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_ARM="edsp neon thumb vfp vfpv3 vfpv4 vfp-d32 crc32 v4 v5 v6 v7 v8 thumb2" ELIBC="glibc" 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" INPUT_DEVICES="evdev libinput" KERNEL="linux" L10N="en en-GB" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24 ruby25 ruby26" USERLAND="GNU" VIDEO_CARDS="fbdev vc4 radeon amdgpu nouveau" 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, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

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

sys-libs/glibc-2.30-r3::gentoo was built with the following:
USE="(crypt) doc multiarch (split-usr) ssp (static-libs) (-audit) -caps (-cet) -compile-locales -custom-cflags -gd -headers-only (-multilib) -nscd -profile (-selinux) -suid -systemtap -test (-vanilla)"
CFLAGS="-mcpu=cortex-a53+crc -mtune=cortex-a53 -pipe -O2"
CXXFLAGS="-mcpu=cortex-a53+crc -mtune=cortex-a53 -pipe -O2"
FEATURES="preserve-libs news usersync binpkg-docompress strict multilib-strict assume-digests protect-owned unknown-features-warn parallel-fetch userpriv ebuild-locks xattr merge-sync buildpkg binpkg-dostrip distlocks unmerge-orphans ipc-sandbox sandbox usersandbox binpkg-logs unmerge-logs pid-sandbox sfperms config-protect-if-modified userfetch fixlafiles collision-protect network-sandbox"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--fix-cortex-a53-835769 -Wl,--no-map-whole-files -fuse-ld=bfd"
Comment 1 Roy Bamford gentoo-dev 2019-12-09 19:21:00 UTC
Created attachment 598972 [details]
bzip2 build log
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2019-12-09 20:31:15 UTC
https://sourceware.org/PR25210
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2019-12-09 20:34:03 UTC
Upstream bug report claims there is no fix yet. We need to fix upstream first.
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2020-02-27 09:21:34 UTC
https://sourceware.org/PR25210 got a fix.
Comment 5 Roy Bamford gentoo-dev 2020-03-03 21:12:47 UTC
Fixed in binutils-2.34