summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Hochstein <tom.hochstein@oss.nxp.com>2024-07-25 06:59:32 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-07-26 12:28:42 +0100
commitac09753064da6b96199af5d1feedd371b24f1a3a (patch)
treea32c75949dd968648ed2132278c8d66ceacb17d9
parentedc44fcf135d13e6c514c329ad4d0538ef8faf77 (diff)
downloadpoky-ac09753064da6b96199af5d1feedd371b24f1a3a.tar.gz
time64.inc: Simplify GLIBC_64BIT_TIME_FLAGS usage
The implementation uses the append operator to include GLIBC_64BIT_TIME_FLAGS in TARGET_CC_ARCH, but it places the space in the GLIBC_64BIT_TIME_FLAGS assignment in order to avoid a 'spurious space' when the value is empty. 68b50d3 time64: Remove leading whitespace from GLIBC_64BIT_TIME_FLAGS The problem with this is it requires anyone wishing to assign a value to GLIBC_64BIT_TIME_FLAGS to add the leading space, otherwise this is the error: cc1: error: '-Werror=format-security-D_TIME_BITS=64': no option '-Wformat-security-D_TIME_BITS=64' Add a new constant variable to capture the value needed for the 32-bit special case, including the space. (From OE-Core rev: e8177827f92e71c80c5b63453d8bbd1defbe1fbc) Signed-off-by: Tom Hochstein <tom.hochstein@oss.nxp.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/conf/distro/include/time64.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/conf/distro/include/time64.inc b/meta/conf/distro/include/time64.inc
index 510da11039..9d556bac16 100644
--- a/meta/conf/distro/include/time64.inc
+++ b/meta/conf/distro/include/time64.inc
@@ -8,10 +8,11 @@
8# 8#
9# Working to address those (before Y2038 rolls in) will be appreciated. 9# Working to address those (before Y2038 rolls in) will be appreciated.
10 10
11GLIBC_64BIT_TIME_FLAGS = " -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64" 11GLIBC_64BIT_TIME_FLAGS = "${GLIBC_64BIT_TIME_FLAGS_WHEN_NEEDED}"
12 12
13# Only needed for some 32-bit architectures, some relatively newer 13# Only needed for some 32-bit architectures, some relatively newer
14# architectures do not need it ( e.g. riscv32 ) 14# architectures do not need it ( e.g. riscv32 )
15GLIBC_64BIT_TIME_FLAGS_WHEN_NEEDED = " -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64"
15TARGET_CC_ARCH:append:arm = "${GLIBC_64BIT_TIME_FLAGS}" 16TARGET_CC_ARCH:append:arm = "${GLIBC_64BIT_TIME_FLAGS}"
16TARGET_CC_ARCH:append:armeb = "${GLIBC_64BIT_TIME_FLAGS}" 17TARGET_CC_ARCH:append:armeb = "${GLIBC_64BIT_TIME_FLAGS}"
17TARGET_CC_ARCH:append:mipsarcho32 = "${GLIBC_64BIT_TIME_FLAGS}" 18TARGET_CC_ARCH:append:mipsarcho32 = "${GLIBC_64BIT_TIME_FLAGS}"