Date: Tue, 19 Feb 2008 03:44:23 GMT From: Carlos Santos <unixmania@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/120830: ensure that x11/xautolock compile with restrictive GCC arguments Message-ID: <200802190344.m1J3iN5M077437@www.freebsd.org> Resent-Message-ID: <200802190350.m1J3o1gq039497@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 120830 >Category: ports >Synopsis: ensure that x11/xautolock compile with restrictive GCC arguments >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Feb 19 03:50:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Carlos Santos >Release: 7.0-PRERELEASE >Organization: n.a. >Environment: FreeBSD casantos 7.0-PRERELEASE FreeBSD 7.0-PRERELEASE #2: Fri Jan 4 14:52:13 BRST 2008 root@casantos:/share/FreeBSD/src/sys/i386/compile/HP_NX6320 i386 >Description: I have a host.def file containing #define GccWarningOptions -Wall -Wpointer-arith -Wstrict-prototypes \ -Wmissing-prototypes -Wmissing-declarations \ -Wredundant-decls -Wnested-externs #define DefaultCCOptions -ansi -pedantic -Dasm=__asm__ -Dinline=__inline__ GccWarningOptions This helps me to catch many erros in X programs built using imake that normally are not caught by GCC. When I attempted to build xautolock it failed because there were comments in C++ style in a C source file (src/engine.c). There were also warnings in include/options.h (extra comma in enum declaration) and in src/message.c (missing prototype of function getAtoms). The attached file contains the patch files needed to fix the problem. Currently this is not a problem but future versions of GCC may not be so permissive regarding such syntactic mistakes. >How-To-Repeat: 1. Add the following lines to /usr/local/lib/X11/config/host.def: #ifndef GccWarningOptions # define GccWarningOptions -Wall -Wpointer-arith -Wstrict-prototypes \ -Wmissing-prototypes -Wmissing-declarations \ -Wredundant-decls -Wnested-externs #endif #ifndef DefaultCCOptions # define DefaultCCOptions -ansi -pedantic -Dasm=__asm__ -Dinline=__inline__ GccWarningOptions #endif 2. Attempt to build x11/xautolock >Fix: Extract the files contained in the attached tarball and put them in the "files" subdir of the port. Extract using b64decode -o /dev/stdout x11_xautolock_files.tar.gz.txt | tar -xzf - Patch attached with submission follows: begin-base64 644 x11_xautolock_files.tar.gz H4sICMBDukcCA3gxMV94YXV0b2xvY2sudGFyAO1XbW/bNhD21+hXXFGgiO1IpiTb8gsGZENXDCg2 DHMWYJ8MRaJtIpJokNRcI8h/3x2lqVaSuuuGpFjhg4GTST5H8SGP92glMq4HnWc1xlg0GgF5tIe+ +uPjkPEwjKKAAfODIAo6MOq8gJXaxApfRUlpjo3bbTjPji+ytbj/ia3s/m9jk2zcOH62/R8Ph5/c /4CN/Wb/g6GP+x+OI9YBdtr/ZzfXdUGrZMCLtSi4l3hSifVZgBnr+oEbTMAfzfAXjL2PueriljGn 3++3kASaYJfrTyAIZ8FoxvwWKETQ5SW4gc8uIuiTm8LlpQOveaY5DHpw/fMCegMHAMQKzjOZ3HL1 q0i71HLnuK+x9VXKVzhdCue/X/34/roLb94ctC3+WDxquv5t2HX6hG3alst3ivMfFm+XS+wCmq8w Z2d4Ekyp5ziYZ/9+KgoHZSFkAbtYGIA6rG2nVSYbkaUatkomXOu62667IeKVndFGp3mqB4xes2Pf F/62OsB3wObH41vyJ6ElfzJCR+ST9QDeSQVmw8GInMMNF8X6wm5HqbnSECsOsjQgV5CVye2MhgoF H+LSSNqmJsxOZBm+XMqRjxvqQSaMyGzoW+zjChQ3pSq0V2MGjkv+zi4pLfN8P68cLkjvteE5nFfI 7hzuYTCABf7bwzpJPM+rdu8fg3stcMOm5uY9tl/h0V/jG1rIFRLRnVP/vQMVddMpURcy/4A6jFk/ 0PJ/4kjUjhNrdsk6RjZTocwejBLIRqxhVTNd05HIPI+L1Gui1IR8ZlWFNGIljpHyRQE+Qcx95ehY Vk93Tudk35K16v/NV6n/LPLHTf0P8Rnrf8T8U/1/qfoviiQrUz6QW4NVS3ubAxHApm6I6nwyC9ks mD6q5yQCHsEfKoHxzJ88qQTC6kKdNvdprtdL/kGYi6ZY0i0JMaiyKLAmfaw4cGjVdUVg6vpF7i4q sOEIfgw1Eqwv5K4FLosGfhRcjbPw6rYmsOJ0kMxnZ67H1a/db4Hhy8B4cedY4eM1xzrlUCX6j/mf fJ38H4bhg+8/1P+jU/6/pP6vD1LrA+Aw94fBk7nfgj7I+zCY+dHTXwAssCLUOsp8K6JIhZZFQpeI FUmJ4rGhFCC1RDIJRXUS2+7YyNwqSMq/P6VInT7JXJGA/QNrbr6nIXD+VuhtFu97QF8Rd5TpySZW PZR8+ZxyDX283UiUbaiXt5yUWkGiDQOfxMHJTnayb9r+AvMeYNAAFgAA ==== >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200802190344.m1J3iN5M077437>