|
| 1 | +--- |
| 2 | + |
| 3 | +# |
| 4 | +# installs gcc 4.9 @ /data/gcc-4.9 on rhel7.x |
| 5 | +# |
| 6 | + |
| 7 | +- stat: path=/data/gcc-4.9/bin/gcc-4.9 |
| 8 | + register: build_gcc_49 |
| 9 | + tags: gcc49 |
| 10 | + |
| 11 | +- name: Clean path |
| 12 | + file: |
| 13 | + state: absent |
| 14 | + path: /data/tmp/ |
| 15 | + when: build_gcc_49.stat.exists == False |
| 16 | + tags: gcc49 |
| 17 | + |
| 18 | +- name: Create working directory |
| 19 | + file: |
| 20 | + path: /data/tmp |
| 21 | + state: directory |
| 22 | + mode: 0755 |
| 23 | + when: build_gcc_49.stat.exists == False |
| 24 | + tags: gcc49 |
| 25 | + |
| 26 | +- name: download gmp 6.1.0 |
| 27 | + get_url: |
| 28 | + url: http://ftp.gnu.org/gnu/gmp/gmp-6.1.0.tar.xz |
| 29 | + dest: /data/tmp/ |
| 30 | + when: build_gcc_49.stat.exists == False |
| 31 | + tags: gcc49 |
| 32 | + |
| 33 | +- name: unarchive gmp 6.1.0 |
| 34 | + unarchive: |
| 35 | + src: /data/tmp/gmp-6.1.0.tar.xz |
| 36 | + remote_src: yes |
| 37 | + dest: /data/tmp/ |
| 38 | + when: build_gcc_49.stat.exists == False |
| 39 | + tags: gcc49 |
| 40 | + |
| 41 | +- name: Create build directory |
| 42 | + file: |
| 43 | + path: /data/tmp/build |
| 44 | + state: directory |
| 45 | + mode: 0755 |
| 46 | + when: build_gcc_49.stat.exists == False |
| 47 | + tags: gcc49 |
| 48 | + |
| 49 | +- name: configure gmp 6.1.0 |
| 50 | + shell: /data/tmp/gmp-6.1.0/configure --prefix=/data/gcc-4.9 |
| 51 | + args: |
| 52 | + chdir: /data/tmp/build |
| 53 | + when: build_gcc_49.stat.exists == False |
| 54 | + tags: gcc49 |
| 55 | + |
| 56 | +- name: build gmp 6.1.0 |
| 57 | + shell: make -j{{ ansible_processor_cores }} install |
| 58 | + args: |
| 59 | + chdir: /data/tmp/build |
| 60 | + when: build_gcc_49.stat.exists == False |
| 61 | + tags: gcc49 |
| 62 | + |
| 63 | +- name: Clean path |
| 64 | + file: |
| 65 | + state: absent |
| 66 | + path: /data/tmp/ |
| 67 | + when: build_gcc_49.stat.exists == False |
| 68 | + tags: gcc49 |
| 69 | + |
| 70 | +- name: Create working directory |
| 71 | + file: |
| 72 | + path: /data/tmp |
| 73 | + state: directory |
| 74 | + mode: 0755 |
| 75 | + when: build_gcc_49.stat.exists == False |
| 76 | + tags: gcc49 |
| 77 | + |
| 78 | +- name: download mprf 3.1.4 |
| 79 | + get_url: |
| 80 | + url: http://ftp.gnu.org/gnu/mpfr/mpfr-3.1.4.tar.gz |
| 81 | + dest: /data/tmp/ |
| 82 | + when: build_gcc_49.stat.exists == False |
| 83 | + tags: gcc49 |
| 84 | + |
| 85 | +- name: unarchive mprf 3.1.4 |
| 86 | + unarchive: |
| 87 | + src: /data/tmp/mpfr-3.1.4.tar.gz |
| 88 | + remote_src: yes |
| 89 | + dest: /data/tmp/ |
| 90 | + when: build_gcc_49.stat.exists == False |
| 91 | + tags: gcc49 |
| 92 | + |
| 93 | +- name: Create build directory |
| 94 | + file: |
| 95 | + path: /data/tmp/build |
| 96 | + state: directory |
| 97 | + mode: 0755 |
| 98 | + when: build_gcc_49.stat.exists == False |
| 99 | + tags: gcc49 |
| 100 | + |
| 101 | +- name: build mprf 3.1.4 |
| 102 | + shell: /data/tmp/mpfr-3.1.4/configure --with-gmp=/data/gcc-4.9 --prefix=/data/gcc-4.9 |
| 103 | + args: |
| 104 | + chdir: /data/tmp/build |
| 105 | + when: build_gcc_49.stat.exists == False |
| 106 | + tags: gcc49 |
| 107 | + |
| 108 | +- name: build mprf 3.1.4 |
| 109 | + shell: make -j{{ ansible_processor_cores }} install |
| 110 | + args: |
| 111 | + chdir: /data/tmp/build |
| 112 | + when: build_gcc_49.stat.exists == False |
| 113 | + tags: gcc49 |
| 114 | + |
| 115 | +- name: Clean path |
| 116 | + file: |
| 117 | + state: absent |
| 118 | + path: /data/tmp/ |
| 119 | + when: build_gcc_49.stat.exists == False |
| 120 | + tags: gcc49 |
| 121 | + |
| 122 | +- name: Create working directory |
| 123 | + file: |
| 124 | + path: /data/tmp |
| 125 | + state: directory |
| 126 | + mode: 0755 |
| 127 | + when: build_gcc_49.stat.exists == False |
| 128 | + tags: gcc49 |
| 129 | + |
| 130 | +- name: download mpc 1.0.3 |
| 131 | + get_url: |
| 132 | + url: http://ftp.gnu.org/gnu/mpc/mpc-1.0.3.tar.gz |
| 133 | + dest: /data/tmp/ |
| 134 | + when: build_gcc_49.stat.exists == False |
| 135 | + tags: gcc49 |
| 136 | + |
| 137 | +- name: unarchive mpc 1.0.3 |
| 138 | + unarchive: |
| 139 | + src: /data/tmp/mpc-1.0.3.tar.gz |
| 140 | + remote_src: yes |
| 141 | + dest: /data/tmp/ |
| 142 | + when: build_gcc_49.stat.exists == False |
| 143 | + tags: gcc49 |
| 144 | + |
| 145 | +- name: Create build directory |
| 146 | + file: |
| 147 | + path: /data/tmp/build |
| 148 | + state: directory |
| 149 | + mode: 0755 |
| 150 | + when: build_gcc_49.stat.exists == False |
| 151 | + tags: gcc49 |
| 152 | + |
| 153 | +- name: configure mpc 1.0.3 |
| 154 | + shell: /data/tmp/mpc-1.0.3/configure --with-mpfr=/data/gcc-4.9 --with-gmp=/data/gcc-4.9 --prefix=/data/gcc-4.9 |
| 155 | + args: |
| 156 | + chdir: /data/tmp/build |
| 157 | + when: build_gcc_49.stat.exists == False |
| 158 | + tags: gcc49 |
| 159 | + |
| 160 | +- name: build mpc 1.0.3 |
| 161 | + shell: make -j{{ ansible_processor_cores }} install |
| 162 | + args: |
| 163 | + chdir: /data/tmp/build |
| 164 | + when: build_gcc_49.stat.exists == False |
| 165 | + tags: gcc49 |
| 166 | + |
| 167 | +- name: Clean path |
| 168 | + file: |
| 169 | + state: absent |
| 170 | + path: /data/tmp/ |
| 171 | + when: build_gcc_49.stat.exists == False |
| 172 | + tags: gcc49 |
| 173 | + |
| 174 | +- name: Create working directory |
| 175 | + file: |
| 176 | + path: /data/tmp |
| 177 | + state: directory |
| 178 | + mode: 0755 |
| 179 | + when: build_gcc_49.stat.exists == False |
| 180 | + tags: gcc49 |
| 181 | + |
| 182 | +- name: download binutils 2.28.1 |
| 183 | + get_url: |
| 184 | + url: https://ftp.gnu.org/gnu/binutils/binutils-2.28.1.tar.gz |
| 185 | + dest: /data/tmp/ |
| 186 | + when: build_gcc_49.stat.exists == False |
| 187 | + tags: gcc49 |
| 188 | + |
| 189 | +- name: unarchive binutils 2.28.1 |
| 190 | + unarchive: |
| 191 | + src: /data/tmp/binutils-2.28.1.tar.gz |
| 192 | + remote_src: yes |
| 193 | + dest: /data/tmp/ |
| 194 | + when: build_gcc_49.stat.exists == False |
| 195 | + tags: gcc49 |
| 196 | + |
| 197 | +- name: Create build directory |
| 198 | + file: |
| 199 | + path: /data/tmp/build |
| 200 | + state: directory |
| 201 | + mode: 0755 |
| 202 | + when: build_gcc_49.stat.exists == False |
| 203 | + tags: gcc49 |
| 204 | + |
| 205 | +- name: configure binutils 2.28.1 |
| 206 | + shell: /data/tmp/binutils-2.28.1/configure --with-mpfr=/data/gcc-4.9 --with-gmp=/data/gcc-4.9 --prefix=/data/gcc-4.9 |
| 207 | + args: |
| 208 | + chdir: /data/tmp/build |
| 209 | + when: build_gcc_49.stat.exists == False |
| 210 | + tags: gcc49 |
| 211 | + |
| 212 | +- name: build binutils 2.28.1 |
| 213 | + shell: make -j{{ ansible_processor_cores }} |
| 214 | + args: |
| 215 | + chdir: /data/tmp/build |
| 216 | + when: build_gcc_49.stat.exists == False |
| 217 | + tags: gcc49 |
| 218 | + |
| 219 | +- name: install binutils 2.28.1 |
| 220 | + shell: make install |
| 221 | + args: |
| 222 | + chdir: /data/tmp/build |
| 223 | + when: build_gcc_49.stat.exists == False |
| 224 | + tags: gcc49 |
| 225 | + |
| 226 | +- name: Clean path |
| 227 | + file: |
| 228 | + state: absent |
| 229 | + path: /data/tmp/ |
| 230 | + when: build_gcc_49.stat.exists == False |
| 231 | + tags: gcc49 |
| 232 | + |
| 233 | +- name: Create working directory |
| 234 | + file: |
| 235 | + path: /data/tmp |
| 236 | + state: directory |
| 237 | + mode: 0755 |
| 238 | + when: build_gcc_49.stat.exists == False |
| 239 | + tags: gcc49 |
| 240 | + |
| 241 | +- name: download gcc 4.9.4 |
| 242 | + get_url: |
| 243 | + url: http://ftp.gnu.org/gnu/gcc/gcc-4.9.4/gcc-4.9.4.tar.gz |
| 244 | + dest: /data/tmp/ |
| 245 | + when: build_gcc_49.stat.exists == False |
| 246 | + tags: gcc49 |
| 247 | + |
| 248 | +- name: unarchive gcc 4.9.4 |
| 249 | + unarchive: |
| 250 | + src: /data/tmp/gcc-4.9.4.tar.gz |
| 251 | + remote_src: yes |
| 252 | + dest: /data/tmp/ |
| 253 | + when: build_gcc_49.stat.exists == False |
| 254 | + tags: gcc49 |
| 255 | + |
| 256 | +- name: Create build directory |
| 257 | + file: |
| 258 | + path: /data/tmp/build |
| 259 | + state: directory |
| 260 | + mode: 0755 |
| 261 | + when: build_gcc_49.stat.exists == False |
| 262 | + tags: gcc49 |
| 263 | + |
| 264 | +- name: configure gcc4.9 |
| 265 | + shell: /data/tmp/gcc-4.9.4/configure --with-mpfr=/data/gcc-4.9 --with-gmp=/data/gcc-4.9 --prefix=/data/gcc-4.9 --program-suffix=-4.9 --disable-multilib |
| 266 | + args: |
| 267 | + chdir: /data/tmp/build |
| 268 | + when: build_gcc_49.stat.exists == False |
| 269 | + tags: gcc49 |
| 270 | + |
| 271 | +- name: build gcc49 |
| 272 | + shell: make -j{{ ansible_processor_cores }} |
| 273 | + async: 3600 |
| 274 | + poll: 10 |
| 275 | + args: |
| 276 | + chdir: /data/tmp/build |
| 277 | + when: build_gcc_49.stat.exists == False |
| 278 | + tags: gcc49 |
| 279 | + |
| 280 | +- name: install gcc49 |
| 281 | + shell: make install |
| 282 | + args: |
| 283 | + chdir: /data/tmp/build |
| 284 | + when: build_gcc_49.stat.exists == False |
| 285 | + tags: gcc49 |
| 286 | + |
| 287 | +- name: Clean path |
| 288 | + file: |
| 289 | + state: absent |
| 290 | + path: /data/tmp/ |
| 291 | + when: build_gcc_49.stat.exists == False |
| 292 | + tags: gcc49 |
0 commit comments