From: Nikos Mavrogiannopoulos Date: Sun, 25 Sep 2011 16:17:30 +0000 (+0200) Subject: Better usage of X86 conditionals to simplify and avoid an undefined warning in x86-32. X-Git-Tag: gnutls_3_0_4~67 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a006a1f4b2f5d3d2efb951b72752a1ebb7e0af62;p=thirdparty%2Fgnutls.git Better usage of X86 conditionals to simplify and avoid an undefined warning in x86-32. --- diff --git a/configure.ac b/configure.ac index e5797f588f..b3b6fb36d1 100644 --- a/configure.ac +++ b/configure.ac @@ -96,6 +96,7 @@ fi AM_CONDITIONAL(ASM_X86_64, test x"$hw_accel" = x"x86-64") AM_CONDITIONAL(ASM_X86_32, test x"$hw_accel" = x"x86") +AM_CONDITIONAL(ASM_X86, test x"$hw_accel" = x"x86" -o x"$hw_accel" = x"x86-64") AM_CONDITIONAL(HAVE_GCC_GNU89_INLINE_OPTION, test "$gnu89_inline" = "yes"]) AM_CONDITIONAL(HAVE_GCC, test "$GCC" = "yes") diff --git a/lib/accelerated/Makefile.am b/lib/accelerated/Makefile.am index e9426d0be6..440a73bd7b 100644 --- a/lib/accelerated/Makefile.am +++ b/lib/accelerated/Makefile.am @@ -32,18 +32,12 @@ endif noinst_LTLIBRARIES = libaccelerated.la -EXTRA_DIST = x86.h accelerated.h cryptodev.h +EXTRA_DIST = accelerated.h cryptodev.h libaccelerated_la_SOURCES = accelerated.c cryptodev.c libaccelerated_la_LIBADD = -if ASM_X86_64 +if ASM_X86 SUBDIRS += intel -AM_CFLAGS += -DASM_X86_64 -libaccelerated_la_LIBADD += intel/libintel.la -endif - -if ASM_X86_32 -SUBDIRS += intel -AM_CFLAGS += -DASM_X86_32 +AM_CFLAGS += -DASM_X86 libaccelerated_la_LIBADD += intel/libintel.la endif diff --git a/lib/accelerated/accelerated.c b/lib/accelerated/accelerated.c index 8a89e3dc96..50f48c9ab9 100644 --- a/lib/accelerated/accelerated.c +++ b/lib/accelerated/accelerated.c @@ -23,7 +23,7 @@ #include #if defined(ASM_X86_32) || defined(ASM_X86_64) # include -# include +# include #endif void _gnutls_register_accel_crypto(void) diff --git a/lib/accelerated/intel/Makefile.am b/lib/accelerated/intel/Makefile.am index 0882929c9a..cbb00e95c8 100644 --- a/lib/accelerated/intel/Makefile.am +++ b/lib/accelerated/intel/Makefile.am @@ -34,12 +34,13 @@ EXTRA_DIST = README license.txt noinst_LTLIBRARIES = libintel.la -libintel_la_SOURCES = aes-x86.c aes-padlock.c aes-gcm-padlock.c aes-padlock.h aes-x86.h +libintel_la_SOURCES = aes-x86.c aes-padlock.c aes-gcm-padlock.c aes-padlock.h aes-x86.h x86.h if ASM_X86_64 AM_CPPFLAGS += -DASM_X86_64 libintel_la_SOURCES += asm/appro-aes-x86-64.s asm/appro-aes-gcm-x86-64.s aes-gcm-x86.c asm/padlock-x86-64.s asm/cpuid-x86-64.s else +AM_CPPFLAGS += -DASM_X86_32 libintel_la_SOURCES += asm/appro-aes-x86.s asm/padlock-x86.s asm/cpuid-x86.s endif diff --git a/lib/accelerated/x86.h b/lib/accelerated/intel/x86.h similarity index 100% rename from lib/accelerated/x86.h rename to lib/accelerated/intel/x86.h