Commit | Line | Data |
---|---|---|
601db8ee MJ |
1 | --- |
2 | - name: Update apt cache. | |
3 | apt: update_cache=yes cache_valid_time=86400 | |
4 | ||
a862e336 KS |
5 | - name: Add snapshot soures for gcc-11-powerpc/riscv64 |
6 | when: ansible_distribution == 'Debian' | |
7 | block: | |
8 | - ansible.builtin.copy: | |
9 | dest: /etc/apt/preferences.d/snapshot.pref | |
10 | content: "Package: *\nPin: origin \"snapshot.debian.org\"\nPin-Priority: 400\n" | |
11 | - ansible.builtin.apt_repository: | |
12 | repo: 'deb [check-valid-until=no] https://snapshot.debian.org/archive/debian/20230109T091852Z/ bookworm main' | |
13 | - ansible.builtin.apt: | |
14 | update_cache: true | |
15 | ||
0eb6d73e | 16 | - name: Ensure cross-compilers packages are installed. |
58e747d8 | 17 | apt: "name={{ cross_compilers_packages }} state=present" |
e261a28e KS |
18 | |
19 | - name: Install legacy cross compilers | |
20 | when: ansible_distribution == 'Debian' and ansible_architecture == 'x86_64' | |
21 | block: | |
22 | # This step needs to happen after the cross compiler packages are installed | |
23 | # so the libgcc cross libraries can be copied | |
24 | - name: Copy gcc-cross libs | |
25 | ansible.builtin.command: | |
26 | argv: ['cp', '-r', "/usr/lib/gcc-cross/{{item}}/12/", "/usr/lib/gcc-cross/{{item}}/4.8.5"] | |
27 | creates: "/usr/lib/gcc-cross/{{item}}/4.8.5" | |
28 | with_items: | |
29 | - aarch64-linux-gnu | |
30 | - arm-linux-gnueabihf | |
31 | - i686-linux-gnu | |
32 | - powerpc64le-linux-gnu | |
33 | - powerpc-linux-gnu | |
34 | - riscv64-linux-gnu | |
35 | - s390x-linux-gnu | |
36 | - name: Download legacy compiler binaries | |
37 | # These binaries built from files/Containerfile | |
38 | ansible.builtin.get_url: | |
39 | url: https://obj.internal.efficios.com/jenkins/gcc-4.8-x86_64-linux-gnu-cross.tgz | |
40 | dest: /root/gcc-4.8-x86_64-linux-gnu-cross.tgz | |
41 | register: cross_download | |
42 | - name: Extract legacy compiler binaries | |
43 | when: cross_download.changed | |
44 | ansible.builtin.command: | |
45 | argv: ['tar', '-C', '/', '-xzf', '/root/gcc-4.8-x86_64-linux-gnu-cross.tgz'] |