'

Symbian toolchain on linux

Yes, first ever. And yes, fully native!

At first: the base

What's a toolchain without an actual compiler?

Yea, i tohught about that too! Sooo we need a compilers, and thankfully, there are GccE4Symbian project with modern GCC version.

Well, there's a fly in the ointment: we have only windows prebuilt :( Will this stop us from using this toolchain? Definetly not!

So we're left with one option: build it ourselves!

Well, building this wasnt such a pain in ass as i thought, but there's a couple of things y'all need to know:

  1. You need to uncomment theese lines in build-toolchain.sh:
source ./build-data/build-binutils.sh
# _____________

source ./build-data/build-gcc.sh
# ______________________

source ./build-data/build-gdb.sh
  1. Install binutils/gcc/gdb deps (obiviously)

Now we have base toolchain!

Next step: acquiring SDK!

And then, we need S60v3 SDK, but unlike proprietary windows toolchain, we need it only for sysroot. Shitty Nokia devs packed it with InstallShield, so we need to unpuck it with unshield.

Step 3: post-build utilities

Where the real pain in the ass begins:

  1. rcomp
  2. uidcrc
  3. makesis
  4. signsis
  5. elf2e32

Now, thats all we need to generate sis from our ELF file (which elf file???)

None of the epoc(32) compilers ever spit out an actual .exe... So we need to convert it to exe ourselves!

Thankfully i had full symbian sources to port theese tools from windows to linux. If you want to know which repo contains them:

  1. oss.FCL.sf.mw.appinstall for makesis and signsis
  2. oss.FCL.sftools.dev.build for rcomp, uidcrc and elf2e32

With some rewrite magic, ive ported all of theese to linux!

Last step! CMake toolchain file

I've managed to make it simple, like

cmake_minimum_required(VERSION 3.15)
project(ModernSymbianApp CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

add_executable(ModernSymbianApp main.cpp)

target_link_libraries(ModernSymbianApp PRIVATE ${SYMBIAN_STANDARD_LIBRARIES} ${SYMBIAN_UI_LIBRARIES})

symbian_add_resource(ModernSymbianApp ModernSymbianApp.rss)
symbian_add_resource(ModernSymbianApp ModernSymbianApp_reg.rss)
add_dependencies(ModernSymbianApp_ModernSymbianApp_reg_Res ModernSymbianApp_ModernSymbianApp_Res)

symbian_package_app(ModernSymbianApp
    UID1 0x1000007a
    UID2 0x100039CE
    UID3 0xE1000001
    PKG  app.pkg
    CERT cert.cer
    KEY  key.key
)

Yeah, not THAT simple, but whatever — it gets the whole Symbian pipeline done!

Maybe, ill upload toolchain somewhere someday, ill update this page with link then!


Built with weblogtool