Skip to content

Commit 78af551

Browse files
committed
build and install gcc 4.9.4 on rhel72
Builds and installs gcc 4.9 which isn't officially supported. The install could take up to 30 mins. Must use the following export PATH=/data/gcc-4.9/bin:$PATH export LDFLAGS="-Wl,-rpath,$(dirname $(/data/gcc-4.9/bin/gcc --print-file-name libgcc_s.so))"
1 parent dda9f88 commit 78af551

File tree

4 files changed

+202
-1
lines changed

4 files changed

+202
-1
lines changed

ansible/inventory.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ hosts:
124124
- linuxonecc:
125125
rhel72-s390x-1: {ip: 148.100.110.63}
126126
rhel72-s390x-2: {ip: 148.100.110.64}
127+
rhel72-s390x-3: {ip: 148.100.110.12, user: root}
127128

128129
- mininodes:
129130
ubuntu1604-arm64_odroid_c2-1: {ip: 70.167.220.147}

ansible/roles/gcc/tasks/main.yml

Lines changed: 199 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
---
2+
3+
#
4+
# installs gcc 4.9 @ /data/gcc-4.9
5+
#
6+
7+
- name: Clean path
8+
file:
9+
state: absent
10+
path: /data/tmp/
11+
tags: gcc49
12+
13+
- name: Create working directory
14+
file:
15+
path: /data/tmp
16+
state: directory
17+
mode: 0755
18+
tags: gcc49
19+
20+
- name: download gmp 6.1.0
21+
get_url:
22+
url: http://ftp.gnu.org/gnu/gmp/gmp-6.1.0.tar.xz
23+
dest: /data/tmp/
24+
tags: gcc49
25+
26+
- name: unarchive gmp 6.1.0
27+
unarchive:
28+
src: /data/tmp/gmp-6.1.0.tar.xz
29+
remote_src: yes
30+
dest: /data/tmp/
31+
tags: gcc49
32+
33+
- name: Create build directory
34+
file:
35+
path: /data/tmp/build
36+
state: directory
37+
mode: 0755
38+
tags: gcc49
39+
40+
- name: configure gmp 6.1.0
41+
shell: /data/tmp/gmp-6.1.0/configure --prefix=/data/gcc-4.9
42+
args:
43+
chdir: /data/tmp/build
44+
tags: gcc49
45+
46+
- name: build gmp 6.1.0
47+
shell: make -j{{ ansible_processor_cores }} install
48+
args:
49+
chdir: /data/tmp/build
50+
tags: gcc49
51+
52+
- name: Clean path
53+
file:
54+
state: absent
55+
path: /data/tmp/
56+
tags: gcc49
57+
58+
- name: Create working directory
59+
file:
60+
path: /data/tmp
61+
state: directory
62+
mode: 0755
63+
tags: gcc49
64+
65+
- name: download mprf 3.1.4
66+
get_url:
67+
url: http://ftp.gnu.org/gnu/mpfr/mpfr-3.1.4.tar.gz
68+
dest: /data/tmp/
69+
tags: gcc49
70+
71+
- name: unarchive mprf 3.1.4
72+
unarchive:
73+
src: /data/tmp/mpfr-3.1.4.tar.gz
74+
remote_src: yes
75+
dest: /data/tmp/
76+
tags: gcc49
77+
78+
- name: Create build directory
79+
file:
80+
path: /data/tmp/build
81+
state: directory
82+
mode: 0755
83+
tags: gcc49
84+
85+
- name: build mprf 3.1.4
86+
shell: /data/tmp/mpfr-3.1.4/configure --with-gmp=/data/gcc-4.9 --prefix=/data/gcc-4.9
87+
args:
88+
chdir: /data/tmp/build
89+
tags: gcc49
90+
91+
- name: build mprf 3.1.4
92+
shell: make -j{{ ansible_processor_cores }} install
93+
args:
94+
chdir: /data/tmp/build
95+
tags: gcc49
96+
97+
- name: Clean path
98+
file:
99+
state: absent
100+
path: /data/tmp/
101+
tags: gcc49
102+
103+
- name: Create working directory
104+
file:
105+
path: /data/tmp
106+
state: directory
107+
mode: 0755
108+
tags: gcc49
109+
110+
- name: download mpc 1.0.3
111+
get_url:
112+
url: http://ftp.gnu.org/gnu/mpc/mpc-1.0.3.tar.gz
113+
dest: /data/tmp/
114+
tags: gcc49
115+
116+
- name: unarchive mpc 1.0.3
117+
unarchive:
118+
src: /data/tmp/mpc-1.0.3.tar.gz
119+
remote_src: yes
120+
dest: /data/tmp/
121+
tags: gcc49
122+
123+
- name: Create build directory
124+
file:
125+
path: /data/tmp/build
126+
state: directory
127+
mode: 0755
128+
tags: gcc49
129+
130+
- name: configure mpc 1.0.3
131+
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
132+
args:
133+
chdir: /data/tmp/build
134+
tags: gcc49
135+
136+
- name: build mpc 1.0.3
137+
shell: make -j{{ ansible_processor_cores }} install
138+
args:
139+
chdir: /data/tmp/build
140+
tags: gcc49
141+
142+
- name: Clean path
143+
file:
144+
state: absent
145+
path: /data/tmp/
146+
tags: gcc49
147+
148+
- name: Create working directory
149+
file:
150+
path: /data/tmp
151+
state: directory
152+
mode: 0755
153+
tags: gcc49
154+
155+
- name: download gcc 4.9.4
156+
get_url:
157+
url: http://ftp.gnu.org/gnu/gcc/gcc-4.9.4/gcc-4.9.4.tar.gz
158+
dest: /data/tmp/
159+
tags: gcc49
160+
161+
- name: unarchive gcc 4.9.4
162+
unarchive:
163+
src: /data/tmp/gcc-4.9.4.tar.gz
164+
remote_src: yes
165+
dest: /data/tmp/
166+
tags: gcc49
167+
168+
- name: Create build directory
169+
file:
170+
path: /data/tmp/build
171+
state: directory
172+
mode: 0755
173+
tags: gcc49
174+
175+
- name: configure gcc4.9
176+
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 --disable-multilib
177+
args:
178+
chdir: /data/tmp/build
179+
tags: gcc49
180+
181+
- name: build gcc49
182+
shell: make -j{{ ansible_processor_cores }}
183+
async: 3600
184+
poll: 10
185+
args:
186+
chdir: /data/tmp/build
187+
tags: gcc49
188+
189+
- name: install gcc49
190+
shell: make install
191+
args:
192+
chdir: /data/tmp/build
193+
tags: gcc49
194+
195+
- name: Clean path
196+
file:
197+
state: absent
198+
path: /data/tmp/
199+
tags: gcc49

ansible/roles/jenkins-worker/meta/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66

77
dependencies:
88
- { 'role': 'java-base' }
9+
- { 'role': 'gcc', when: os in 'rhel72' }

ansible/roles/jenkins-worker/templates/systemd.service.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ StartLimitInterval=0
1515
WorkingDirectory=/home/{{ server_user }}
1616

1717
Environment="USER={{ server_user }}"
18-
Environment="JOBS={{ server_jobs | default(ansible_processor_vcpus) }}"
18+
Environment="JOBS={{ server_jobs | default(ansible_processor_vcpus|default("4")) }}"
1919
Environment="SHELL=/bin/bash"
2020
Environment="HOME=/home/{{ server_user }}"
2121
Environment="PATH=/usr/lib/ccache:/usr/lib64/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

0 commit comments

Comments
 (0)