Page 1 of 1

[Info] Hawk (J) and Jazz (K) compilation

Posted: Sun Sep 04, 2016 5:22 pm
by zoelechat
Samsung have released source code for J/K compiler on http://opensource.samsung.com/ as gcc.tar.bz2 package. Here are instructions on how to build it on x86/x86_64:
[Build server info]

Code: Select all

:~/OpenSource/toolchain/arm-mips-src-20150728/scripts/tools-install$ uname -a 
Linux VDBS1383 3.13.0-34-generic #60-Ubuntu SMP Wed Aug 13 15:45:27 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux 
:~/OpenSource/toolchain/arm-mips-src-20150728/scripts/tools-install$ 

[Build instruction of gcc_HawkMP J series]

Code: Select all

- Building gcc & toolchain: 

* Source code name : gcc.tar.bz2 
* Unpack the gcc tarball and cd into it. 
* Run "cd arm-mips-src-20150728/scripts". 
* Run "./mktools.sh -c toolchain.cfg/arm-v7a15a7-v6.config -s ../sources/".
However if you want to built it on different platform compilation might fail. I tried to compile it on arm and had to change few things. In file mktools.sh change:

Code: Select all

    *)
        ABI="32"
to

Code: Select all

    *)
        ABI="standard"
and:

Code: Select all

    GMP_CFLAGS="-g -O2 -mfpu=neon "
    GMP_CPPFLAGS="-fexceptions"
    GMP_CXXFLAGS="-g -O2 -mfpu=neon "
to

Code: Select all

    GMP_CFLAGS="-g -O2 "
    GMP_CPPFLAGS="-fexceptions"
    GMP_CXXFLAGS="-g -O2"
I also had to change config itself. I simply commented (with #) these two lines:

Code: Select all

GCC_SPECS='%{funwind-tables|fno-unwind-tables|mabi=*|ffreestanding|nostdlib:;:-funwind-tables} %{!Werror=unused-local-typedefs:%{!Wno-error=unused-local-typedefs:-Wno-error=unused-local-typedefs}} %{fuse-linker-plugin|fno-use-linker-plugin|flto|flto=*:;:-fno-use-linker-plugin}'
GCC_FINAL_SPECS=$GCC_SPECS
so it's changed to this:

Code: Select all

#GCC_SPECS='%{funwind-tables|fno-unwind-tables|mabi=*|ffreestanding|nostdlib:;:-funwind-tables} %{!Werror=unused-local-typedefs:%{!Wno-error=unused-local-typedefs:-Wno-error=unused-local-typedefs}} %{fuse-linker-plugin|fno-use-linker-plugin|flto|flto=*:;:-fno-use-linker-plugin}'
#GCC_FINAL_SPECS=$GCC_SPECS
After that compiler compiled :)

Re: [Info] Hawk (J) and Jazz (K) compilation

Posted: Sun Sep 04, 2016 5:40 pm
by juusso
Would be good to share already compiled toolchain here: http://download.samygo.tv/Toolchains/

Re: [Info] Hawk (J) and Jazz (K) compilation

Posted: Sun Sep 04, 2016 5:48 pm
by zoelechat
Actually accurate toolchain depends on TV codename and .cfg used. Otherwise there's a ready armv7l-tizen one into (provided on Samsung Opensource) 15_DTV_HawkM.zip/tzdemuxerservice.tar.gz. It's ok for most purposes but not kernel for example.
I can share relevant Jazz.M (K>=7000) compiled-by-myself for x86 one though :)

edit: done (is ok for J/M/Q too)