Skip to content

Commit 9677b98

Browse files
committed
target: add linux-gcc10-glibc231
1 parent 53c6584 commit 9677b98

File tree

5 files changed

+68
-21
lines changed

5 files changed

+68
-21
lines changed

.github/workflows/mcpc.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@ name: mcpc
22
run-name: mcpc
33
on: [push]
44
jobs:
5+
x64-linux-gcc10-glibc231:
6+
if: contains(github.event.head_commit.message, 'NO_GH_CI') == false
7+
runs-on: ubuntu-24.04
8+
steps:
9+
- uses: actions/checkout@v4
10+
- run: ls -l .
11+
- run: sudo apt-get install -y buildah podman
12+
- run: buildah from --name wctn docker.io/library/debian:bullseye
13+
- run: buildah run wctn -- apt-get update
14+
- run: buildah run wctn -- apt-get install -y sudo bash gcc make
15+
- run: buildah copy wctn ../mcpc /mcpc
16+
- run: buildah run wctn -- bash -c "cd /mcpc && CC=gcc make tst"
17+
- run: buildah run wctn -- bash -c "cd /mcpc && CC=gcc make install"
18+
- run: buildah run wctn -- bash -c "ls -l /usr/local/lib"
519
x64-linux-gcc12-glibc236:
620
if: contains(github.event.head_commit.message, 'NO_GH_CI') == false
721
runs-on: ubuntu-24.04

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,19 +180,31 @@ Linux:
180180

181181
<col class="org-left" />
182182

183+
<col class="org-left" />
184+
183185
<col class="org-left" />
184186
</colgroup>
185187
<thead>
186188
<tr>
187189
<th scope="col" class="org-left">&#xa0;</th>
190+
<th scope="col" class="org-left">GLIBC 2.31</th>
188191
<th scope="col" class="org-left">GLIBC 2.36</th>
189192
<th scope="col" class="org-left">GLIBC 2.40</th>
190193
</tr>
191194
</thead>
192195

193196
<tbody>
197+
<tr>
198+
<td class="org-left">GCC 10</td>
199+
<td class="org-left">🔨✅ (Debian 11)</td>
200+
<td class="org-left">-</td>
201+
<td class="org-left">-</td>
202+
</tr>
203+
204+
194205
<tr>
195206
<td class="org-left">GCC 12</td>
207+
<td class="org-left">-</td>
196208
<td class="org-left">🔨✅ (Debian 12)</td>
197209
<td class="org-left">-</td>
198210
</tr>
@@ -202,12 +214,14 @@ Linux:
202214
<td class="org-left">GCC 13</td>
203215
<td class="org-left">-</td>
204216
<td class="org-left">-</td>
217+
<td class="org-left">-</td>
205218
</tr>
206219

207220

208221
<tr>
209222
<td class="org-left">GCC 14</td>
210223
<td class="org-left">-</td>
224+
<td class="org-left">-</td>
211225
<td class="org-left">✅✅ (Fedora 41)</td>
212226
</tr>
213227

@@ -216,26 +230,30 @@ Linux:
216230
<td class="org-left">Clang 14</td>
217231
<td class="org-left">-</td>
218232
<td class="org-left">-</td>
233+
<td class="org-left">-</td>
219234
</tr>
220235

221236

222237
<tr>
223238
<td class="org-left">Clang 16</td>
224239
<td class="org-left">-</td>
225240
<td class="org-left">-</td>
241+
<td class="org-left">-</td>
226242
</tr>
227243

228244

229245
<tr>
230246
<td class="org-left">Clang 18</td>
231247
<td class="org-left">-</td>
232248
<td class="org-left">-</td>
249+
<td class="org-left">-</td>
233250
</tr>
234251

235252

236253
<tr>
237254
<td class="org-left">Clang 19</td>
238255
<td class="org-left">-</td>
256+
<td class="org-left">-</td>
239257
<td class="org-left">✅✅ (Fedora 41)</td>
240258
</tr>
241259
</tbody>

README.org

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,16 @@ This approach certainly has some benefits and consequences:
8383

8484
Linux:
8585

86-
| | GLIBC 2.36 | GLIBC 2.40 |
87-
|----------+------------------+------------------|
88-
| GCC 12 | 🔨✅ (Debian 12) | - |
89-
| GCC 13 | - | - |
90-
| GCC 14 | - | ✅✅ (Fedora 41) |
91-
| Clang 14 | - | - |
92-
| Clang 16 | - | - |
93-
| Clang 18 | - | - |
94-
| Clang 19 | - | ✅✅ (Fedora 41) |
86+
| | GLIBC 2.31 | GLIBC 2.36 | GLIBC 2.40 |
87+
|----------+------------------+------------------+------------------|
88+
| GCC 10 | 🔨✅ (Debian 11) | - | - |
89+
| GCC 12 | - | 🔨✅ (Debian 12) | - |
90+
| GCC 13 | - | - | - |
91+
| GCC 14 | - | - | ✅✅ (Fedora 41) |
92+
| Clang 14 | - | - | - |
93+
| Clang 16 | - | - | - |
94+
| Clang 18 | - | - | - |
95+
| Clang 19 | - | - | ✅✅ (Fedora 41) |
9596

9697

9798
Windows:

mk/ccdefs-linux.mk

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ ifneq (,$(and $(isnot_done_ccdefs),$(is_linux)))
1515
is_gcc = xxx
1616
is_gcclike = xxx
1717
gcc_ver = $(shell $(CC) --version)
18+
is_gcc10 = $(findstring 10.,$(gcc_ver))
1819
is_gcc12 = $(findstring 12.,$(gcc_ver))
1920
is_gcc13 = $(findstring 13.,$(gcc_ver))
2021
is_gcc14 = $(findstring 14.,$(gcc_ver))
@@ -27,40 +28,50 @@ ifneq (,$(and $(isnot_done_ccdefs),$(is_linux)))
2728
endif
2829

2930
ldd_ver = $(shell ldd --version)
30-
is_glibc236 = $(and $(findstring GLIBC,$(ldd_ver)),$(findstring 2.36,$(ldd_ver)))
31-
is_gnu240 = $(and $(findstring GNU,$(ldd_ver)),$(findstring 2.40,$(ldd_ver)))
31+
is_glibc231 = $(and $(findstring Free Software Foundation,$(ldd_ver)),$(findstring 2.31,$(ldd_ver)))
32+
is_glibc236 = $(and $(findstring Free Software Foundation,$(ldd_ver)),$(findstring 2.36,$(ldd_ver)))
33+
is_glibc240 = $(and $(findstring Free Software Foundation,$(ldd_ver)),$(findstring 2.40,$(ldd_ver)))
3234
is_cygwin = $(and $(findstring cygwin,$(ldd_ver)))
3335

3436
ifeq (1,2)
37+
else ifneq (,$(and $(is_gcc10),$(is_glibc231)))
38+
# deb11
39+
CFLAGS += -std=c17
40+
CFLAGS += -DMCPC_C23PTCH_KW1
41+
CFLAGS += -DMCPC_C23PTCH_CKD1
42+
CFLAGS += -DMCPC_C23PTCH_UCHAR1
43+
CFLAGS += -DMCPC_C23GIVUP_FIXENUM
44+
is_manual_pthread = xxx
45+
isnot_done_ccdefs =
3546
else ifneq (,$(and $(is_gcc12),$(is_glibc236)))
3647
# deb12
3748
CFLAGS += -std=c17
3849
CFLAGS += -DMCPC_C23PTCH_KW1
3950
CFLAGS += -DMCPC_C23PTCH_CKD1
4051
CFLAGS += -DMCPC_C23PTCH_UCHAR1
4152
CFLAGS += -DMCPC_C23GIVUP_FIXENUM
42-
isnot_done_ccdefs =
53+
isnot_done_ccdefs =
4354
else ifneq (,$(and $(is_gcc14),$(is_cygwin)))
4455
# fc41
4556
CFLAGS += -std=c23
4657
CFLAGS += -DMCPC_C23PTCH_UCHAR1
47-
isnot_done_ccdefs =
58+
isnot_done_ccdefs =
4859
else ifneq (,$(and $(is_gcc14),$(is_mingw)))
4960
# fc41
5061
CFLAGS += -std=c233
51-
isnot_done_ccdefs =
52-
else ifneq (,$(and $(is_gcc14),$(is_gnu240)))
62+
isnot_done_ccdefs =
63+
else ifneq (,$(and $(is_gcc14),$(is_glibc240)))
5364
# fc41
5465
CFLAGS += -std=c23
55-
isnot_done_ccdefs =
56-
else ifneq (,$(and $(is_clang18),$(is_gnu240)))
66+
isnot_done_ccdefs =
67+
else ifneq (,$(and $(is_clang18),$(is_glibc240)))
5768
# fc41
5869
CFLAGS += -std=c23
59-
isnot_done_ccdefs =
60-
else ifneq (,$(and $(is_clang19),$(is_gnu240)))
70+
isnot_done_ccdefs =
71+
else ifneq (,$(and $(is_clang19),$(is_glibc240)))
6172
# fc41
6273
CFLAGS += -std=c23
63-
isnot_done_ccdefs =
74+
isnot_done_ccdefs =
6475
endif
6576

6677

tst/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ itst-svcalc_ldflags =
6464
ifneq (,$(is_unixar))
6565
itst-svcalc_ldflags += ../src/libmcpc.a
6666
endif
67+
ifneq (,$(is_manual_pthread))
68+
itst-svcalc_ldflags += -lpthread
69+
endif
6770
ifneq (,$(is_winlib))
6871
itst-svcalc_ldflags += ws2_32.lib
6972
itst-svcalc_ldflags += ..\src\mcpc.lib
@@ -77,7 +80,7 @@ itst-svcalc_COMP:
7780
$(if $(is_gcclike) , $(CC) $(CFLAGS) $(itst-svcalc_srcs) -c )
7881
$(if $(is_cllike) , $(CC) $(CFLAGS) $(itst-svcalc_srcs) /c )
7982
itst-svcalc_LINKE: itst-svcalc_COMP
80-
$(if $(is_gcclike) , $(CC) $(itst-svcalc_objs) $(LDFLAGS) $(itst-svcalc_ldflags) -o itst-svcalc.out )
83+
$(if $(is_gcclike) , $(CC) $(itst-svcalc_objs) $(LDFLAGS) $(itst-svcalc_ldflags) -o itst-svcalc.out )
8184
$(if $(is_cllike) , $(CC) $(itst-svcalc_objs) /link /out:itst-svcalc.exe $(LDFLAGS) $(itst-svcalc_ldflags))
8285
itst-svcalc_EXEC: itst-svcalc_LINKE
8386
@ echo>>$@.stdout.log; echo>>$@.stderr.log;

0 commit comments

Comments
 (0)