git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Compiling git with -Werror

From
Thomas Rast <trast@student.ethz.ch>
Date
Apr 27, 2012, 09:58 UTC
Message-ID
<87bomd338q.fsf@thomas.inf.ethz.ch>
In-Reply-To
<4F9A6AB0.1050504@alum.mit.edu>
Michael Haggerty <mhagger@alum.mit.edu> writes:
> Is there some other mechanism to set strict CFLAGS parameters for the
> build without confusing ./configure?
As mentioned on IRC, you can put
  CFLAGS = -g -O2 -Wall -Werror -Wdeclaration-after-statement

in config.mak. The Makefile includes that if it exists, so it is a good place to gather your custom settings.

One trick I like to do in every Makefile is
  O = 3
  CFLAGS = -g -O$(O) -Wall <blah>
That way 'make O=0' does a build suitable for debugging.
-- 
Thomas Rast
trast@{inf,student}.ethz.ch
Previous: Michael HaggertyNext: Jeff King
Message 2 of 3 in “Compiling git with -Werror”
  1. Michael HaggertyApr 27, 2012
  2. Thomas RastApr 27, 2012
  3. Jeff KingApr 27, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.