[PATCH] Simplify flag munging for rndjent.c

Harmen Stoppels harmen at stoppels.ch
Wed Feb 5 09:52:02 CET 2025


* random/Makefile.am (o_flag_munging): append -O0

Replace `echo ... | sed` idiom with simply appending -O0. This overrides
previous optimization flags. Hopefully that ends the series of patches
to these lines.

---
 random/Makefile.am | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/random/Makefile.am b/random/Makefile.am
index 41041e8a..b6487192 100644
--- a/random/Makefile.am
+++ b/random/Makefile.am
@@ -55,9 +55,9 @@ jitterentropy-base.c jitterentropy.h jitterentropy-base-user.h
 
 # The rndjent module needs to be compiled without optimization.  */
 if ENABLE_O_FLAG_MUNGING
-o_flag_munging = sed -e 's/[[:blank:]]-O\([1-9sgz][1-9sgz]*\)/ -O0 /g' -e 's/[[:blank:]]-Ofast/ -O0 /g'
+o_flag_munging = -O0
 else
-o_flag_munging = cat
+o_flag_munging =
 endif
 
 rndjent.o: $(srcdir)/rndjent.c jitterentropy-base-user.h \
@@ -67,7 +67,7 @@ rndjent.o: $(srcdir)/rndjent.c jitterentropy-base-user.h \
            $(srcdir)/jitterentropy-sha3.c $(srcdir)/jitterentropy-sha3.h \
            $(srcdir)/jitterentropy-timer.c $(srcdir)/jitterentropy-timer.h \
            $(srcdir)/jitterentropy-base.c $(srcdir)/jitterentropy.h
-	`echo $(COMPILE) -c $(srcdir)/rndjent.c | $(o_flag_munging) `
+	$(COMPILE) $(o_flag_munging) -c $(srcdir)/rndjent.c
 
 rndjent.lo: $(srcdir)/rndjent.c jitterentropy-base-user.h \
            $(srcdir)/jitterentropy-gcd.c $(srcdir)/jitterentropy-gcd.h \
@@ -76,4 +76,4 @@ rndjent.lo: $(srcdir)/rndjent.c jitterentropy-base-user.h \
            $(srcdir)/jitterentropy-sha3.c $(srcdir)/jitterentropy-sha3.h \
            $(srcdir)/jitterentropy-timer.c $(srcdir)/jitterentropy-timer.h \
             $(srcdir)/jitterentropy-base.c $(srcdir)/jitterentropy.h
-	`echo $(LTCOMPILE) -c $(srcdir)/rndjent.c | $(o_flag_munging) `
+	$(LTCOMPILE) $(o_flag_munging) -c $(srcdir)/rndjent.c
-- 
2.43.0



More information about the Gcrypt-devel mailing list