ansible: Deploy legacy cross compilers on Debian nodes
[lttng-ci.git] / automation / ansible / roles / cross-compilers / tasks / setup-Debian.yml
index c6c613d529b8541fe0ee54914344e9de538996e0..dfc2a719090108277dfa9e325dfb236ec68b83a8 100644 (file)
 
 - 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']
This page took 0.024297 seconds and 4 git commands to generate.