[svn] gcry - r1415 - in trunk: . cipher
svn author wk
cvs at cvs.gnupg.org
Thu Dec 10 18:27:55 CET 2009
Author: wk
Date: 2009-12-10 18:27:55 +0100 (Thu, 10 Dec 2009)
New Revision: 1415
Modified:
trunk/ChangeLog
trunk/README
trunk/cipher/ChangeLog
trunk/cipher/Makefile.am
trunk/configure.ac
Log:
Add option --disable-O-flag-munging.
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-12-10 16:51:25 UTC (rev 1414)
+++ trunk/ChangeLog 2009-12-10 17:27:55 UTC (rev 1415)
@@ -1,3 +1,7 @@
+2009-12-10 Werner Koch <wk at g10code.com>
+
+ * configure.ac: Add option --disable-O-flag-munging.
+
2009-12-08 Marcus Brinkmann <marcus at g10code.de>
Update to libtool 2.2.6a.
Modified: trunk/cipher/ChangeLog
===================================================================
--- trunk/cipher/ChangeLog 2009-12-10 16:51:25 UTC (rev 1414)
+++ trunk/cipher/ChangeLog 2009-12-10 17:27:55 UTC (rev 1415)
@@ -1,5 +1,8 @@
2009-12-10 Werner Koch <wk at g10code.com>
+ * Makefile.am (o_flag_munging): New.
+ (tiger.o, tiger.lo): Use it.
+
* cipher.c (do_ctr_encrypt): Add arg OUTBUFLEN. Check for
suitable value. Add check for valid inputlen. Wipe temporary
memory.
Modified: trunk/README
===================================================================
--- trunk/README 2009-12-10 16:51:25 UTC (rev 1414)
+++ trunk/README 2009-12-10 17:27:55 UTC (rev 1415)
@@ -170,7 +170,19 @@
available. Try this if you get problems with
assembler code.
+ --disable-O-flag-munging
+ Some code is too complex for some compilers while
+ in higher optimization modes, thus the compiler
+ invocation is modified to use a lower
+ optimization level. Usually this works very well
+ but on some platforms these rules break the
+ invocation. This option may be used to disable
+ the feature under the assumption that either good
+ CFLAGS are given or the compiler can grok the code.
+
+
+
Build Problems
--------------
Modified: trunk/cipher/Makefile.am
===================================================================
--- trunk/cipher/Makefile.am 2009-12-10 16:51:25 UTC (rev 1414)
+++ trunk/cipher/Makefile.am 2009-12-10 17:27:55 UTC (rev 1415)
@@ -67,10 +67,16 @@
rfc2268.c \
camellia.c camellia.h camellia-glue.c
+if ENABLE_O_FLAG_MUNGING
+o_flag_munging = sed -e 's/-O[2-9s]*/-O1/g'
+else
+o_flag_munging = cat
+endif
+
# We need to lower the optimization for this module.
tiger.o: $(srcdir)/tiger.c
- `echo $(COMPILE) -c $(srcdir)/tiger.c | sed -e 's/-O[2-9s]*/-O1/g' `
+ `echo $(COMPILE) -c $(srcdir)/tiger.c | $(o_flag_munging) `
tiger.lo: $(srcdir)/tiger.c
- `echo $(LTCOMPILE) -c $(srcdir)/tiger.c | sed -e 's/-O[2-9s]*/-O1/g' `
+ `echo $(LTCOMPILE) -c $(srcdir)/tiger.c | $(o_flag_munging) `
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2009-12-10 16:51:25 UTC (rev 1414)
+++ trunk/configure.ac 2009-12-10 17:27:55 UTC (rev 1415)
@@ -477,8 +477,18 @@
[Enable support for the PadLock engine.])
fi
+# Implementation of the --disable-O-flag-munging switch.
+AC_MSG_CHECKING([whether a -O flag munging is requested])
+AC_ARG_ENABLE([O-flag-munging],
+ AC_HELP_STRING([--disable-O-flag-munging],
+ [Disable modification of the cc -O flag]),
+ [enable_o_flag_munging=$enableval],
+ [enable_o_flag_munging=yes])
+AC_MSG_RESULT($enable_o_flag_munging)
+AM_CONDITIONAL(ENABLE_O_FLAG_MUNGING, test "$enable_o_flag_munging" = "yes")
+
AC_DEFINE_UNQUOTED(PRINTABLE_OS_NAME, "$PRINTABLE_OS_NAME",
[A human readable text with the name of the OS])
@@ -506,6 +516,7 @@
AC_DEFINE_UNQUOTED(NAME_OF_DEV_URANDOM, "$NAME_OF_DEV_URANDOM",
[defined to the name of the weaker random device])
+
###############################
#### Checks for libraries. ####
###############################
More information about the Gnupg-commits
mailing list