View previous topic :: View next topic |
Author |
Message |
Shining Arcanine Veteran
Joined: 24 Sep 2009 Posts: 1110
|
|
Back to top |
|
|
Shining Arcanine Veteran
Joined: 24 Sep 2009 Posts: 1110
|
Posted: Mon Feb 08, 2010 12:54 am Post subject: |
|
|
Well, I have an update... I am building chromium. It is so complex that I am not confident that I will get an ebuild working, but here are some shell commands that should work after you download the source:
Code: | cd ~/
wget http://src.chromium.org/svn/trunk/tools/depot_tools.tar.gz
tar -xzf depot_tools.tar.gz
wget http://build.chromium.org/buildbot/archives/chromium.r38327.tgz
tar -xzf chromium.r38327.tgz
mv home/chrome-svn/tarball/chromium ./
rm -rf ./home*
export CCACHE_DIR=/var/tmp/ccache
export GYP_GENERATORS=make
export PATH=~/depot_tools:"$PATH"
export BUILDTYPE=Release
export V=1
export CHROMIUM_ROOT=~/chromium
export CC="ccache gcc"
export CXX="ccache g++"
gclient sync --force
make -j3 chrome |
This assumes that you have a dual core processor and ccache installed. The chromium tarball is the most up to date version available at the moment, but in the future, a more up to date file for the tarball can probably be found at the following page:
http://build.chromium.org/buildbot/archives/chromium_tarball.html
Extracting the tarball gives you a few nested directories with nothing but a directory in a directory in a... until you finally have the chrome directory that has the src directory and a few other things in it. I don't rec
I have a few observations regarding the compilation, which is that the CFLAGS google's build system selects are wrong. Here is a copy of a line of output from the terminal:
Code: | ccache g++ -pthread -fno-exceptions -Wno-unused-parameter -Wno-missing-field-initializers -D_FILE_OFFSET_BITS=64 -fvisibility=hidden -m32 -march=pentium4 -msse2 -mfpmath=sse -fno-strict-aliasing -fno-strict-aliasing -Wno-deprecated-declarations -Wno-unused-function -O2 -fno-ident -fdata-sections -ffunction-sections -fno-asynchronous-unwind-tables -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -DU_STATIC_IMPLEMENTATION -DCHROMIUM_BUILD -DENABLE_GPU=1 -DU_COMMON_IMPLEMENTATION -DNDEBUG -DNVALGRIND -Ithird_party/icu/public/common -Ithird_party/icu/public/i18n -Ithird_party/icu/source/common -Ithird_party/icu/source/i18n -MMD -MF out/Release/obj.target/icuuc/third_party/icu/source/common/utext.o.d.tmp -c -o out/Release/obj.target/icuuc/third_party/icu/source/common/utext.o third_party/icu/source/common/utext.cpp |
It should be doing -march=prescott (or -march=native if the build system wants to let GCC do the work), but instead it is doing -march=pentium4 -msse2. I assume that this is for cross compiling, so one system's CPU architecture will not render the binaries unusable on another system, but I do not like it as it will produce a suboptimal binaries for my system. I will have to change this as soon as I figure out how to change it.
Also, equery files chromium shows that the files the chromium package builds are in a few locations, with >90% them in a single folder, so while it would be difficult to make an ebuild for this, it should be relatively easy for me to generate a binary package for portage that anyone interested could use to install this. It would of course require a 32-bit Pentium 4 or higher, but it is something, although I am not sure how I would host it to be able to share it with anyone here that would be interested in it. :/ |
|
Back to top |
|
|
Shining Arcanine Veteran
Joined: 24 Sep 2009 Posts: 1110
|
Posted: Mon Feb 08, 2010 3:09 am Post subject: |
|
|
Okay, I have it compiled and running. I do not see why the previous version, 5.0.307.5, is hardmasked. I could not find any bugs explaining it, but the latest version runs without an issue for me. I am running ~x86, which could explain why it works for me.
Here are the sunspider results. Chromium 4.0.266.0 (33992) took 762.4ms +/- 3.9% on my T2400. Chrome 5.0.320.0 (38335) took 640.2ms +/- 6.6% on my laptop.
Are there any guides online for how I would make an binary package out of this? I assume that the 800+ MB tarball that google provides for building chrome is too large for an ebuild and I do not know exactly how to put the binary files into a format suitable for portage to keep track of files. :/ |
|
Back to top |
|
|
Shining Arcanine Veteran
Joined: 24 Sep 2009 Posts: 1110
|
Posted: Mon Feb 08, 2010 2:25 pm Post subject: |
|
|
Another update. I found out how to modify the chrome build system so I could specify my own CFLAGS.
src/build/common.gypi has the ia32 compiler flags around line 800 or so.
I changed the defaults from "-march=pentium4 -msse2 -mfpmath=sse" to "-march=prescott -pipe -fomit-frame-pointer -floop-interchange -floop-strip-mine -floop-block -mfpmath=sse" and I am recompiling it now. I wonder if this will have any tangible difference in the sunspider results. |
|
Back to top |
|
|
codestation Tux's lil' helper
Joined: 09 Nov 2008 Posts: 126 Location: /dev/negi
|
Posted: Mon Feb 08, 2010 2:48 pm Post subject: |
|
|
Here explains why the dev releases are hardmasked. (If you dont mind the bugs in the dev releases you can unmask it anyway).
As for making a binary package, you have to make a ebuild first, then is as easy as doing a "emerge -B chromium" or "quickpkg chromium". About the ebuild it can be as simple as renaming it with the new version then update the manifest, but the problem here is that the source tarball that gentoo provide is a nicely stripped one of ~150MiB so i dont know if the ebuild can work with the original tarball. _________________ Just feel the code... |
|
Back to top |
|
|
Shining Arcanine Veteran
Joined: 24 Sep 2009 Posts: 1110
|
Posted: Mon Feb 08, 2010 5:18 pm Post subject: |
|
|
codestation wrote: | Here explains why the dev releases are hardmasked. (If you dont mind the bugs in the dev releases you can unmask it anyway).
As for making a binary package, you have to make a ebuild first, then is as easy as doing a "emerge -B chromium" or "quickpkg chromium". About the ebuild it can be as simple as renaming it with the new version then update the manifest, but the problem here is that the source tarball that gentoo provide is a nicely stripped one of ~150MiB so i dont know if the ebuild can work with the original tarball. |
Thankyou for the information. It is very informative. I will try getting the files from the source tarball Gentoo provides and looking for the equivalent files in the tarballl Google provides. I am hoping that the directories in each tarball will intersect to the point where Gentoo's tarball will be a subset of Google's tarball so I can just strip out the directories that are not in the intersection.
I also want to mention the results from the compilation. There seems to be no significant difference from using the heavier optimization flags with GCC 4.4.2, as the sunspider results from the new compilation is 640.8ms +/- 3.2%, which is statistically the same as 640.2ms +/- 6.6%. In other words, Google Chrome seems to have no significant benefit from SSE3 instructions and GCC's graphite optimizer. |
|
Back to top |
|
|
|