Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Emerge Zeit bei Chromium
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
Rocky007
n00b
n00b


Joined: 22 Dec 2014
Posts: 66

PostPosted: Thu Jan 15, 2015 9:49 pm    Post subject: Emerge Zeit bei Chromium Reply with quote

Hallo,

ich versuche seit ca 1-2h chromium zu installieren, dies dauert schon sehr lange.
Weiss jemand, wie lange es genau dauert?

Habe den emerge mit
"--jobs=4 "

und in der make.conf
"MAKEOPTS=-j6"

gestartet.

Danke,
Rocky007
Back to top
View user's profile Send private message
py-ro
Veteran
Veteran


Joined: 24 Sep 2002
Posts: 1733
Location: St. Wendel

PostPosted: Thu Jan 15, 2015 10:22 pm    Post subject: Reply with quote

Kommt auf deine Hardware an, aber auf meinem i7 3770 kann das schon mal 1.5h dauern.

Bye
Py
Back to top
View user's profile Send private message
Klaus Meier
Advocate
Advocate


Joined: 18 Apr 2005
Posts: 2903
Location: Bozen

PostPosted: Fri Jan 16, 2015 5:51 am    Post subject: Reply with quote

Ich hab hier gerade so einen lahmen 2-Kerner. Dauert bestimmt so 6 Stunden.
Back to top
View user's profile Send private message
platinumviper
l33t
l33t


Joined: 12 Feb 2004
Posts: 626
Location: Munich, Germany

PostPosted: Fri Jan 16, 2015 10:55 am    Post subject: Reply with quote

Hardware und Konfiguration sind wichtig, bei mir dauert es mit einem i7-4930K @ 4 GHz, /tmp und /var/portage/tmp als 16GB RAM-Disks und -j18 ca 17 Minuten. Auf einem älteren i5-750 @ 2,67 GHz sind es ca 1.5 Stunden.
_________________
No money back garantee. In case of problems, don't call us, we call you.
Back to top
View user's profile Send private message
boospy
Apprentice
Apprentice


Joined: 07 Feb 2010
Posts: 299
Location: Austria

PostPosted: Fri Jan 16, 2015 11:45 pm    Post subject: Reply with quote

Mir das lange kompilieren auf die ... nutze jetzt Chrome Binary.

lg
Back to top
View user's profile Send private message
Marlo
Veteran
Veteran


Joined: 26 Jul 2003
Posts: 1414

PostPosted: Mon Jan 19, 2015 6:13 pm    Post subject: Reply with quote

Hi,

es kann aber auch an Chromium selbst bzw. den Versionen liegen.
Ein @world update führe ich immer ohne Hintergrundprozesse aus,
nur ein bischen surfen. Diese irren Zeitunterschiede sind mir unverständlich.

Grüß
Ma


tux ~ # genlop -t chromium
* www-client/chromium

Tue Oct 1 01:09:20 2013 >>> www-client/chromium-30.0.1599.65
merge time: 35 minutes and 28 seconds.

Wed Oct 2 13:20:50 2013 >>> www-client/chromium-30.0.1599.66
merge time: 44 minutes and 48 seconds.

Wed Oct 9 19:05:15 2013 >>> www-client/chromium-31.0.1650.12
merge time: 36 minutes and 16 seconds.

Wed Oct 16 22:40:42 2013 >>> www-client/chromium-31.0.1650.12-r1
merge time: 35 minutes and 39 seconds.

Mon Oct 21 20:49:18 2013 >>> www-client/chromium-31.0.1650.26
merge time: 39 minutes and 11 seconds.

Tue Oct 29 19:14:06 2013 >>> www-client/chromium-31.0.1650.34
merge time: 43 minutes and 50 seconds.

Sat Nov 2 12:51:03 2013 >>> www-client/chromium-31.0.1650.34
merge time: 39 minutes and 24 seconds.

Mon Nov 4 18:18:40 2013 >>> www-client/chromium-31.0.1650.39
merge time: 49 minutes and 40 seconds.

Thu Nov 21 05:50:26 2013 >>> www-client/chromium-32.0.1700.14
merge time: 42 minutes and 23 seconds.

Mon Nov 25 21:41:25 2013 >>> www-client/chromium-32.0.1700.19
merge time: 45 minutes and 42 seconds.

Tue Nov 26 18:33:01 2013 >>> www-client/chromium-32.0.1700.19
merge time: 45 minutes and 4 seconds.

Wed Dec 4 18:15:59 2013 >>> www-client/chromium-32.0.1700.39
merge time: 1 hour, 3 minutes and 26 seconds.

Fri Dec 6 15:52:22 2013 >>> www-client/chromium-32.0.1700.41
merge time: 59 minutes and 35 seconds.

Fri Dec 13 16:08:49 2013 >>> www-client/chromium-32.0.1700.55
merge time: 56 minutes and 52 seconds.

Fri Dec 13 18:41:34 2013 >>> www-client/chromium-32.0.1700.55
merge time: 1 hour, 18 minutes and 26 seconds.

Wed Dec 25 15:31:20 2013 >>> www-client/chromium-32.0.1700.68
merge time: 1 hour, 2 minutes and 49 seconds.

Thu Jan 9 17:29:27 2014 >>> www-client/chromium-32.0.1700.72
merge time: 44 minutes and 16 seconds.

Thu Jan 16 23:21:48 2014 >>> www-client/chromium-32.0.1700.77
merge time: 50 minutes and 3 seconds.

Sat Jan 18 21:27:54 2014 >>> www-client/chromium-33.0.1750.29
merge time: 51 minutes and 26 seconds.

Fri Jan 24 15:40:58 2014 >>> www-client/chromium-33.0.1750.46
merge time: 38 minutes and 41 seconds.

Mon Jan 27 20:16:46 2014 >>> www-client/chromium-33.0.1750.46
merge time: 45 minutes and 24 seconds.

Sat Feb 1 22:05:33 2014 >>> www-client/chromium-33.0.1750.58
merge time: 39 minutes and 51 seconds.

Thu Feb 6 20:24:31 2014 >>> www-client/chromium-33.0.1750.70
merge time: 40 minutes and 57 seconds.

Tue Feb 25 00:07:08 2014 >>> www-client/chromium-33.0.1750.117
merge time: 3 hours, 12 minutes and 10 seconds.

Sat Mar 1 12:20:28 2014 >>> www-client/chromium-34.0.1847.14
merge time: 5 hours and 25 seconds.

Wed Mar 5 00:01:31 2014 >>> www-client/chromium-34.0.1847.14-r1
merge time: 3 hours, 36 minutes and 43 seconds.

Tue Mar 18 23:49:54 2014 >>> www-client/chromium-34.0.1847.60
merge time: 2 hours, 42 minutes and 51 seconds.

Sun Mar 23 09:02:21 2014 >>> www-client/chromium-34.0.1847.76
merge time: 2 hours, 52 minutes and 17 seconds.

Mon Mar 31 00:38:14 2014 >>> www-client/chromium-34.0.1847.92
merge time: 2 hours, 49 minutes and 33 seconds.

Fri Apr 4 19:40:53 2014 >>> www-client/chromium-34.0.1847.116
merge time: 14 hours, 28 minutes and 56 seconds.

Thu Apr 17 21:54:05 2014 >>> www-client/chromium-35.0.1916.47
merge time: 3 hours, 5 minutes and 34 seconds.

Sat Apr 26 06:31:18 2014 >>> www-client/chromium-35.0.1916.69
merge time: 3 hours and 34 seconds.

Sat May 3 05:15:34 2014 >>> www-client/chromium-35.0.1916.86
merge time: 2 hours, 56 minutes and 41 seconds.

Thu May 15 23:41:38 2014 >>> www-client/chromium-35.0.1916.99
merge time: 3 hours, 1 minute and 39 seconds.

Thu May 22 21:02:50 2014 >>> www-client/chromium-35.0.1916.114-r1
merge time: 3 hours, 2 minutes and 30 seconds.

Sun May 25 04:32:54 2014 >>> www-client/chromium-36.0.1985.18
merge time: 3 hours and 16 seconds.

Tue Jun 10 01:05:29 2014 >>> www-client/chromium-36.0.1985.32
merge time: 3 hours, 16 minutes and 46 seconds.

Sun Jun 15 14:16:58 2014 >>> www-client/chromium-36.0.1985.49
merge time: 3 hours, 5 minutes and 29 seconds.

Sat Jun 21 17:41:57 2014 >>> www-client/chromium-36.0.1985.67
merge time: 3 hours, 6 minutes and 28 seconds.

Sat Jul 5 17:16:19 2014 >>> www-client/chromium-36.0.1985.103
merge time: 46 minutes and 50 seconds.

Sat Jul 19 13:13:02 2014 >>> www-client/chromium-36.0.1985.125
merge time: 46 minutes and 34 seconds.

Mon Jul 21 22:33:58 2014 >>> www-client/chromium-37.0.2062.20
merge time: 50 minutes and 26 seconds.

Thu Jul 24 12:39:45 2014 >>> www-client/chromium-37.0.2062.35
merge time: 46 minutes and 45 seconds.

Thu Jul 31 00:03:05 2014 >>> www-client/chromium-37.0.2062.44
merge time: 49 minutes and 19 seconds.

Thu Jul 31 20:28:20 2014 >>> www-client/chromium-37.0.2062.58
merge time: 48 minutes and 50 seconds.

Sat Aug 9 16:45:00 2014 >>> www-client/chromium-37.0.2062.68
merge time: 47 minutes and 5 seconds.

Sat Aug 9 17:52:58 2014 >>> www-client/chromium-37.0.2062.68
merge time: 46 minutes and 39 seconds.

Fri Aug 29 20:53:51 2014 >>> www-client/chromium-37.0.2062.94
merge time: 55 minutes and 34 seconds.

Tue Sep 2 19:58:30 2014 >>> www-client/chromium-38.0.2125.24
merge time: 1 hour, 19 minutes and 38 seconds.

Fri Sep 5 18:26:25 2014 >>> www-client/chromium-38.0.2125.44
merge time: 1 hour, 11 minutes and 26 seconds.

Wed Sep 17 20:03:57 2014 >>> www-client/chromium-38.0.2125.58
merge time: 1 hour, 11 minutes and 55 seconds.

Mon Sep 22 22:43:49 2014 >>> www-client/chromium-38.0.2125.66
merge time: 1 hour, 12 minutes and 58 seconds.

Sun Sep 28 05:55:46 2014 >>> www-client/chromium-38.0.2125.77
merge time: 1 hour, 17 minutes and 24 seconds.

Mon Oct 6 19:43:51 2014 >>> www-client/chromium-38.0.2125.101
merge time: 1 hour, 16 minutes and 6 seconds.

Mon Oct 13 17:38:28 2014 >>> www-client/chromium-39.0.2171.19
merge time: 10 hours, 53 minutes and 54 seconds.

Mon Oct 20 20:16:30 2014 >>> www-client/chromium-39.0.2171.27
merge time: 1 hour, 10 minutes and 46 seconds.

Thu Oct 23 21:38:49 2014 >>> www-client/chromium-39.0.2171.27
merge time: 1 hour, 12 minutes and 6 seconds.

Sat Oct 25 10:42:16 2014 >>> www-client/chromium-39.0.2171.36
merge time: 1 hour, 14 minutes and 43 seconds.

Mon Nov 3 21:03:47 2014 >>> www-client/chromium-39.0.2171.42
merge time: 1 hour, 18 minutes and 2 seconds.

Fri Nov 7 00:11:36 2014 >>> www-client/chromium-39.0.2171.42
merge time: 1 hour, 2 minutes and 13 seconds.

Thu Nov 20 14:32:33 2014 >>> www-client/chromium-39.0.2171.62
merge time: 1 hour, 5 minutes and 10 seconds.

Fri Nov 21 11:17:04 2014 >>> www-client/chromium-39.0.2171.62
merge time: 1 hour, 9 minutes and 27 seconds.

Mon Nov 24 23:17:30 2014 >>> www-client/chromium-40.0.2214.10
merge time: 1 hour, 9 minutes and 15 seconds.

Mon Dec 8 21:48:36 2014 >>> www-client/chromium-40.0.2214.28
merge time: 1 hour, 10 minutes and 19 seconds.

Mon Dec 22 09:32:49 2014 >>> www-client/chromium-40.0.2214.45
merge time: 1 hour, 13 minutes and 21 seconds.

Wed Dec 31 04:28:44 2014 >>> www-client/chromium-40.0.2214.45
merge time: 1 hour, 3 minutes and 48 seconds.

Fri Jan 9 22:27:47 2015 >>> www-client/chromium-40.0.2214.69
merge time: 1 hour, 22 minutes and 38 seconds.

Sun Jan 18 14:11:24 2015 >>> www-client/chromium-40.0.2214.85
merge time: 5 hours, 10 minutes and 21 seconds.
_________________
Thank you for your attention, interest and support.
------------------------------------------------------------------
http://radio.garden/
Back to top
View user's profile Send private message
SkaaliaN
Veteran
Veteran


Joined: 21 Apr 2005
Posts: 1345
Location: Tranquility

PostPosted: Tue Jan 20, 2015 8:03 am    Post subject: Reply with quote

Marlo wrote:
Hi,
Fri Apr 4 19:40:53 2014 >>> www-client/chromium-34.0.1847.116
merge time: 14 hours, 28 minutes and 56 seconds.
[/color]


8O Darf man fragen, was du für ein System bestitzt?
_________________
-RHP- Respect Honor Passion
Back to top
View user's profile Send private message
Josef.95
Advocate
Advocate


Joined: 03 Sep 2007
Posts: 3626
Location: Germany

PostPosted: Tue Jan 20, 2015 8:59 am    Post subject: Reply with quote

Marlo wrote:
es kann aber auch an Chromium selbst bzw. den Versionen liegen.
Ein @world update führe ich immer ohne Hintergrundprozesse aus,
nur ein bischen surfen. Diese irren Zeitunterschiede sind mir unverständlich.
[...]

Nutzt du eventuell mehrere emerge Jobs (emerge --jobs[=JOBS] Option)?
Falls ja, das könnte diese sehr unterschiedlichen Bauzeiten erklären (wenn zb im weiteren Job noch libreoffice webkit-gtk oder sonstige Brocken nebenbei mitgebaut werden ;))
Back to top
View user's profile Send private message
schmidicom
Veteran
Veteran


Joined: 09 Mar 2006
Posts: 1559
Location: Schweiz

PostPosted: Tue Jan 20, 2015 9:20 am    Post subject: Reply with quote

Google hat doch bei Chromium (zumindest unter Linux) seit irgendeiner Version auf clang/llvm umgestellt, möglicherweise hat auch das einen Einfluss auf die unterschiedlichen Compile-Zeiten?

EDIT:
Hab die News dazu wieder gefunden: http://heise.de/-2512833
_________________
GPG: 0x3FC78AEE51E5FB95
Back to top
View user's profile Send private message
franzf
Advocate
Advocate


Joined: 29 Mar 2005
Posts: 4408

PostPosted: Tue Jan 20, 2015 9:33 am    Post subject: Reply with quote

schmidicom wrote:
Google hat doch bei Chromium (zumindest unter Linux) seit irgendeiner Version auf clang/llvm umgestellt, möglicherweise hat auch das einen Einfluss auf die unterschiedlichen Compile-Zeiten?

Google ja, aber das bezieht sich AFAIK nur auf den "google-chrome" browser, also das closed-source-Projekt. Umstellen auf clang für chromium könnte aber durchaus ein paar Prozent rausschinden - hat es jedenfalls hier bei Qt5 (zusätzlich ist es ressourcenschonender - ich hab irgendwie kaum was davon gemerkt, mit gcc gab es immer einige kurze locks, z.B. im Browser scrollen oder Fenster wechseln)
Back to top
View user's profile Send private message
schmidicom
Veteran
Veteran


Joined: 09 Mar 2006
Posts: 1559
Location: Schweiz

PostPosted: Tue Jan 20, 2015 10:01 am    Post subject: Reply with quote

Habe es spaßeshalber gleich mal ausprobiert chromium-39 mit clang/llvm zu compilieren aber irgendwie haut das nicht so ganz hin.
Falls es einen interessiert habe ich das build.log gleich mal in die Cloud geworfen. Seltsam finde ich dabei das er im Log ganz am Anfang noch den GCC als "C Compiler" angibt und dann am Ende doch an clang++ scheitert...
_________________
GPG: 0x3FC78AEE51E5FB95
Back to top
View user's profile Send private message
franzf
Advocate
Advocate


Joined: 29 Mar 2005
Posts: 4408

PostPosted: Tue Jan 20, 2015 10:22 am    Post subject: Reply with quote

schmidicom wrote:
Habe es spaßeshalber gleich mal ausprobiert chromium-39 mit clang/llvm zu compilieren aber irgendwie haut das nicht so ganz hin.
Falls es einen interessiert habe ich das build.log gleich mal in die Cloud geworfen. Seltsam finde ich dabei das er im Log ganz am Anfang noch den GCC als "C Compiler" angibt und dann am Ende doch an clang++ scheitert...

Gut, das braucht wohl doch ein wenig mehr als nur CC und CXX exportieren:
https://code.google.com/p/chromium/wiki/Clang

Wobei - das chromium-ebuild deaktiviert explizit das Bauen mit clang (src_configure -> Z. 372 + 373) - änder die Nullen in Einsen und versuchs nochmal.
Back to top
View user's profile Send private message
schmidicom
Veteran
Veteran


Joined: 09 Mar 2006
Posts: 1559
Location: Schweiz

PostPosted: Tue Jan 20, 2015 10:51 am    Post subject: Reply with quote

Nö, das klappt auch nicht. Nun stirbt er an einer völlig anderen Stelle und zeigt am Anfang des Logs immer noch den GCC als "C Compiler" an.
Aber bei der Komplexität dieses ebuilds sollte sich wohl besser derjenige mit dem Thema "Chromium und clang/llvm" auseinander setzen der es geschrieben hat.
_________________
GPG: 0x3FC78AEE51E5FB95
Back to top
View user's profile Send private message
Marlo
Veteran
Veteran


Joined: 26 Jul 2003
Posts: 1414

PostPosted: Tue Jan 20, 2015 5:04 pm    Post subject: Reply with quote

metal1ty wrote:


8O Darf man fragen, was du für ein System bestitzt?


Na klar!

Code:
Portage 2.2.15 (python 2.7.9-final-0, default/linux/amd64/13.0/desktop/gnome/systemd, gcc-4.8.3, glibc-2.19-r1, 3.17.7-gentoo x86_64)
=================================================================
System uname: Linux-3.17.7-gentoo-x86_64-AMD_Phenom-tm-_II_X6_1090T_Processor-with-gentoo-2.2
...
CFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"
...
MAKEOPTS="-j7"

_________________
Thank you for your attention, interest and support.
------------------------------------------------------------------
http://radio.garden/
Back to top
View user's profile Send private message
Marlo
Veteran
Veteran


Joined: 26 Jul 2003
Posts: 1414

PostPosted: Tue Jan 20, 2015 5:10 pm    Post subject: Reply with quote

Josef.95 wrote:

Nutzt du eventuell mehrere emerge Jobs (emerge --jobs[=JOBS] Option)?
Falls ja, das könnte diese sehr unterschiedlichen Bauzeiten erklären (wenn zb im weiteren Job noch libreoffice webkit-gtk oder sonstige Brocken nebenbei mitgebaut werden ;))


Ja genau! Das müsste man merken und deshalb achte ich darauf bei einem update wenig (nur surfen etc) nebenbei zu machen.

thx
Ma
_________________
Thank you for your attention, interest and support.
------------------------------------------------------------------
http://radio.garden/
Back to top
View user's profile Send private message
SkaaliaN
Veteran
Veteran


Joined: 21 Apr 2005
Posts: 1345
Location: Tranquility

PostPosted: Wed Jan 21, 2015 4:21 pm    Post subject: Reply with quote

Hey,

habe es mal getestet.

Code:

# genlop -t www-client/chromium-39.0.2171.65
 
* www-client/chromium

     Wed Jan 21 01:46:37 2015 >>> www-client/chromium-39.0.2171.65
       merge time: 1 hour, 14 minutes and 41 seconds.

_________________
-RHP- Respect Honor Passion
Back to top
View user's profile Send private message
schmidicom
Veteran
Veteran


Joined: 09 Mar 2006
Posts: 1559
Location: Schweiz

PostPosted: Thu Jan 22, 2015 8:52 am    Post subject: Reply with quote

Nur zur Info:
Das mit clang und Chromium scheint auch im Bugzilla von Gentoo schon langer ein Thema zu sein.
https://bugs.gentoo.org/show_bug.cgi?id=502456
_________________
GPG: 0x3FC78AEE51E5FB95
Back to top
View user's profile Send private message
Marlo
Veteran
Veteran


Joined: 26 Jul 2003
Posts: 1414

PostPosted: Fri Jan 23, 2015 6:39 pm    Post subject: Reply with quote

Hi,

die *-r1 läuft wieder in normaler Zeit durch.

Quote:

Fri Jan 23 19:34:18 2015 >>> www-client/chromium-40.0.2214.85-r1
merge time: 1 hour, 24 minutes and 52 seconds.

_________________
Thank you for your attention, interest and support.
------------------------------------------------------------------
http://radio.garden/
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 6108
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Tue Mar 03, 2015 5:37 pm    Post subject: Reply with quote

schmidicom wrote:
Nur zur Info:
Das mit clang und Chromium scheint auch im Bugzilla von Gentoo schon langer ein Thema zu sein.
https://bugs.gentoo.org/show_bug.cgi?id=502456



Klasse ! - endlich howto gefunden, Chromium braucht immer länger zum Bauen,

mal schauen, wie das ganze mit LLVM bzw. Clang läuft

https://gist.github.com/tamiko/7e3a0be806fac11f2a35

Quote:
How to set up llvm/clang with libc++ as system compiler v0.1
============================================================
Author: Matthias Maier <tamiko@gentoo.org>


Prerequisites
=============

* a chroot/lxc environment (or similar) with a fresh stage3, preferably
~arch

WARNING: It should be clear that replacing gcc and libstdc++ by clang and
libc++ is highly experimental. This guide is not meant to be applied to
anything else than a chroot environment (or similar).


Setting up the toolchain
========================

* Keyword live builds to get the latest (and greatest) version of the
toolchain:

% echo '
sys-libs/libcxx **
sys-libs/libcxxrt ~arch
sys-devel/llvm ~arch
sys-devel/clang ~arch' >> /etc/portage/package.accept_keywords/clang

% echo '
sys-devel/llvm clang
sys-libs/libcxx static-libs
sys-libs/libcxxrt static-libs' >> /etc/portage/package.use/clang

Note: Clang makes heavy use of libraries provided by gcc. This involves
the C++ standard library implementation libstdc++ as well as low level
compiler runtime and initialization routines such as crtbegin.o, crtend.o
or libgcc_s.so (and derivatives).

Scope of this little exercise is just to replace gcc and libstdc++ by
clang and libc++.

Note: For the brave who also want to replace (most parts) of the compiler
runtime stuff, compile libcxxrt with libunwind:

% echo 'sys-libs/libcxxrt -libunwind' >> \
/etc/portage/profile/packge.use.mask/clang
% echo '
sys-libs/libunwind static-libs
sys-libs/libcxxrt libunwind' >> /etc/portage/package.use/clang

Unfortunately, clang does not provide any means of specs files to
configure the link interface, so a patch is needed to fix up clang's
link interface (disclaimer: This is totally experimental :-]):
- Put [1] (attachment at the end) into
/etc/portage/patches/sys-devel/llvm
- furthermore, add "--rtlib=compiler-rt" to the LDFLAGS portion of
the next section.

(Fun fact: Above runtime libraries will still show up in the
finally linked executable due to glibc depending on them, but this is a
matter of principle, isn't it? :-])

* compile the toolchain

% emerge libcxx clang


Setting up the toolchain
========================

* We use package.env to set up all necessary environment variables in
order to compile with clang:

% echo '
CC="clang"
CXX="clang++"
CPP="clang -E"
BUILD_CC="${CC}"
BUILD_CPP="${CPP}"
BUILD_CXX="${CXX}"
CFLAGS_BCK="${CFLAGS}"
CFLAGS="${CFLAGS}"
CXXFLAGS_BCK="${CXXFLAGS}"
CXXFLAGS="${CXXFLAGS} -stdlib=libc++"
LDFLAGS_BCK="${LDFLAGS}"
LDFLAGS="${LDFLAGS} -stdlib=libc++"' >> /etc/portage/env/clang

% echo '
CC="gcc"
CXX="g++"
CPP="gcc -E"
BUILD_CC="${CC}"
BUILD_CPP="${CPP}"
BUILD_CXX="${CXX}"
CFLAGS="${CFLAGS_BCK}"
CXXFLAGS="${CXXFLAGS_BCK}"
LDFLAGS="${LDFLAGS_BCK}"' >> /etc/portage/env/noclang

% echo '
# Compile with clang by default:
*/* clang
# Exclude all system packages that rely on gcc:
dev-libs/elfutils noclang
sys-devel/binutils noclang
sys-devel/gcc noclang
sys-libs/glibc noclang' >> /etc/portage/package.env/clang

* Reemerge the clang toolchain

% emerge -1 llvm clang
% emerge -1 libcxxrt libcxx
% emerge -1 llvm clang

* Test the clang toolchain

% echo '
#include <iostream>
int main() {
std::cout << "Hello libc++" << std::endl;
}' > test.cc

% clang++ -v -stdlib=libc++ -o test test.cc
% ./test
Hello libc++
% ldd ./test | grep c++
libc++.so.1 => /usr/lib64/libc++.so.1 (0x00007fe54ebe8000)

Note: In case of above libunwind trickery the link line (after the
invocation of

* Reemerge world

% emerge -e @world


[1] Patch
=========

From 19b5df53f4b9958920d9e3bc65f95b3206ca498e Mon Sep 17 00:00:00 2001
From: Matthias Maier <tamiko@kyomu.43-1.org>
Date: Mon, 27 Oct 2014 00:46:47 +0100
Subject: [PATCH] Bloody hack

---
lib/Driver/Tools.cpp | 70 ++++++++++++++++++++++++++++++++++------------------
1 file changed, 46 insertions(+), 24 deletions(-)

diff --git a/tools/clang/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index c18f353..0fc4697 100644
--- a/tools/clang/lib/Driver/Tools.cpp
+++ b/tools/clang/lib/Driver/Tools.cpp
@@ -2135,9 +2135,6 @@ static void addClangRTLinux(
".a");

CmdArgs.push_back(Args.MakeArgString(LibClangRT));
- CmdArgs.push_back("-lgcc_s");
- if (TC.getDriver().CCCIsCXX())
- CmdArgs.push_back("-lgcc_eh");
}

static void addClangRTWindows(const ToolChain &TC, const ArgList &Args,
@@ -7195,32 +7192,56 @@ static void AddLibgcc(const llvm::Triple &Triple, const Driver &D,
bool isAndroid = Triple.getEnvironment() == llvm::Triple::Android;
bool StaticLibgcc = Args.hasArg(options::OPT_static_libgcc) ||
Args.hasArg(options::OPT_static);
- if (!D.CCCIsCXX())
- CmdArgs.push_back("-lgcc");
+ bool OnlyLibstdcxxStatic = Args.hasArg(options::OPT_static_libstdcxx) &&
+ !Args.hasArg(options::OPT_static);
+
+ // BEGIN: Very dirty hack
+ bool with_libcxx = false;
+ if (Arg *A = Args.getLastArg(options::OPT_stdlib_EQ)) {
+ StringRef Value = A->getValue();
+ if (Value == "libc++")
+ with_libcxx = true;
+ }
+
+ if (with_libcxx) {
+
+ CmdArgs.push_back("-lunwind");
+
+ if (Args.hasArg(options::OPT_static)) {
+ CmdArgs.push_back("-lgcc"); // libpthread, I curse you!
+ CmdArgs.push_back("-lgcc_eh");
+ }
+
+ // END: Very dirty hack

- if (StaticLibgcc || isAndroid) {
- if (D.CCCIsCXX())
- CmdArgs.push_back("-lgcc");
} else {
if (!D.CCCIsCXX())
- CmdArgs.push_back("--as-needed");
- CmdArgs.push_back("-lgcc_s");
- if (!D.CCCIsCXX())
- CmdArgs.push_back("--no-as-needed");
- }
+ CmdArgs.push_back("-lgcc");

- if (StaticLibgcc && !isAndroid)
- CmdArgs.push_back("-lgcc_eh");
- else if (!Args.hasArg(options::OPT_shared) && D.CCCIsCXX())
- CmdArgs.push_back("-lgcc");
+ if (StaticLibgcc || isAndroid) {
+ if (D.CCCIsCXX())
+ CmdArgs.push_back("-lgcc");
+ } else {
+ if (!D.CCCIsCXX())
+ CmdArgs.push_back("--as-needed");
+ CmdArgs.push_back("-lgcc_s");
+ if (!D.CCCIsCXX())
+ CmdArgs.push_back("--no-as-needed");
+ }

- // According to Android ABI, we have to link with libdl if we are
- // linking with non-static libgcc.
- //
- // NOTE: This fixes a link error on Android MIPS as well. The non-static
- // libgcc for MIPS relies on _Unwind_Find_FDE and dl_iterate_phdr from libdl.
- if (isAndroid && !StaticLibgcc)
- CmdArgs.push_back("-ldl");
+ if (StaticLibgcc && !isAndroid)
+ CmdArgs.push_back("-lgcc_eh");
+ else if (!Args.hasArg(options::OPT_shared) && D.CCCIsCXX())
+ CmdArgs.push_back("-lgcc");
+
+ // According to Android ABI, we have to link with libdl if we are
+ // linking with non-static libgcc.
+ //
+ // NOTE: This fixes a link error on Android MIPS as well. The non-static
+ // libgcc for MIPS relies on _Unwind_Find_FDE and dl_iterate_phdr from libdl.
+ if (isAndroid && !StaticLibgcc)
+ CmdArgs.push_back("-ldl");
+ }
}

static std::string getLinuxDynamicLinker(const ArgList &Args,
@@ -7544,6 +7565,7 @@ void gnutools::Link::ConstructJob(Compilation &C, const JobAction &JA,
!isAndroid)
CmdArgs.push_back("-lpthread");

+ CmdArgs.push_back("-lunwind");
CmdArgs.push_back("-lc");

if (Args.hasArg(options::OPT_static))
--
2.1.2

_________________
https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.9.0
https://github.com/kernelOfTruth/pulseaudio-equalizer-ladspa

Hardcore Gentoo Linux user since 2004 :D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) 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