ansible: Install gcc-11 and gcc-12 cross compilers on Debian
authorKienan Stewart <kstewart@efficios.com>
Tue, 15 Aug 2023 18:47:10 +0000 (14:47 -0400)
committerKienan Stewart <kstewart@efficios.com>
Tue, 15 Aug 2023 20:26:46 +0000 (16:26 -0400)
The default packages, eg. gcc-riscv64-linux-gnu, only installed the
most recent vers (eg. 12 on Bookworm).

Change-Id: I632ff54f7eceeb6e373e2026fb2fb828c2953d6d

automation/ansible/roles/cross-compilers/tasks/setup-Debian.yml
automation/ansible/roles/cross-compilers/vars/Debian.yml

index d08fe47d55c574e7ee3262e9f86f7632682ed52d..c6c613d529b8541fe0ee54914344e9de538996e0 100644 (file)
@@ -2,5 +2,16 @@
 - 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"
index df8257aefca2f9d76787ae8781e0a69307760996..a4bca80b4e941db8cde1673fd7997e9b24b01673 100644 (file)
@@ -7,3 +7,19 @@ cross_compilers_packages:
   - gcc-powerpc-linux-gnu
   - gcc-riscv64-linux-gnu
   - gcc-s390x-linux-gnu
+  - gcc-12-aarch64-linux-gnu
+  - gcc-12-arm-linux-gnueabihf
+  - gcc-12-i686-linux-gnu
+  - gcc-12-powerpc64le-linux-gnu
+  - gcc-12-powerpc-linux-gnu
+  - gcc-12-riscv64-linux-gnu
+  - gcc-12-s390x-linux-gnu
+  - gcc-11-aarch64-linux-gnu
+  - gcc-11-arm-linux-gnueabihf
+  - gcc-11-i686-linux-gnu
+  - gcc-11-powerpc64le-linux-gnu
+  - gcc-11-s390x-linux-gnu
+  # Not in Debian bookworm, but in testing/unstable, so they will
+  # be fetched from a snapshot source instead
+  - gcc-11-powerpc-linux-gnu
+  - gcc-11-riscv64-linux-gnu
This page took 0.023847 seconds and 4 git commands to generate.