From owner-freebsd-ports@FreeBSD.ORG Thu Feb 27 02:39:47 2014 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9C0E41F1 for ; Thu, 27 Feb 2014 02:39:47 +0000 (UTC) Received: from mail-out.apple.com (bramley.apple.com [17.151.62.49]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 802711918 for ; Thu, 27 Feb 2014 02:39:47 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from relay6.apple.com ([17.128.113.90]) by mail-out.apple.com (Oracle Communications Messaging Server 7u4-23.01 (7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTP id <0N1M005Q4SHDHJN0@mail-out.apple.com> for ports@freebsd.org; Wed, 26 Feb 2014 17:37:16 -0800 (PST) X-AuditID: 1180715a-f79cb6d00000168c-2d-530e96cb0c91 Received: from [17.149.228.196] (Unknown_Domain [17.149.228.196]) (using TLS with cipher AES128-SHA (128/128 bits)) (Client did not present a certificate) by relay6.apple.com (Apple SCV relay) with SMTP id E9.1E.05772.BC69E035; Wed, 26 Feb 2014 17:37:15 -0800 (PST) Subject: Re: CLang flags query:: I'm wanting to port software to FreeBSD From: Charles Swiger In-reply-to: Date: Wed, 26 Feb 2014 17:37:15 -0800 Message-id: References: To: Joe Nosay X-Mailer: Apple Mail (2.1510) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprHLMWRmVeSWpSXmKPExsUiOPXJEd3T0/iCDXrnGllsm9zKaPHyRaQD k8eMT/NZPHbOussewBTFZZOSmpNZllqkb5fAlTFx7wqWgrl8FUduJzUwXuDuYuTkkBAwkWi4 3MEEYYtJXLi3nq2LkYtDSKCfSeJc526wBLOAlsSNfy+BbA4OXgE9ie2/5EDCwgIeEjuuHGMB CbMJqElMmMgDEuYUCJT4Nv8QG4jNIqAq8efEDzaIKbISe3/tZoewtSWWLXzNDGLzClhJvGt6 D2YLCQRILPvxEKxeBGjkuj9r2SFOk5U4fe45ywRG/llIDpqFcNAsJFMXMDKvYhQoSs1JrDTT SywoyEnVS87P3cQICrWGwqgdjA3LrQ4xCnAwKvHwKrDxBQuxJpYVV+YeYpTgYFYS4T3kAhTi TUmsrEotyo8vKs1JLT7EKM3BoiTOK2gClBJITyxJzU5NLUgtgskycXBKNTBKXpsWvGrV3rDc A0Irzs8xSy+abpV7iFf476sN/KxKTVu9Nuux134RmVLuVjy3Z67Hm9lxwTe23VxhNGW53fL6 C/qMM1kufak+r9fMwJZ+++e1JrllK3tFd6g+YHW7o7f5UI3rPNOl/TtM7IunOYQemRb47nhe X6an+vstC3aH83GxfNjiI5qnxFKckWioxVxUnAgA1qRjUTECAAA= Cc: ports X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2014 02:39:47 -0000 Hi-- On Feb 26, 2014, at 3:43 PM, Joe Nosay wrote: > I've noticed different flags such as -Wno-parentheses and such along with > the -Wno-unused-variable. I would like to know where would be a good source > online to find the flags; For compatibility, clang understands the commonly used -W flags that gcc uses. More documentation is here: http://clang.llvm.org/docs/UsersManual.html ...and normally folks use -Wall, -Wpedantic, or -Weverything. However, if you truly want the complete list, run clang's "diagtool list-warnings": % clang/Debug+Asserts/bin/diagtool list-warnings Warnings with flags (924): backslash_newline_space [-Wbackslash-newline-escape] escaped_newline_block_comment_end [-Wcomment] ext_abstract_pack_declarator_parens [-Wanonymous-pack-parens] ext_aggregate_init_not_constant [-Wc99-extensions] [ ... ] warn_zero_size_struct_union_in_extern_c [-Wextern-c-compat] Warnings without flags (111): ext_delete_void_ptr_operand [ ... ] warn_weak_identifier_undeclared warn_weak_import STATISTICS: Percentage of warnings with flags: 89.28% Number of unique flags: 394 Average number of diagnostics per flag: 2.345 Number in -Wpedantic (not covered by other -W flags): 28 > and, I would like to know what flags are used by porters to optimize builds. The default CFLAGS should be respected, unless a port needs something in particular in order to work; see: http://www.freebsd.org/doc/en/books/porters-handbook/dads-cflags.html > These will be placed on the Makefile of the source such that it can be built natively > on FreeBSD. I would be able to test software. Good luck; and note that the entire porter's handbook is worth a read. :-) Regards, -- -Chuck