Use __freebsd_kprintf__ with GCC 12+ similar to clang.
This commit is contained in:
parent
e8261bba4e
commit
5115511ed4
@ -222,7 +222,8 @@ CWARNFLAGS+= -Wno-system-headers
|
|||||||
.endif # gcc
|
.endif # gcc
|
||||||
|
|
||||||
# How to handle FreeBSD custom printf format specifiers.
|
# How to handle FreeBSD custom printf format specifiers.
|
||||||
.if ${COMPILER_TYPE} == "clang"
|
.if ${COMPILER_TYPE} == "clang" || \
|
||||||
|
(${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 120100)
|
||||||
FORMAT_EXTENSIONS= -D__printf__=__freebsd_kprintf__
|
FORMAT_EXTENSIONS= -D__printf__=__freebsd_kprintf__
|
||||||
.else
|
.else
|
||||||
FORMAT_EXTENSIONS= -fformat-extensions
|
FORMAT_EXTENSIONS= -fformat-extensions
|
||||||
|
@ -91,7 +91,8 @@ CWARNFLAGS+= -Wno-format-zero-length
|
|||||||
# to be disabled. WARNING: format checking is disabled in this case.
|
# to be disabled. WARNING: format checking is disabled in this case.
|
||||||
.if ${MK_FORMAT_EXTENSIONS} == "no"
|
.if ${MK_FORMAT_EXTENSIONS} == "no"
|
||||||
FORMAT_EXTENSIONS= -Wno-format
|
FORMAT_EXTENSIONS= -Wno-format
|
||||||
.elif ${COMPILER_TYPE} == "clang"
|
.elif ${COMPILER_TYPE} == "clang" || \
|
||||||
|
(${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 120100)
|
||||||
FORMAT_EXTENSIONS= -D__printf__=__freebsd_kprintf__
|
FORMAT_EXTENSIONS= -D__printf__=__freebsd_kprintf__
|
||||||
.else
|
.else
|
||||||
FORMAT_EXTENSIONS= -fformat-extensions
|
FORMAT_EXTENSIONS= -fformat-extensions
|
||||||
|
Loading…
Reference in New Issue
Block a user