Date: Mon, 1 Jun 2009 12:16:18 +0400 From: Eygene Ryabinkin <rea-fbsd@codelabs.ru> To: Doug Barton <dougb@FreeBSD.org> Cc: ia64@freebsd.org, FreeBSD Tinderbox <tinderbox@freebsd.org>, current@freebsd.org Subject: Re: [head tinderbox] failure on ia64/ia64 Message-ID: <gOVq8M8vb7iy5IfrH3ERMpB2m2Y@aAvl70UcjNQBOOyiGNKFwlNO6Qw> In-Reply-To: <4A2360BC.8040109@FreeBSD.org> References: <20090601042258.909C77302F@freebsd-current.sentex.ca> <4A2360BC.8040109@FreeBSD.org>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
Doug, good day.
Sun, May 31, 2009 at 10:01:48PM -0700, Doug Barton wrote:
> FYI, I'm aware of this issue and I've filed a bug report with the ISC
> folks. If anyone has a bright idea on how to fix it I'm all ears, but
> I tried everything I can think of already and no luck so far.
Seems like GCC likes to see __attribute__ stuff only for function
prototypes, not for declarations. The attached patch seems to fix
the stuff, but I have no ia64 system to test on. Quick test with
'make ISC_ATOMIC_ARCH=ia64' eliminates errors.
This is very weird (judging by the GCC's manual) since the simplest C
program,
-----
int main(void)
{
return 0;
}
void foo(void) __attribute__ ((unused))
{
return;
}
-----
but ICC 10.x produces the same error and happily chewes __attribute__
on the function prototype. Anyway, I see no warnings even without
'((unused)) attribute with -Wall, so '__attribute__ ((unused))' looks
like no-op nowadays.
--
Eygene
_ ___ _.--. #
\`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard
/ ' ` , __.--' # to read the on-line manual
)/' _/ \ `-_, / # while single-stepping the kernel.
`-'" `"\_ ,_.-;_.-\_ ', fsc/as #
_.-'_./ {_.' ; / # -- FreeBSD Developers handbook
{_.-``-' {_/ #
[-- Attachment #2 --]
--- contrib/bind9/lib/isc/ia64/include/isc/atomic.h.orig 2009-06-01 11:47:44.000000000 +0400
+++ contrib/bind9/lib/isc/ia64/include/isc/atomic.h 2009-06-01 12:01:19.000000000 +0400
@@ -30,11 +30,13 @@
* Open issue: can 'fetchadd' make the code faster for some particular values
* (e.g., 1 and -1)?
*/
-static inline isc_int32_t
-isc_atomic_xadd(isc_int32_t *p, isc_int32_t val)
#ifdef __GNUC__
-__attribute__ ((unused))
+static inline isc_int32_t
+isc_atomic_xadd(isc_int32_t *p, isc_int32_t val) __attribute__ ((unused));
#endif
+
+static inline isc_int32_t
+isc_atomic_xadd(isc_int32_t *p, isc_int32_t val)
{
isc_int32_t prev, swapped;
@@ -56,11 +58,13 @@
/*
* This routine atomically stores the value 'val' in 'p'.
*/
-static inline void
-isc_atomic_store(isc_int32_t *p, isc_int32_t val)
#ifdef __GNUC__
-__attribute__ ((unused))
+static inline void
+isc_atomic_store(isc_int32_t *p, isc_int32_t val) __attribute__ ((unused));
#endif
+
+static inline void
+isc_atomic_store(isc_int32_t *p, isc_int32_t val)
{
__asm__ volatile(
"st4.rel %0=%1"
@@ -75,11 +79,14 @@
* original value is equal to 'cmpval'. The original value is returned in any
* case.
*/
+#ifdef __GNUC__
static inline isc_int32_t
isc_atomic_cmpxchg(isc_int32_t *p, isc_int32_t cmpval, isc_int32_t val)
-#ifdef __GNUC__
-__attribute__ ((unused))
+__attribute__ ((unused));
#endif
+
+static inline isc_int32_t
+isc_atomic_cmpxchg(isc_int32_t *p, isc_int32_t cmpval, isc_int32_t val)
{
isc_int32_t ret;
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?gOVq8M8vb7iy5IfrH3ERMpB2m2Y>
