Skip to content

Commit 93d5d76

Browse files
zaguracpackham
authored andcommitted
Use -std=c17 for companion libs, which won't build with C23 standard, default for gcc15
Signed-off-by: Michał Zagórski <zagura6+github@gmail.com>
1 parent a2ef080 commit 93d5d76

File tree

4 files changed

+14
-0
lines changed

4 files changed

+14
-0
lines changed

config/comp_libs/gmp.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
11
# GMP options
2+
config GMP_EXTRA_CFLAGS
3+
string "extra target CFLAGS"
4+
default "-std=gnu17" if GCC_15_or_later
5+
help
6+
Extra target CFLAGS to use when building.

config/comp_libs/ncurses.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,8 @@ config NCURSES_TARGET_FALLBACKS
5555
List of terminal descriptions that will be compiled into the curses
5656
library for the target.
5757

58+
config NCURSES_EXTRA_CFLAGS
59+
string "extra target CFLAGS"
60+
default "-std=gnu17" if GCC_15_or_later
61+
help
62+
Extra target CFLAGS fto use when building.

scripts/build/companion_libs/100-gmp.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ do_gmp_backend() {
122122
extra_config+=("--with-pic")
123123
fi
124124

125+
cflags+=" ${CT_GMP_EXTRA_CFLAGS}"
126+
125127
# GMP's configure script doesn't respect the host parameter
126128
# when not cross-compiling, ie when build == host so set
127129
# CC_FOR_BUILD and CPP_FOR_BUILD.

scripts/build/companion_libs/220-ncurses.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ do_ncurses_backend() {
152152
ncurses_opts+=("--with-shared")
153153
fi
154154

155+
cflags+=" ${CT_NCURSES_EXTRA_CFLAGS}"
156+
155157
CT_DoLog EXTRA "Configuring ncurses"
156158
CT_DoExecLog CFG \
157159
CFLAGS="${cflags}" \

0 commit comments

Comments
 (0)