Presentation is loading. Please wait.

Presentation is loading. Please wait.

Golang bootstraping Living on the tip Jakub Čajka Presented by

Similar presentations


Presentation on theme: "Golang bootstraping Living on the tip Jakub Čajka Presented by"— Presentation transcript:

1 Golang bootstraping Living on the tip Jakub Čajka Presented by
Software Engineer Red Hat Inc. Slides are under CC-BY-SA

2 Today's Topics Introduction Architectures supported by Golang
Golang bootstrap Short Break Let's bootstrap :)

3 Jakub Čajka Golang maitainer in RHEL co-maintainer in Fedora

4 Red Hat Inc. and Golang

5 Golang at Red Hat

6 Golang in RHEL Available from RHEL - optional channel only on RHEL-7
Not supported But still receives critical security bug fixes

7 Architectures supported by Golang

8 X86_64 and (i)386 Most common architecture these days
X86_64(amd64) is now using new SSA compiler Linux, Darwin, Win, Plan9, *BSD* You know where to get the HW and for how much ;) Supported by Fedora

9 Arm Getting more common AArch64(arm64) armv6 and newer(arm)
Lots of different boards and servers(AArch64), price starting in tenths of dollars for boards going to thousands for servers Pine64, RaspPis, BananaPis, Odroids,... APM servers, AMD Seattle,... Supported by Fedora

10 Arm Image

11 PowerPC Ppc64, ppc64le (big and little endian)
No external linker and cgo for big endian Power6 and up(Power7+ and up with go1.7) Cheapest used power Macs(hundreds of $$) New servers/WS several thousands of dollars Talos board cheapest ppc64(le) board/WS Tyans, IBMs,… Supported by Fedora

12 PowerPC Image:

13 MIPS Several ABI, endianness, bit combinations
Improved support with go1.7 Switches,… and two dev boards from Imagination tech Ci 20, Ci 40 Not yet an official architecture supported by Fedora mtoman(from Imagination) is working on Fedora port

14 MIPS Image

15 S390X Big “old” IBM mainframe
Added in go1.7(to be relased this summer) Hundreds thousands dollars, few full racks of space I plan bootstrap in F25 release cycle

16 S390X Imagehttps://en.wikipedia.org/wiki/IBM_zEnterprise_System#/media/File:System_z_Frames.JPG By Agiorgio under CC BY-SA 4.0

17 Sparc 32 and 64 bit Not sure about status of the port
Not a part of Fedora

18 Gcc-go Gcc frontend Should work on most architectures as gcc, with some limitations(go stdlib,...) GCC-4 go1.3 GCC-5 go1.4 GCC-6 go1.6

19 Golang bootstrap

20 Why? Test your project with upcoming changes/features or use them right away Help upstream to catch bugs early Better bug reports, help upstream with bug triage Hack on golang :)

21 Build GOOS and GOARCH needs to be set 2 Stages
Build small bootstrap compiler By already built compiler present on system pointed by GOROOT_BOOTSTRAP, might be cross-compiled “bootstrap toolset” Build full compiler using the bootstrap compiler

22 PowerPC VMs Thanks to OpenPower Hub in Brno
Run by FIT VUT, IBM and Red Hat Inc. You can read more about compute resources for your opensource/academic projects at rhlab.rhcloud.com/powerlinux-openpower- development-hosting/

23 Details P8 little endian KVM VMs 2VCPU 2GBRAM ~20GBDISK
Public key to In ~1week will be deleted

24 Break

25 Bootstrap!!!

26 Setup Go compiler on your system (go1.4+) Where? go env
Check out the go source code Git clone Github is just a mirror :)

27 Lets build the tip cd src
GOOS=linux GOARCH=amd64 GOROOT_BOOTSTRAP=”...” ./all.bash To use as a system compiler add the go bin on your path and make sure that GOROOT is set properly(optional)

28 Cross-build cd src GOOS=linux GOARCH=ppc64le GOROOT_BOOTSTRAP=”...” ./bootstrap.bash Now we have tar with bootstrap compiler Put it on the target system

29 Bootstrap the trarget tar -xf go-*-bootstrap.tbz
git clone cd src GOOS=linux GOARCH=ppc64le GOROOT_BOOTSTRAP=”path to untared folder”./all.bash Put the resulting binary on the PATH

30 Questions? jcajka@fedoraproject.org Contact:
Slides are under CC-BY-SA


Download ppt "Golang bootstraping Living on the tip Jakub Čajka Presented by"

Similar presentations


Ads by Google