summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2015-01-28 15:13:50 +0100
committerWerner Koch <wk@gnupg.org>2015-01-28 15:13:50 +0100
commit2564d204e408b296425ac0660c6bdc6270575fb6 (patch)
treea16db14f21ea4b533ef44484c11b5d38fa35b75a
parentceaa97f0d849c07f3a15b642fc3a2b0a477b4a47 (diff)
downloadlibgcrypt-2564d204e408b296425ac0660c6bdc6270575fb6.tar.gz
Fix building of GOST s-boxes when cross-compiling.
* cipher/Makefile.am (gost-s-box): USe CC_FOR_BUILD. (noinst_PROGRAMS): Remove. (EXTRA_DIST): New. (CLEANFILES): New. Signed-off-by: Werner Koch <wk@gnupg.org>
-rw-r--r--cipher/Makefile.am11
1 files changed, 8 insertions, 3 deletions
diff --git a/cipher/Makefile.am b/cipher/Makefile.am
index 4a9c86d8..33a68ffb 100644
--- a/cipher/Makefile.am
+++ b/cipher/Makefile.am
@@ -26,8 +26,10 @@ AM_CFLAGS = $(GPG_ERROR_CFLAGS)
AM_CCASFLAGS = $(NOEXECSTACK_FLAGS)
-DISTCLEANFILES = gost-sb.h
+EXTRA_DIST = gost-s-box.c
+CLEANFILES = gost-s-box
+DISTCLEANFILES = gost-sb.h
noinst_LTLIBRARIES = libcipher.la
@@ -96,10 +98,13 @@ rfc2268.c \
camellia.c camellia.h camellia-glue.c camellia-aesni-avx-amd64.S \
camellia-aesni-avx2-amd64.S camellia-arm.S
-noinst_PROGRAMS = gost-s-box
gost28147.lo: gost-sb.h
gost-sb.h: gost-s-box
- $(builddir)/gost-s-box $@
+ ./gost-s-box $@
+
+gost-s-box: gost-s-box.c
+ $(CC_FOR_BUILD) -o $@ $(srcdir)/gost-s-box.c
+
if ENABLE_O_FLAG_MUNGING
o_flag_munging = sed -e 's/-O\([2-9s][2-9s]*\)/-O1/' -e 's/-Ofast/-O1/g'