@@ -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
0 commit comments