commit:     ed304a65535ad43887d576622c79421905dfafb3
Author:     Z. Liu <zhixu.liu <AT> gmail <DOT> com>
AuthorDate: Thu Jun  5 14:25:47 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Sep 15 19:59:52 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed304a65

app-benchmarks/iozone: append CPPFLAGS to CFLAGS

In non-parallel builds, make executes rules in the order they are defined in
the makefile; In parallel builds, if no explicit rule is defined for a target,
make uses the default implicit rule instead.

Both CFLAGS & CPPFLAGS will be used in default ".c.o" rule. The makefile of
iozone doesn't use CPPFLAGS anywhere. So append all necessary flags to CFLAGS
is a quick solution to handle both parallel and non-parallel build.

For x86 platforms, "-D_FILE_OFFSET_BITS=64" is required. Without it, off_t
defaults to 32-bit, causing build failures with errors like "conflicting
types for 'pwrite64'".

Closes: https://bugs.gentoo.org/947708
Signed-off-by: Z. Liu <zhixu.liu <AT> gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/42469
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-benchmarks/iozone/iozone-3.506-r1.ebuild | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/app-benchmarks/iozone/iozone-3.506-r1.ebuild 
b/app-benchmarks/iozone/iozone-3.506-r1.ebuild
index 37ec2df60b92..45cdd7f50e6d 100644
--- a/app-benchmarks/iozone/iozone-3.506-r1.ebuild
+++ b/app-benchmarks/iozone/iozone-3.506-r1.ebuild
@@ -51,9 +51,16 @@ src_configure() {
 
        append-cflags -std=gnu17
 
-       # Otherwise it uses K&R function declaration where ints are sometimes 
omited
+       # iozone's Makefile lacks some explicit rules, causing the implicit 
.c.o rule
+       # (which uses both CPPFLAGS and CFLAGS) to be used during parallel 
builds. Since
+       # CPPFLAGS is not explicitly used anywhere in the makefile, we append 
the LFS flags
+       # to CFLAGS as a workaround.
+       append-cflags ${CPPFLAGS} # bug #947708
+
+       # Otherwise it uses K&R function declaration where ints are sometimes 
omited, for
+       # the same reason above, append it to CFLAGS.
        # https://bugs.gentoo.org/894334
-       append-cppflags -DHAVE_ANSIC_C
+       append-cflags -DHAVE_ANSIC_C
 }
 
 src_compile() {

Reply via email to