Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 464758 - mail-client/thunderbird-17.0.5 fails to build with clang and clang+lto
Summary: mail-client/thunderbird-17.0.5 fails to build with clang and clang+lto
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal with 1 vote (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords: PATCH
Depends on: 462488 462554
Blocks: systemwide-clang lto
  Show dependency tree
 
Reported: 2013-04-05 17:04 UTC by cmuelle8
Modified: 2017-08-26 17:57 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
/etc/portage/patches/mail-client/thunderbird-17.0.5/thunderbird-17.0.5.clang-3.3svn.patch (thunderbird-17.0.5.clang-3.3svn.patch,4.18 KB, patch)
2013-04-05 17:06 UTC, cmuelle8
Details | Diff
/etc/portage/patches/mail-client/thunderbird-17.0.5/thunderbird-17.0.5.mozbug784631.patch (thunderbird.mozbug784631.patch,3.59 KB, patch)
2013-04-05 17:06 UTC, cmuelle8
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description cmuelle8 2013-04-05 17:04:41 UTC
Recipe to build thunderbird with clang:

thunderbird-17.0.4-r1 / clang-9999+lto / llvm-9999 build issues


1) currently live ebuilds from trunk are versioned llvm-3.3svn
keyword -9999 versions in /etc/paludis/keywords.conf and build them

2) make ar, nm tools of binutils use llvm linker plugins
see bug #462554

3) patch mozcoreconf-2.eclass to allow passing -O4 as an optimization flag
see bug #462488

4) enable clang/llvm environment for TB in /etc/paludis/bashrc
case "${CATEGORY}/${PN}" in
        mail-client/thunderbird) ;&
        "USE-CLANG-AND-LLVM")
                CC="clang"
                CXX="clang++"
                CFLAGS="${CFLAGS%% -O*} -O4"
                LDFLAGS="${LDFLAGS} -Wl,-z,norelro"
                ;;
esac
CXXFLAGS="${CFLAGS}"
LDFLAGS="${CFLAGS} ${LDFLAGS}"

5) enable TB use flags in /etc/paludis/use.conf
mail-client/thunderbird custom-cflags
mail-client/thunderbird custom-optimization

6) for epatch_user to find, place TB source patch in attachment in
/etc/portage/patches/mail-client/thunderbird/


NOTE:  there is /no/ issue with methodjit in the 17.0.4 mozilla codebase, so we do not need to take extra care to disable it, like for bug #462608.

CAUTION:  please be aware that this is highly experimental.  BACKUP your data and mail if you want to give it a try (which you're advised to do regularily anyway)

Reproducible: Always
Comment 1 cmuelle8 2013-04-05 17:06:01 UTC
Created attachment 344530 [details, diff]
/etc/portage/patches/mail-client/thunderbird-17.0.5/thunderbird-17.0.5.clang-3.3svn.patch
Comment 2 cmuelle8 2013-04-05 17:06:21 UTC
Created attachment 344532 [details, diff]
/etc/portage/patches/mail-client/thunderbird-17.0.5/thunderbird-17.0.5.mozbug784631.patch
Comment 3 cmuelle8 2013-04-06 19:33:48 UTC
- no difference between versions 17.0.4-r1 and 17.0.5
- ebuild from tree does not need patching

Testing TB for the methodjit issue can be done using the thunderbrowse addon.  Install via Addons.., navigate to dromaeo.com using the addon.  If TB does not segfault loading the js-tests page, it does not need the fix described in bug #462608.  Over here, each 17* version worked fine so far.
Comment 4 Jory A. Pratt gentoo-dev 2017-08-26 17:57:09 UTC
If you feel I have closed your bug and it is still a current issue, please reopen and update it completely. We will not work bugs that have no ebuild in tree any longer or can not be reproduced with a current system.

Thank You for your support and understanding
The Mozilla Team