Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Choosing compiler for building Mozilla for Symbian OS

4 views
Skip to first unread message

Harry Li

unread,
May 11, 2008, 3:20:08 PM5/11/08
to dev-platfo...@lists.mozilla.org
Hi List,

As some of you have already known I am doing Mozilla porting onto S60
platform (v3.0 and later) which is based on Symbian OS (v9.0 and
later) now. I had submitted my first patch (bug 432430) that makes
NSPR built successfully without test last week. In the past two days I
was working on the unit test cases builds, and wanna have a check of
test result. However, there was a problem results this query mail.

Symbian OS C++ progaming has many rules/restrictions, one of them is
that you can not use global variables (called Writable Static Data in
Symbian OS documents) in DLLs(dynamic linked library, name and usage
are the same as windows DLL, but not others). For this reason many
projects porting work need heavy modifications in sources. A good news
is you can use WSD(Writable Static Data) in DLLs (although still
unrecommended) after Symbian OS v8.1a, and Nokia stopped releasing new
pre-v9.0 phone models about two years ago. But until early this year
for Symbian (and until yesterday for me), a bug report (
http://www3.symbian.com/faq.nsf/AllByDate/B8542F039C193CCC802573DA0011DFA7
) shows that the GCCE compiler has a defect which can not produce
correct result for DLLs which contain WSD. The GCCE compiler is used
to build executables on target device/phone, and it's free of charge
cause of the GNU GCC origin. As the bug report suggests, we have
almost four choices:

1 - Move to a better supported compiler "RVCT"
http://www.arm.com/products/DevTools/RVCT.html , but I heard this
monster will cost over thousands of UKP, don't know if this is true.
2 - Upgrade GCCE to a newer one. Maybe newer GCCE from CodeSourcery (
http://www.codesourcery.com/gnu_toolchains/arm ) will fix this
problem, but as far as I tried in past two days, there are two new
GCCE releases can not even generate a result binary. This is probably
because the GCCE compiler has no official warranty.
3 - Move WSD into Classes or somewhere else. Probably this will be a
mission-impossible for me, and for module owner to review, and even
future module owners.
4 - Compile DLLs as static library and then link them back into executables.

Currently I am using the last one which is the only possible one. But
I still think it's not the best way cause static library will make
executables large and code unsharable. What's worse is that unlike
other mobile platforms(even windows mobile 5 afterwards), the Symbian
OS debug emulator is a single process Windows executable runs on
surely x86. That means currently I do my debug builds (with testing
purpose) on a x86 compiler provided by Nokia, the only compiler which
generate binary used by its x86 emulator. One more problem is about
building them under Linux/Unix with gmake, a discussion is presented
by me here http://wiki.mozilla.org/Mobile/Build/Symbian#Can_I_build_it_under_Linux.2FUnix_with_gmake.3F
.

So in summary, I want to get some suggestions about, according to
Mozilla customs, should I abandon any compiler? or what's the main
points for choosing compiler tool set? including tool price, legality
and anything matters. If you have more questions, just let them out
cause I don't know whether I get myself expressed clearly enough or
not.

Best,
Harry Li

Harry Li

unread,
May 11, 2008, 11:13:18 PM5/11/08
to Makoto Kato, dev-platfo...@lists.mozilla.org
Hi Makoto,

Thanks for your reply and I just missed the point that our source
should be used by more people. So considering this we have to abandon
RVCT surely.

Newer GCCE from CodeSourcery has other defects too, one is that the
linker gives me "unresolved symbol __aeabi_uidiv" error, maybe
something missed in libgcc.a comes with newer GCCE. However, I will
continue investigation on newer GCCE and also build with static
library instead. Yesterday I posted a help in a Symbian OS experts
group, Paul Todd (
http://blogs.forum.nokia.com/blog/paul-todds-forum-nokia-blog ) told
me he had asked Nokia people to take care of this incorrect DLL with
WSD bug from GCCE, and he confirmed this is a stopper bug causing lots
of open source projects (with WSD) unable to be ported to Symbian OS.

About "--shared option on S60 3rd SDK", I don't know if you are
referring this to NSPR for Symbian OS or other common S60 projects. I
had tried this option on my NSPR for Symbian, it works without the
arm-none-symbianelf-ld.exe crash. If you are using LD.exe from MS
Visual Studio, I'ms sorry that I didn't use this tool.

Best Regards
Harry

On Mon, May 12, 2008 at 9:58 AM, Makoto Kato <mako...@gmail.com> wrote:
> Hi, Harrl.
>
> I think that we should choose GCCE. Since RVCT is not free,
> contributors have to buy it. Using non-free compiler means that most
> developers don't provide patches since they cannot have no build
> environment.
>
> How about new version of
> http://www.codesourcery.com/gnu_toolchains/arm/releases.html?
>
> When I test using --shared option on S60 3rd SDK, it will crash in
> LD.EXE, so I cannot make *.dso files.
>
>
> -- Makoto

> > _______________________________________________
> > dev-platforms-mobile mailing list
> > dev-platfo...@lists.mozilla.org
> > https://lists.mozilla.org/listinfo/dev-platforms-mobile
> >
>
>
>
> --
> -- Makoto Kato / mako...@gmail.com / m_k...@ga2.so-net.ne.jp
>

0 new messages