Improve detection of __sync_add_and_fetch, avoid compiler optimization.

Fixes PR 46779.
This commit is contained in:
obache 2012-08-07 13:54:21 +00:00
parent b5c0c0a785
commit 7cb824b26f
2 changed files with 17 additions and 5 deletions

View file

@ -1,9 +1,9 @@
$NetBSD: distinfo,v 1.34 2012/02/27 12:39:11 asau Exp $
$NetBSD: distinfo,v 1.35 2012/08/07 13:54:21 obache Exp $
SHA1 (heimdal-1.5.2.tar.gz) = dd0920a181d18236432e4b3e5eab6e468cda4b89
RMD160 (heimdal-1.5.2.tar.gz) = 1ab2f835309a916dfbba667d3d0d38a57c312fde
Size (heimdal-1.5.2.tar.gz) = 6798615 bytes
SHA1 (patch-ad) = 37c2a7cdc4dba695a84057b40aae3c5a971cb546
SHA1 (patch-ad) = 8f30b685cbfe37bf202f6cc501fc336a36b60c00
SHA1 (patch-al) = 022d5f3723bd1db7fe5e92eea5d0106851a5d424
SHA1 (patch-kdc_version-script.map) = 42b0417a16b19a680f30ae34cfffd082f609d4a6
SHA1 (patch-lib_hcrypto_libtommath_tommath.h) = 60f223bb23145854f2a144da9e0a9484728b618a

View file

@ -1,8 +1,11 @@
$NetBSD: patch-ad,v 1.10 2011/07/08 09:49:22 adam Exp $
$NetBSD: patch-ad,v 1.11 2012/08/07 13:54:22 obache Exp $
--- configure.orig 2010-09-13 07:24:11.000000000 +0000
* Not using lib${ABI} in pkgsrc.
* improve detection of __sync_add_and_fetch, avoid compiler optimization.
--- configure.orig 2012-01-11 13:04:10.000000000 +0000
+++ configure
@@ -11779,7 +11779,11 @@ fi #if test -n "$GCC"; then
@@ -12702,7 +12702,11 @@ fi #if test -n "$GCC"; then
esac
CC="$CC $abi"
@ -15,3 +18,12 @@ $NetBSD: patch-ad,v 1.10 2011/07/08 09:49:22 adam Exp $
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__" >&5
@@ -26547,7 +26551,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_
int
main ()
{
-unsigned int foo; __sync_add_and_fetch(&foo, 1);
+unsigned int foo, bar; bar = __sync_add_and_fetch(&foo, 1);
;
return 0;
}