From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <67e4d0662728cd9c542ad21896a4ea09@collyer.net> To: 9fans@cse.psu.edu Subject: Re: [9fans] drawterm From: Geoff Collyer In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Wed, 10 Sep 2003 14:00:08 -0700 Topicbox-Message-UUID: 30a44822-eacc-11e9-9e20-41e7f4b1d025 gcc takes greater liberties when optimising than Ken's compilers do, and most Plan 9 code doesn't use `volatile', so I use a wrapper (agcc) to disable some optimisations, and set CC=agcc in my [Mm]a?ke?files on Unix. cpu% cat openbsd/bin/sh/agcc #!/bin/sh # agcc - invoke gcc in ANSI mode with less-aggressive optimisation. # --writable-strings is a concession to pre-ansi programs like pre-plan-9 mk. exec gcc -ansi -pipe -fvolatile -fvolatile-global --writable-strings "$@" If your gcc implements it (e.g. on MacOS 10.2), add `-fvolatile-static'. It's probably best to start with no -O options and see if the resulting binary works correctly before trying to add -O options.