[tor-bugs] #9711 [Tor bundles/installation]: Test out crosstools-ng for Gitian OSX builds (instead of toolchain4 binaries)
Tor Bug Tracker & Wiki
blackhole at torproject.org
Tue Oct 8 20:37:16 UTC 2013
#9711: Test out crosstools-ng for Gitian OSX builds (instead of toolchain4
binaries)
------------------------------------------+-------------------------------
Reporter: mikeperry | Owner: erinn
Type: task | Status: needs_information
Priority: normal | Milestone:
Component: Tor bundles/installation | Version:
Resolution: | Keywords: tbb-3.0, gitian
Actual Points: | Parent ID:
Points: |
------------------------------------------+-------------------------------
Comment (by mingwandroid):
Mike, are you using llvmgcc or normal gcc from toolchain4 at present? If
normal gcc, then I'd recommend that you guys build from the latest of the
cctools-llvm branch to get the latest fixes (llvmgcc is disabled at
present, IMHO it was never very reliable, even the official Apple
binaries). If you update to the latest then clang can be built now,
however this is very untested so far and if you look in the TODO file in
the root folder you'll get a better picture of some things that may still
be problematic with clang.
Georg, there's no reason to use darwin11 instead of darwin10. When I
started this work it was with a darwin11 SDK so it's purely a matter of
habit for me. The merge to crosstool-ng is being done by Yann Diorcet and
myself; I handle the darwin11 samples and he does the same for the
darwin10 ones.
A compiler built with the darwin11 SDK (MacOSX10.7.sdk) can be used fine
to build software for darwin10 using -mmacosx-version-min=10.5, However
feel free to base your version on i686-apple-darwin10 (e.g. flosoft's
MacOSX10.6.sdk) and the i686-apple-darwin10 sample instead.
I recommend studying the two crosstool.config files:
samples/i686-apple-darwin10/crosstool.config and samples/i686-apple-
darwin11/crosstool.config
.. these are just samples of course. You could make your own, e.g. darwin-
gitian. The final compiler prefixes don't depend on the sample folder name
but rather the options specified in the crosstool.config file itself.
Some options that should be noted are:
CT_DARWIN_SDK_PATH="${HOME}/MacOSX10.7.sdk"
.. this is where you placed your OSX SDK.
CT_DARWIN_COPY_SDK_TO_SYSROOT=n
.. setting this to y means that some headers and dylibs from the OSX SDK
are copied into the installation prefix. Doing this means you do not need
to pass -sysroot to the compiler on the commandline, with the down-side
being that you'd not be able to distribute the built toolchain due to
copyrights and the OSX SDK license.
CT_LLVM_V_3_3=y
.. specifies the version of LLVM (and clang) to use. LLVM is compiled into
cctools for LTO support and also, obviously for clang. Toolchain4 used
LLVM 2.7 which is quite old at this stage. 3.3 is the latest release. I'm
more interested in modernising things than using old versions (though
reliability trumps all other concerns).
CT_DEBUGGABLE_TOOLCHAIN=n
.. expect to use 20GB if you set this to y. The built tools (and also
those installed) are built at -O0 -ggdb and left un-stripped.
I think it would be sensible for me to setup exactly the same environment
you are using. Is this Ubuntu? If so, can you point me to the exact ISO
and any scripts you use to prepare it for development? I will then make a
new VM.
If you've got some logs (build.log) detailing the "fun bugs" please post
them.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/9711#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list