Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
distcc with clang and gcc fallback - libtool not distributed
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
DeIM
Guru
Guru


Joined: 11 Apr 2006
Posts: 314

PostPosted: Fri Oct 06, 2017 12:39 pm    Post subject: distcc with clang and gcc fallback - libtool not distributed Reply with quote

Hi, I'm trying to make good working environment to build mainly by clang and gcc fallback both with LTO and no-LTO variants:

main lines of make.conf:
Code:
CC="clang"
CXX="clang++"

CFLAGS="-march=silvermont -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -mno-sse4a -mcx16 -maes -mno-sha -mpclmul -mpopcnt -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -msse4.2 -msse4.1 -mno-lzcnt -mno-rtm -mrdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mprfchw -mno-adx -mfxsr -mno-xsave -mno-xsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-mwaitx -mtune=generic -fstack-protector-strong -O2 -pipe"
CXXFLAGS="${CFLAGS}"

CFLAGS="${CFLAGS} -flto=thin"
CXXFLAGS="${CXXFLAGS} -flto=thin"
LDFLAGS="-Wl,-O2,--as-needed,-flto=thin"

AR="llvm-ar"
NM="llvm-nm"
RANLIB="llvm-ranlib"

CHOST="x86_64-pc-linux-gnu"

MAKEOPTS="-j21 -l4"
CONFIG_PROTECT="*"
ACCEPT_LICENSE="*"
CPU_FLAGS_X86="aes mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3"

LLVM_TARGETS="X86 BPF"
INPUT_DEVICES="libinput wacom"

VIDEO_CARDS="intel i965"
FEATURES="${FEATURES} distcc distcc-pump -network-sandbox"


Code:
# cat /etc/portage/env/no-lto
CFLAGS="${CFLAGS} -fno-lto"
CXXFLAGS="${CXXFLAGS} -fno-lto"
LDFLAGS="-Wl,-O2,--as-needed,-fno-lto"


Code:
# cat /etc/portage/env/gcc
CC="gcc"
CXX="g++"
CFLAGS="-march=silvermont -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -mno-sse4a -mcx16 -msahf -mmovbe -maes -mno-sha -mpclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -msse4.2 -msse4.1 -mno-lzcnt -mno-rtm -mno-hle -mrdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mprfchw -mno-adx -mfxsr -mno-xsave -mno-xsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-clwb -mno-pcommit -mno-mwaitx --param l1-cache-size=24 --param l1-cache-line-size=64 --param l2-cache-size=1024 -mtune=generic -fstack-protector-strong -O2 -pipe"
CXXFLAGS="${CFLAGS} -flto"
CFLAGS="${CFLAGS} -flto"
LDFLAGS="-Wl,-O2,--as-needed,-flto"
AR="gcc-ar"
NM="gcc-nm"
RANLIB="gcc-ranlib"


Code:
# cat /etc/portage/env/gcc-no-lto
CC="gcc"
CXX="g++"
CFLAGS="-march=silvermont -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -mno-sse4a -mcx16 -msahf -mmovbe -maes -mno-sha -mpclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -msse4.2 -msse4.1 -mno-lzcnt -mno-rtm -mno-hle -mrdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mprfchw -mno-adx -mfxsr -mno-xsave -mno-xsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-clwb -mno-pcommit -mno-mwaitx --param l1-cache-size=24 --param l1-cache-line-size=64 --param l2-cache-size=1024 -mtune=generic -fstack-protector-strong -O2 -pipe"
CXXFLAGS="${CFLAGS}"
LDFLAGS="-Wl,-O2,--as-needed"
AR="gcc-ar"
NM="gcc-nm"
RANLIB="gcc-ranlib"


Code:
# emerge --info
Portage 2.3.8 (python 3.4.5-final-0, default/linux/amd64/13.0/desktop, gcc-5.4.0, glibc-2.23-r4, 4.13.3-gentoo x86_64)
=================================================================
System uname: Linux-4.13.3-gentoo-x86_64-Intel-R-_Pentium-R-_CPU_N3700_@_1.60GHz-with-gentoo-2.3
KiB Mem:     3956904 total,   1152480 free
KiB Swap:    5242876 total,   5241852 free
Timestamp of repository gentoo: Fri, 06 Oct 2017 10:30:01 +0000
Head commit of repository gentoo: 86cbae595cf2e5793beff4749a0902507aa0751a
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.28.1 p1.0) 2.28.1
distcc 3.2rc1 x86_64-pc-linux-gnu [enabled]
app-shells/bash:          4.3_p48-r1::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.1-r2::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::d3-gentoo
dev-util/cmake:           3.7.2::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.28::gentoo
sys-apps/sandbox:         2.10-r3::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.28-r2::gentoo, 2.28.1::gentoo
sys-devel/gcc:            5.4.0-r3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r4::gentoo
Repositories:

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

local
    location: /usr/local/portage
    masters: gentoo

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CC="clang"
CFLAGS="-march=silvermont -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -mno-sse4a -mcx16 -maes -mno-sha -mpclmul -mpopcnt -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -msse4.2 -msse4.1 -mno-lzcnt -mno-rtm -mrdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mprfchw -mno-adx -mfxsr -mno-xsave -mno-xsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-mwaitx -mtune=generic -fstack-protector-strong -O2 -pipe -flto=thin"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="* /etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXX="clang++"
CXXFLAGS="-march=silvermont -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -mno-sse4a -mcx16 -maes -mno-sha -mpclmul -mpopcnt -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -msse4.2 -msse4.1 -mno-lzcnt -mno-rtm -mrdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mprfchw -mno-adx -mfxsr -mno-xsave -mno-xsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-mwaitx -mtune=generic -fstack-protector-strong -O2 -pipe -flto=thin"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distcc distcc-pump distlocks ebuild-locks fixlafiles merge-sync multilib-strict 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="rsync://ftp6.linux.cz/pub/linux/gentoo/ rsync://mirror.dkm.cz/gentoo/"
LANG="cs_CZ.utf8"
LDFLAGS="-Wl,-O2,--as-needed,-flto=thin"
MAKEOPTS="-j21 -l4"
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="X a52 aac aacplus acl acpi alsa amd64 aspell berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit corefonts cracklib crypt cups cxx dbus download dri dts dvd dvdr emboss encode exif exiv2 faac faad fam ffmpeg firefox flac fortran gdbm gif gimp glamor gpm graphicsmagick gstreamer http hunspell iconv icu imagemagick ipv6 jack java jpeg jpeg2k lame lcms ldap libnotify lua luajit lzma mad matroska mng modules mp3 mp4 mpeg multilib ncurses nfs nfsv4 nfsv41 nls nptl ocr ogg opencl opengl openmp openssl opus pam pango pcre pdf png policykit ppds pulseaudio python qt3support qt5 raw readline s3tc samba sdl seccomp session sox soxr speex spell sqlite ssl startup-notification streaming svg tcpd tiff truetype udev udisks unicode upower usb vaapi vorbis vpx webp wma-fixed wmf wxwidgets x264 x265 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 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="aes mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" 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" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput wacom" KERNEL="linux" L10N="cs en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="cs en cs_CZ" LLVM_TARGETS="X86 BPF" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" QEMU_SOFTMMU_TARGETS="arm i386 x86_64" QEMU_USER_TARGETS="arm i386 x86_64" RUBY_TARGETS="ruby21" USERLAND="GNU" VIDEO_CARDS="intel i965" 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, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


I want to try clang LTO where possible and if build fails try gcc LTO, then clang without LTO and gcc without LTO.

mesa didn't built with clang LTO, but was distributed, so I tried gcc with LTO. Problem is it isn't distributed over distcc but built by libtool locally. env is set to gcc.
I have two questions:
1) is my configuration correct?
2) why is not gcc environment distributed over distcc?

Thanks in advance
Back to top
View user's profile Send private message
Marlo
Veteran
Veteran


Joined: 26 Jul 2003
Posts: 1512

PostPosted: Fri Oct 20, 2017 3:39 am    Post subject: Reply with quote

Hello DeIM,

look here like clang and gcc with /etc/portage/package.env can be controlled.

Best regards
_________________
Thank you for your attention, interest and support.
------------------------------------------------------------------
http://radio.garden/
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum