ports/174702: [PATCH] devel/libowfat fails to build with clang on CURRENT
Fabian Keil
fk at fabiankeil.de
Tue Dec 25 13:10:00 UTC 2012
>Number: 174702
>Category: ports
>Synopsis: [PATCH] devel/libowfat fails to build with clang on CURRENT
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Dec 25 13:10:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Fabian Keil
>Release: HEAD
>Organization:
>Environment:
FreeBSD r500.local 10.0-CURRENT FreeBSD 10.0-CURRENT #534 r+98dff01: Mon Dec 24 14:50:32 CET 2012 fk at r500.local:/usr/obj/usr/src/sys/ZOEY amd64
>Description:
The attached patch lets devel/libowfat build with clang on CURRENT.
Without the patch the build fails with:
In file included from t.c:27:
./CAS.h:56:3: error: void function 'atomic_add' should not return a value [-Wreturn-type]
return __sync_add_and_fetch(x,val);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
The patch has been sent to the upstream as well.
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
>From e162571d6c654644c18c41406f578de0fe601edd Mon Sep 17 00:00:00 2001
From: Fabian Keil <fk at fabiankeil.de>
Date: Tue, 25 Dec 2012 13:22:57 +0100
Subject: [PATCH] Fix compilation on FreeBSD 10.0-CURRENT with clang as cc
Previously it failed with:
In file included from t.c:27:
./CAS.h:56:3: error: void function 'atomic_add' should not return a value [-Wreturn-type]
return __sync_add_and_fetch(x,val);
---
devel/libowfat/files/patch-CAS.h | 11 +++++++++++
1 file changed, 11 insertions(+)
create mode 100644 devel/libowfat/files/patch-CAS.h
diff --git a/devel/libowfat/files/patch-CAS.h b/devel/libowfat/files/patch-CAS.h
new file mode 100644
index 0000000..75e76c4
--- /dev/null
+++ b/devel/libowfat/files/patch-CAS.h
@@ -0,0 +1,11 @@
+--- CAS.h
++++ CAS.h
+@@ -53,7 +53,7 @@ static inline size_t atomic_add_return(size_t* x,size_t val) {
+ /* *x += val; */
+ static inline void atomic_add(size_t* x,size_t val) {
+ #ifdef USE_BUILTINS
+- return __sync_add_and_fetch(x,val);
++ __sync_add_and_fetch(x,val);
+ #elif defined(__i386__)
+ asm volatile ("lock; addl %1, %0" : "+m" (*x) : "ir" (val) );
+ #elif defined(__x86_64__)
--
1.8.0.2
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list