From c488ab61af811fa1a26b961db593af6463ad316f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 9 Dec 2020 14:59:39 +0100 Subject: [PATCH] Use %set_build_flags and standard $CC variables Make the build process a bit more idiomatic. --- ksh.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ksh.spec b/ksh.spec index 88eb59f..e2805b7 100644 --- a/ksh.spec +++ b/ksh.spec @@ -250,16 +250,16 @@ sed -i '/-c sh\/main.c/s|${mam_cc_FLAGS} |${mam_cc_FLAGS} ${CCFLAGS} |p' src/cmd sed -i 1i"#define register" src/lib/libast/include/ast.h %build +%set_build_flags XTRAFLAGS="" for f in -Wno-unknown-pragmas -Wno-missing-braces -Wno-unused-result -Wno-return-type -Wno-int-to-pointer-cast -Wno-parentheses -Wno-unused -Wno-unused-but-set-variable -Wno-cpp -P do - gcc $f -E - /dev/null 2>&1 && XTRAFLAGS="$XTRAFLAGS $f" + $CC $f -E - /dev/null 2>&1 && XTRAFLAGS="$XTRAFLAGS $f" done ./bin/package ./bin/package make mamake ||: ./bin/package make mamake ||: export CCFLAGS="$RPM_OPT_FLAGS $RPM_LD_FLAGS -fno-strict-aliasing $XTRAFLAGS" -export CC=gcc ./bin/package make -S #cp lib/package/LICENSES/epl LICENSE