From 288a82df8b678a92b28e75815932cbfee02a7a20 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Tue, 5 Aug 2014 16:50:29 +0000 Subject: haiku patch diff --git a/configure.ac b/configure.ac index 1d06ca3..25ae69a 100644 --- a/configure.ac +++ b/configure.ac @@ -854,6 +854,7 @@ fi AC_SEARCH_LIBS(setsockopt, [socket], , [AC_SEARCH_LIBS(setsockopt, [socket], , , [-lnsl])]) AC_SEARCH_LIBS(setsockopt, [nsl]) +AC_SEARCH_LIBS(socket, [network]) ################################## #### Checks for header files. #### -- 2.48.1 From 809bab59453f74930e004c6d478990520c10c810 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Wed, 6 Aug 2014 22:08:04 +0000 Subject: gcc2 patch diff --git a/src/hwf-x86.c b/src/hwf-x86.c index bda14d9..6ea19ff 100644 --- a/src/hwf-x86.c +++ b/src/hwf-x86.c @@ -119,7 +119,7 @@ get_xgetbv(void) unsigned int t_eax, t_edx; asm volatile - ("xgetbv\n\t" + (".byte 0x0f, 0x01, 0xd0\n\t" : "=a" (t_eax), "=d" (t_edx) : "c" (0) ); -- 2.48.1 From 707eddf4f2f635a57b54e66302edbc6bf8ec5d4a Mon Sep 17 00:00:00 2001 From: fbrosson Date: Wed, 17 Jan 2018 22:03:45 +0000 Subject: Do not use __GNUC_PATCHLEVEL__ if it's not defined. diff --git a/src/gcrypt.h.in b/src/gcrypt.h.in index 9cad7a4..d9a8ba8 100644 --- a/src/gcrypt.h.in +++ b/src/gcrypt.h.in @@ -74,9 +74,14 @@ extern "C" { underscore they are subject to change without notice. */ #ifdef __GNUC__ +#ifdef __GNUC_PATCHLEVEL__ #define _GCRY_GCC_VERSION (__GNUC__ * 10000 \ + __GNUC_MINOR__ * 100 \ + __GNUC_PATCHLEVEL__) +#else +#define _GCRY_GCC_VERSION (__GNUC__ * 10000 \ + + __GNUC_MINOR__ * 100) +#endif #if _GCRY_GCC_VERSION >= 30100 #define _GCRY_GCC_ATTR_DEPRECATED __attribute__ ((__deprecated__)) -- 2.48.1 From bb8505c7e4fe33fe50ee1282e6f5138ee3ba87ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= Date: Tue, 6 May 2025 20:54:37 +0200 Subject: more gcc2 fixes diff --git a/cipher/asm-common-i386.h b/cipher/asm-common-i386.h index d746ebc..9d148f7 100644 --- a/cipher/asm-common-i386.h +++ b/cipher/asm-common-i386.h @@ -24,7 +24,7 @@ #include #ifdef HAVE_COMPATIBLE_GCC_I386_PLATFORM_AS -# define ELF(...) __VA_ARGS__ +# define ELF(args...) args #else # define ELF(...) /*_*/ #endif diff --git a/src/hwf-x86.c b/src/hwf-x86.c index 6ea19ff..a3d05f1 100644 --- a/src/hwf-x86.c +++ b/src/hwf-x86.c @@ -57,7 +57,11 @@ is_cpuid_available(void) /* Detect the CPUID feature by testing some undefined behaviour (16 vs 32 bit pushf/popf). */ asm volatile - ("pushf\n\t" /* Copy flags to EAX. */ + ( +#if defined(HAVE_GCC_ASM_CFI_DIRECTIVES) && __GNUC__ == 2 + ".cfi_startproc\n\t" +#endif + "pushf\n\t" /* Copy flags to EAX. */ CFI_PUSH4 "popl %%eax\n\t" CFI_POP4 @@ -79,6 +83,9 @@ is_cpuid_available(void) "jz .Lno_cpuid%=\n\t" /* Toggling did not work, thus no CPUID. */ "movl $1, %0\n" /* Worked. true -> HAS_CPUID. */ ".Lno_cpuid%=:\n\t" +#if defined(HAVE_GCC_ASM_CFI_DIRECTIVES) && __GNUC__ == 2 + ".cfi_endproc\n\t" +#endif : "+r" (has_cpuid) : : "%eax", "%ecx", "cc", "memory" -- 2.48.1