On 2014-12-07 11:37, Michał Górny wrote:
Hello, developers and users.
As some of you know, the toolchain packages in Gentoo suffer from
lack-of-sanity issues and their maintainers are completely unwilling to
improve things. I have finally decided to start working on a fork of
the sys-devel/gcc ebuilds, and I have some bits ready for initial
testing in 'mgorny' repo, so I would like to know your opinion.
Before you start, the shortcomings are:
1. No cross-compilation support. If the project proves being a success
it will be readded at some point. However, I will likely fork glibc
first and work on a sane crossdev alternative.
2. No gcj support. Since the ebuild has been forked out of
toolchain.eclass, and the gcj support suffers a lot of issues there, I
decided there's no point in copying the code. Not sure if anybody
actually uses it, and if it is actually useful for anything but will
probably get reintroduced one day [above 'if' applies too].
3. No bootstrapping, fallbacks and possible some other random feature
support. The goal was pretty much to get gcc compiling first, and avoid
awful lot of effort if things prove to have no future.
4. Hardened is not tested. I think I have copied all the needed code
and fixed some stuff but I have no clue if it still works ;).
Now, the major changes are:
1. Most of the insanity removed. No more toolchain.eclass. The ebuild
has just the code for the current gcc version. You can read it and know
what it does, you don't have to parse a few dozen version conditionals,
runtime conditionals and random crap code that doesn't do anything in
some gcc versions. In fact, I think I removed most of the no-op code.
And now you can actually change something in the ebuild without caring
for gcc3.4, or without breaking stuff for stable ebuilds.
2. USE flags are supposed to work. I've replaced the cases when they
were silently ignored with REQUIRED_USE. I've also removed the silent
removals when they didn't work -- so if your current toolchain is
broken, things may actually fail instead of giving your different gcc
than you wanted. Probably deserves explanatory pkg_pretend() at some
point, with messages like 'disable USE=-foo because your toolchain is
broken'.
3. Things simplified where they could have been simplified. For
example, I removed the big gcc executable moving function and replaced
it with --enable-version-specific-runtime-libs. It was enabled in
toolchain.eclass with a comment 'If we enable it on non-Darwin we screw
up the behaviour this eclass relies on.' So yep, precious cargo cult --
why enable something that would require you to remove your useless
complex function?!
4. Added gx86-multilib love. Now you have abi_* flags to control
the compiler runtime. Of course, since gcc is a pile of random modules
not fit for one another it has different code for different targets. In
particular, on mips you can't do two ABIs -- either single one
(non-multilib) or all three of them (--enable-multilib).
5. Added multilib gcc wrappers. Long story short, multilib gcc now
shows up in gcc-config alike crossdev -- but unlike i686 crossdev, it
doesn't screw up your system! Of course, the final implementation may
differ since it's an early idea but it works. Now distcc happily builds
stuff for your x86 clients.
6. Added missing dependencies. Yep, USE flags now, say, pull in doxygen
rather than silently skipping doc build when it's not installed...
7. Disabled bootstrap by default (and in fact completely for now). It
is not *that* useful, and means time savings (and distcc support):
Thu Nov 6 20:39:31 2014 >>> sys-devel/gcc-4.9.2
merge time: 1 hour, 56 minutes and 43 seconds.
Sun Dec 7 10:46:08 2014 >>> sys-devel/gcc-4.9.2-r100
merge time: 34 minutes and 55 seconds.
If you're interested in testing it, 'layman -a mgorny' and enjoy. I'd
appreciate any bug reports, except for those covering things i've
already listed as missing :). Any further comments will be very helpful
in deciding on the way forward.
If there is a real interest in my fork, I will probably move it to gx86
as sys-devel/gcc-mgorny. I will also be happy to work on replacing
the new versions of original sys-devel/gcc completely. With QA process
against toolchain.eclass if necessary.
Thanks, I've tried this on ~amd64. It builds in 10 minutes (wow!),
tested to build some core stuff with it:
kernel 3.17, glibc, coreutils, openssl, ssh...
All seems to work fine. I'll try to recompile the whole machine with it.
After emerge, there are these notices:
* QA Notice: command not found:
*
* /var/tmp/portage/sys-devel/gcc-4.9.2-r100/temp/environment: line
3110: pax-mark: command not found
* /var/tmp/portage/sys-devel/gcc-4.9.2-r100/temp/environment: line
3111: pax-mark: command not found
# emerge -pvq gcc
[ebuild R ] sys-devel/gcc-4.9.2-r100 USE="cxx fortran nls nptl
openmp pie sanitize (-altivec) -doc (-fixed-point) -go -graphite
(-hardened) (-libssp) -objc -objc++ -objc-gc {-test} -vanilla"
ABI_X86="(64) -32 (-x32)"
Portage 2.2.14 (python 2.7.8-final-0, default/linux/amd64/13.0/desktop,
gcc-4.9.2, glibc-2.20, 3.17.5-gentoo x86_64)
=================================================================
System uname:
Linux-3.17.5-gentoo-x86_64-Intel-R-_Core-TM-_i5-3570_CPU_@_3.40GHz-with-gentoo-2.2
KiB Mem: 15908668 total, 12616592 free
KiB Swap: 0 total, 0 free
Timestamp of tree: Tue, 09 Dec 2014 02:45:01 +0000
ld GNU ld (Gentoo 2.24 p1.4) 2.24
app-shells/bash: 4.3_p30-r1
dev-java/java-config: 2.2.0
dev-lang/perl: 5.20.1-r3
dev-lang/python: 2.7.8, 3.2.5-r4, 3.3.5-r1, 3.4.2
dev-util/cmake: 3.0.2
dev-util/pkgconfig: 0.28-r2
sys-apps/baselayout: 2.2
sys-apps/openrc: 0.13.6
sys-apps/sandbox: 2.6-r1
sys-devel/autoconf: 2.13, 2.69
sys-devel/automake: 1.14.1
sys-devel/binutils: 2.24-r3
sys-devel/gcc: 4.8.3, 4.9.2-r100::mgorny
sys-devel/gcc-config: 1.8
sys-devel/libtool: 2.4.3-r2
sys-devel/make: 4.1-r1
sys-kernel/linux-headers: 3.17-r1 (virtual/os-headers)
sys-libs/glibc: 2.20
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-mtune=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d
/etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release
/etc/php/apache2-php5.5/ext-active/ /etc/php/apache2-php5.6/ext-active/
/etc/php/cgi-php5.5/ext-active/ /etc/php/cgi-php5.6/ext-active/
/etc/php/cli-php5.5/ext-active/ /etc/php/cli-php5.6/ext-active/
/etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-mtune=native -O2 -pipe"
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://tux.rainside.sk/gentoo/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
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"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
USE="X a52 aac acl acpi alsa amd64 berkdb bindist branding bzip2 cairo
cdda cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr
emboss encode exif fam firefox flac fortran gdbm gif glamor gpm gtk
iconv jpeg lcms ldap libnotify mad mmx mng modules mp3 mp4 mpeg multilib
ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds
qt3support qt4 readline sdl session sse sse2 ssl startup-notification
svg tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets
x264 xattr xcb xml xv xvid 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 authz_host dir mime unixd socache_shmcb log_config rewrite
vhost_alias log_forensic proxy proxy_fcgi info status deflate filter
auth_digest authn_file authz_user access_compat actions alias auth_basic
authn_alias authn_anon env expires headers mime_magic negotiation
reqtimeout setenvif unique_id version cgi" 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="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="efi-64 pc"
INPUT_DEVICES="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-6
php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7
python3_3" QEMU_SOFTMMU_TARGETS="x86_64 i386" QEMU_USER_TARGETS="x86_64
i386" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="intel
i128" 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: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG,
LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS,
PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON