From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Dec 19 09:00: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 C446DAF3 for ; Wed, 19 Dec 2012 09:00: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 975408FC16 for ; Wed, 19 Dec 2012 09:00: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 qBJ900ps077328 for ; Wed, 19 Dec 2012 09:00:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id qBJ9002Y077327; Wed, 19 Dec 2012 09:00:00 GMT (envelope-from gnats) Resent-Date: Wed, 19 Dec 2012 09:00:00 GMT Resent-Message-Id: <201212190900.qBJ9002Y077327@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, Luca Pizzamiglio Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F257D926 for ; Wed, 19 Dec 2012 08:55:31 +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 D85DB8FC0C for ; Wed, 19 Dec 2012 08:55:31 +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 qBJ8tV2P059850 for ; Wed, 19 Dec 2012 08:55:31 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id qBJ8tVui059849; Wed, 19 Dec 2012 08:55:31 GMT (envelope-from nobody) Message-Id: <201212190855.qBJ8tVui059849@red.freebsd.org> Date: Wed, 19 Dec 2012 08:55:31 GMT From: Luca Pizzamiglio To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/174568: [MAINTAINER] Improve build with clang 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: Wed, 19 Dec 2012 09:00:00 -0000 >Number: 174568 >Category: ports >Synopsis: [MAINTAINER] Improve build with clang >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Wed Dec 19 09:00:00 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Luca Pizzamiglio >Release: 8-STABLE >Organization: >Environment: reeBSD pizzamig.xxx 8.3-STABLE FreeBSD 8.3-STABLE #9: Thu Aug 23 16:22:24 CEST 2012 root@pizzamig.xxx:/usr/obj/usr/src/sys/PIZZAMIG i386 >Description: This update improve the clang support, resolving warnings (considered error with -Werror) directly in the source code. Now, clang detection is not needed anymore >How-To-Repeat: >Fix: Patch attached with submission follows: diff -Nru devel/gdb.orig/files/fbsd-threads.c devel/gdb/files/fbsd-threads.c --- devel/gdb.orig/files/fbsd-threads.c 2012-11-17 06:55:44.000000000 +0100 +++ devel/gdb/files/fbsd-threads.c 2012-12-18 18:09:14.000000000 +0100 @@ -1,4 +1,4 @@ -/* $FreeBSD: ports/devel/gdb/files/fbsd-threads.c,v 1.8 2012/11/17 05:55:44 svnexp Exp $ */ +/* $FreeBSD$ */ /* FreeBSD libthread_db assisted debugging support. Copyright 1999, 2000, 2001 Free Software Foundation, Inc. diff -Nru devel/gdb.orig/files/patch-bfd-coffcode.h devel/gdb/files/patch-bfd-coffcode.h --- devel/gdb.orig/files/patch-bfd-coffcode.h 1970-01-01 01:00:00.000000000 +0100 +++ devel/gdb/files/patch-bfd-coffcode.h 2012-12-18 18:09:13.000000000 +0100 @@ -0,0 +1,11 @@ +--- bfd/coffcode.h.orig 2012-12-18 14:22:56.000000000 +0100 ++++ bfd/coffcode.h 2012-12-18 14:23:11.000000000 +0100 +@@ -3442,7 +3442,7 @@ + incremented in coff_set_section_contents. This is right for + SVR3.2. */ + if (strcmp (current->name, _LIB) == 0) +- bfd_set_section_vma (abfd, current, 0); ++ (void)bfd_set_section_vma (abfd, current, 0); + #endif + + #ifdef ALIGN_SECTIONS_IN_FILE diff -Nru devel/gdb.orig/files/patch-bfd-configure devel/gdb/files/patch-bfd-configure --- devel/gdb.orig/files/patch-bfd-configure 2012-01-27 10:38:15.000000000 +0100 +++ devel/gdb/files/patch-bfd-configure 1970-01-01 01:00:00.000000000 +0100 @@ -1,17 +0,0 @@ ---- bfd/configure.orig 2011-03-28 13:18:25.000000000 +0200 -+++ bfd/configure 2012-01-12 16:58:05.000000000 +0100 -@@ -12177,7 +12177,13 @@ - - # Enable -Werror by default when using gcc - if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then -- ERROR_ON_WARNING=yes -+ if test "${CC}" = clang ; then -+ echo "clang compiler - disabling -Werror" -+ ERROR_ON_WARNING=no -+ else -+ echo "gcc compiler - enabling -Werror" -+ ERROR_ON_WARNING=yes -+ fi - fi - - NO_WERROR= diff -Nru devel/gdb.orig/files/patch-bfd-opncls.c devel/gdb/files/patch-bfd-opncls.c --- devel/gdb.orig/files/patch-bfd-opncls.c 1970-01-01 01:00:00.000000000 +0100 +++ devel/gdb/files/patch-bfd-opncls.c 2012-12-18 18:09:13.000000000 +0100 @@ -0,0 +1,11 @@ +--- bfd/opncls.c.orig 2012-12-18 14:18:47.000000000 +0100 ++++ bfd/opncls.c 2012-12-18 14:19:18.000000000 +0100 +@@ -254,7 +254,7 @@ + then it may have been opened with special flags that make it + unsafe to close and reopen the file. */ + if (fd == -1) +- bfd_set_cacheable (nbfd, TRUE); ++ (void)bfd_set_cacheable (nbfd, TRUE); + + return nbfd; + } diff -Nru devel/gdb.orig/files/patch-bfd-peicode.h devel/gdb/files/patch-bfd-peicode.h --- devel/gdb.orig/files/patch-bfd-peicode.h 1970-01-01 01:00:00.000000000 +0100 +++ devel/gdb/files/patch-bfd-peicode.h 2012-12-18 18:09:13.000000000 +0100 @@ -0,0 +1,11 @@ +--- bfd/peicode.h.orig 2012-12-18 14:22:02.000000000 +0100 ++++ bfd/peicode.h 2012-12-18 14:22:21.000000000 +0100 +@@ -602,7 +602,7 @@ + + bfd_set_section_flags (vars->abfd, sec, flags | extra_flags); + +- bfd_set_section_alignment (vars->abfd, sec, 2); ++ (void)bfd_set_section_alignment (vars->abfd, sec, 2); + + /* Check that we will not run out of space. */ + BFD_ASSERT (vars->data + size < vars->bim->buffer + vars->bim->size); diff -Nru devel/gdb.orig/files/patch-opcodes-configure devel/gdb/files/patch-opcodes-configure --- devel/gdb.orig/files/patch-opcodes-configure 2012-05-01 17:53:46.000000000 +0200 +++ devel/gdb/files/patch-opcodes-configure 1970-01-01 01:00:00.000000000 +0100 @@ -1,17 +0,0 @@ ---- opcodes/configure.orig 2012-04-27 10:20:25.000000000 +0200 -+++ opcodes/configure 2012-04-27 10:24:01.000000000 +0200 -@@ -11525,7 +11525,13 @@ - - # Enable -Werror by default when using gcc - if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then -- ERROR_ON_WARNING=yes -+ if test "${CC}" = clang ; then -+ echo "clang compiler - disabling -Werror" -+ ERROR_ON_WARNING=no -+ else -+ echo "gcc compiler - enabling -Werror" -+ ERROR_ON_WARNING=yes -+ fi - fi - - NO_WERROR= diff -Nru devel/gdb.orig/files/patch-opcodes-i386-dis.c devel/gdb/files/patch-opcodes-i386-dis.c --- devel/gdb.orig/files/patch-opcodes-i386-dis.c 1970-01-01 01:00:00.000000000 +0100 +++ devel/gdb/files/patch-opcodes-i386-dis.c 2012-12-18 18:09:13.000000000 +0100 @@ -0,0 +1,59 @@ +--- opcodes/i386-dis.c.orig 2012-07-16 14:58:29.000000000 +0200 ++++ opcodes/i386-dis.c 2012-12-18 15:22:10.000000000 +0100 +@@ -11991,7 +11991,7 @@ + static void + OP_ST (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED) + { +- oappend ("%st" + intel_syntax); ++ oappend (&"%st"[(short)intel_syntax]); + } + + static void +@@ -12520,32 +12520,32 @@ + if (prefixes & PREFIX_CS) + { + used_prefixes |= PREFIX_CS; +- oappend ("%cs:" + intel_syntax); ++ oappend (&"%cs:"[(short)intel_syntax]); + } + if (prefixes & PREFIX_DS) + { + used_prefixes |= PREFIX_DS; +- oappend ("%ds:" + intel_syntax); ++ oappend (&"%ds:"[(short)intel_syntax]); + } + if (prefixes & PREFIX_SS) + { + used_prefixes |= PREFIX_SS; +- oappend ("%ss:" + intel_syntax); ++ oappend (&"%ss:"[(short)intel_syntax]); + } + if (prefixes & PREFIX_ES) + { + used_prefixes |= PREFIX_ES; +- oappend ("%es:" + intel_syntax); ++ oappend (&"%es:"[(short)intel_syntax]); + } + if (prefixes & PREFIX_FS) + { + used_prefixes |= PREFIX_FS; +- oappend ("%fs:" + intel_syntax); ++ oappend (&"%fs:"[(short)intel_syntax]); + } + if (prefixes & PREFIX_GS) + { + used_prefixes |= PREFIX_GS; +- oappend ("%gs:" + intel_syntax); ++ oappend (&"%gs:"[(short)intel_syntax]); + } + } + +@@ -13876,7 +13876,7 @@ + intel_operand_size (b_mode, sizeflag); + } + } +- oappend ("%es:" + intel_syntax); ++ oappend (&"%es:"[(short)intel_syntax]); + ptr_reg (code, sizeflag); + } + >Release-Note: >Audit-Trail: >Unformatted: