Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 600966 - toolchain.eclass: Adjust check for sys-libs/uclibc-ng to allow building against gcc-6.x without special patches.
Summary: toolchain.eclass: Adjust check for sys-libs/uclibc-ng to allow building again...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: MIPS Linux
: Normal normal (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: uclibc-porting
  Show dependency tree
 
Reported: 2016-11-27 09:14 UTC by Joshua Kinard
Modified: 2022-01-02 10:28 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Kinard gentoo-dev 2016-11-27 09:14:53 UTC
Lines 373 and 374 of current toolchain.eclass contain a uclibc hack:

        [[ -z ${UCLIBC_VER} ]] && [[ ${CTARGET} == *-uclibc* ]] && \
                die "Sorry, this version does not support uClibc"

I commented those out and was able to build sys-devel/gcc-6.2.0-r1 no problem, using sys-devel/binutils-2.27 and sys-libs/uclibc-ng-1.0.19.  With the toolchain fully rebuilt, it also can run an 'emerge -eD system' and rebuild almost all packages, with dev-util/pkgconfig being the only failure due to a warning getting treated as an error.

So I think this hack is no longer needed to enable wider testing of newer gcc versions under uclibc-ng.
Comment 1 Joshua Kinard gentoo-dev 2016-11-27 11:14:01 UTC
Probably helps to include emerge --info in this case:

# emerge --info
Portage 2.3.2 (python 3.5.2-final-0, default/linux/uclibc/mips, gcc-6.2.0, uclibc-ng-1.0.19, 4.8.5-mipsgit-20161016 mips64)
=================================================================
System uname: Linux-4.8.5-mipsgit-20161016-mips64-R14000_V2.4_FPU_V0.0-with-gentoo-2.3
KiB Mem:     2080512 total,    545536 free
KiB Swap:    3145536 total,   3114560 free
Timestamp of repository gentoo: Sun, 27 Nov 2016 08:45:01 +0000
sh bash 4.4_p5-r1
ld GNU ld (Gentoo 2.27 p1.0) 2.27
app-shells/bash:          4.4_p5-r1::gentoo
dev-lang/perl:            5.24.1_rc4::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo, 3.5.2::gentoo
dev-util/pkgconfig:       0.29.1::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.22.4::gentoo
sys-apps/sandbox:         2.8::gentoo
sys-devel/autoconf:       2.69-r2::gentoo
sys-devel/automake:       1.15-r2::gentoo
sys-devel/binutils:       2.26.1::gentoo, 2.27::gentoo
sys-devel/gcc:            5.4.0::gentoo, 6.2.0-r1::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.8::gentoo (virtual/os-headers)
sys-libs/uclibc-ng:       1.0.19::gentoo
Repositories:

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

ACCEPT_KEYWORDS="mips ~mips"
ACCEPT_LICENSE="* -@EULA"
CBUILD="mips-unknown-linux-uclibc"
CFLAGS="-Os -pipe -march=mips2 -mtune=mips2 -mplt"
CHOST="mips-unknown-linux-uclibc"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-Os -pipe -march=mips2 -mtune=mips2 -mplt"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
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"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
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="bindist cli cracklib crypt cxx dri fortran iconv ipv6 mips modules ncurses nptl openmp pcre readline seccomp session ssl tcpd uclibc unicode xattr zlib" ABI_MIPS="o32" 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" ELIBC="uclibc" 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" INPUT_DEVICES="keyboard mouse evdev" 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="python2_7" PYTHON_TARGETS="python2_7 python3_4 python3_5" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="dummy fbdev 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, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 2 Anthony Basile gentoo-dev 2017-01-15 11:17:19 UTC
(In reply to Joshua Kinard from comment #0)
> Lines 373 and 374 of current toolchain.eclass contain a uclibc hack:
> 
>         [[ -z ${UCLIBC_VER} ]] && [[ ${CTARGET} == *-uclibc* ]] && \
>                 die "Sorry, this version does not support uClibc"
> 
> I commented those out and was able to build sys-devel/gcc-6.2.0-r1 no
> problem, using sys-devel/binutils-2.27 and sys-libs/uclibc-ng-1.0.19.  With
> the toolchain fully rebuilt, it also can run an 'emerge -eD system' and
> rebuild almost all packages, with dev-util/pkgconfig being the only failure
> due to a warning getting treated as an error.
> 
> So I think this hack is no longer needed to enable wider testing of newer
> gcc versions under uclibc-ng.

I wouldn't call this a hack, its a check.  Its there to make sure that gcc is getting the correct patchset named gcc-${UCLIBC_GCC_VER}-uclibc-patches-${UCLIBC_VER}.tar.bz2.  Only gcc-6 doesn't have a special patchset for uclibc but gcc-5 and below does causing you the error.

So you can either remove this or limit its scope by using something like tc_version_is_at_least 6.
Comment 3 Joshua Kinard gentoo-dev 2017-01-15 18:52:03 UTC
(In reply to Anthony Basile from comment #2)
> (In reply to Joshua Kinard from comment #0)
> > Lines 373 and 374 of current toolchain.eclass contain a uclibc hack:
> > 
> >         [[ -z ${UCLIBC_VER} ]] && [[ ${CTARGET} == *-uclibc* ]] && \
> >                 die "Sorry, this version does not support uClibc"
> > 
> > I commented those out and was able to build sys-devel/gcc-6.2.0-r1 no
> > problem, using sys-devel/binutils-2.27 and sys-libs/uclibc-ng-1.0.19.  With
> > the toolchain fully rebuilt, it also can run an 'emerge -eD system' and
> > rebuild almost all packages, with dev-util/pkgconfig being the only failure
> > due to a warning getting treated as an error.
> > 
> > So I think this hack is no longer needed to enable wider testing of newer
> > gcc versions under uclibc-ng.
> 
> I wouldn't call this a hack, its a check.  Its there to make sure that gcc
> is getting the correct patchset named
> gcc-${UCLIBC_GCC_VER}-uclibc-patches-${UCLIBC_VER}.tar.bz2.  Only gcc-6
> doesn't have a special patchset for uclibc but gcc-5 and below does causing
> you the error.
> 
> So you can either remove this or limit its scope by using something like
> tc_version_is_at_least 6.

Okay, I changed the bug title to reflect that it's not a hack.  I'll look at the tc_version* thing and wire something up for strictly gcc-6.x, so that when gcc-7 is released, we won't get burned there.  I'll also look into making this apply only for sys-libs/uclibc-ng at the moment, since that's what I have tested with gcc-6.x so far.

That said, is there a better way, other than splitting profiles, to allow sys-libs/uclibc-ng to move ahead while blocking the older sys-libs/uclibc until someone can test it against newer gcc's?  Or maybe just hold it back until it can be deprecated and fully replaced?
Comment 4 Anthony Basile gentoo-dev 2017-01-15 20:03:05 UTC
> That said, is there a better way, other than splitting profiles, to allow
> sys-libs/uclibc-ng to move ahead while blocking the older sys-libs/uclibc
> until someone can test it against newer gcc's?  Or maybe just hold it back
> until it can be deprecated and fully replaced?

I don't want to split the profiles.  We need to move past uclibc and just use the current profiles for uclibc-ng.  So, yes, hold back and then fully deprecate.  There are still two big changes coming from uclibc-ng (the restructuring of libm.so, librt.so and friends, and dropping obstack support) which will mean big migration steps.  I'll write a news item when 1.0.21 comes out.  After that, we'll wait for a few months for things to settle and them I'll be happy to start full deprecation of uclibc.
Comment 5 Martin Wohlert 2017-11-07 13:00:13 UTC
Any update on this topic?

Can't the check in toolchain.eclass simply be skipped if uclibc-ng is used instead of uclibc?
Comment 6 David Seifert gentoo-dev 2022-01-02 10:28:44 UTC
uclibc support in Gentoo has been removed.