X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=automation%2Fansible%2Froles%2Fcross-compilers%2Ftasks%2Fsetup-Debian.yml;h=dfc2a719090108277dfa9e325dfb236ec68b83a8;hb=e261a28e1eb9e25a9dbac69d05cf622ce935bac4;hp=d08fe47d55c574e7ee3262e9f86f7632682ed52d;hpb=58e747d8a8e96e502e8cf86e31d888cafafebf16;p=lttng-ci.git diff --git a/automation/ansible/roles/cross-compilers/tasks/setup-Debian.yml b/automation/ansible/roles/cross-compilers/tasks/setup-Debian.yml index d08fe47..dfc2a71 100644 --- a/automation/ansible/roles/cross-compilers/tasks/setup-Debian.yml +++ b/automation/ansible/roles/cross-compilers/tasks/setup-Debian.yml @@ -2,5 +2,44 @@ - name: Update apt cache. apt: update_cache=yes cache_valid_time=86400 +- name: Add snapshot soures for gcc-11-powerpc/riscv64 + when: ansible_distribution == 'Debian' + block: + - ansible.builtin.copy: + dest: /etc/apt/preferences.d/snapshot.pref + content: "Package: *\nPin: origin \"snapshot.debian.org\"\nPin-Priority: 400\n" + - ansible.builtin.apt_repository: + repo: 'deb [check-valid-until=no] https://snapshot.debian.org/archive/debian/20230109T091852Z/ bookworm main' + - ansible.builtin.apt: + update_cache: true + - name: Ensure cross-compilers packages are installed. apt: "name={{ cross_compilers_packages }} state=present" + +- name: Install legacy cross compilers + when: ansible_distribution == 'Debian' and ansible_architecture == 'x86_64' + block: + # This step needs to happen after the cross compiler packages are installed + # so the libgcc cross libraries can be copied + - name: Copy gcc-cross libs + ansible.builtin.command: + argv: ['cp', '-r', "/usr/lib/gcc-cross/{{item}}/12/", "/usr/lib/gcc-cross/{{item}}/4.8.5"] + creates: "/usr/lib/gcc-cross/{{item}}/4.8.5" + with_items: + - aarch64-linux-gnu + - arm-linux-gnueabihf + - i686-linux-gnu + - powerpc64le-linux-gnu + - powerpc-linux-gnu + - riscv64-linux-gnu + - s390x-linux-gnu + - name: Download legacy compiler binaries + # These binaries built from files/Containerfile + ansible.builtin.get_url: + url: https://obj.internal.efficios.com/jenkins/gcc-4.8-x86_64-linux-gnu-cross.tgz + dest: /root/gcc-4.8-x86_64-linux-gnu-cross.tgz + register: cross_download + - name: Extract legacy compiler binaries + when: cross_download.changed + ansible.builtin.command: + argv: ['tar', '-C', '/', '-xzf', '/root/gcc-4.8-x86_64-linux-gnu-cross.tgz']