From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Dec 25 13:10:00 2012 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CD2309DB for ; Tue, 25 Dec 2012 13:10:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id A0CF38FC13 for ; Tue, 25 Dec 2012 13:10:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id qBPDA0qb083834 for ; Tue, 25 Dec 2012 13:10:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id qBPDA0XM083833; Tue, 25 Dec 2012 13:10:00 GMT (envelope-from gnats) Resent-Date: Tue, 25 Dec 2012 13:10:00 GMT Resent-Message-Id: <201212251310.qBPDA0XM083833@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Fabian Keil Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A93E783D for ; Tue, 25 Dec 2012 13:02:01 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 8FCFE8FC12 for ; Tue, 25 Dec 2012 13:02:01 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.5/8.14.5) with ESMTP id qBPD21qG056277 for ; Tue, 25 Dec 2012 13:02:01 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id qBPD21S3056276; Tue, 25 Dec 2012 13:02:01 GMT (envelope-from nobody) Message-Id: <201212251302.qBPD21S3056276@red.freebsd.org> Date: Tue, 25 Dec 2012 13:02:01 GMT From: Fabian Keil To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/174702: [PATCH] devel/libowfat fails to build with clang on CURRENT X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Dec 2012 13:10:00 -0000 >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@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 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: