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

Re: [PATCH 4/4] Makefile: Don't pass $(ALL_CFLAGS) to the linker

From
PHPeter Harris <git@peter.is-a-geek.org>
Date
Jun 27, 2010, 20:45 UTC
Message-ID
<AANLkTilvV9Lty6jciIvASrRrzZ5rf9s2zmgulxuyM1hE@mail.gmail.com>
In-Reply-To
<4C251062.8040507@ramsay1.demon.co.uk>
On Fri, Jun 25, 2010 at 4:24 PM, Ramsay Jones wrote:
Show 15 quoted lines
> Peter Harris wrote:
>> On Wed, Jun 23, 2010 at 3:48 PM, Ramsay Jones wrote:
>>> The msvc debug build (make MSVC=1 DEBUG=1) issues a warning
>>> on every invocation of the linker:
>>>
>>>    LINK : warning LNK4044: unrecognized option '/Zi'; ignored
>>>
>>> In order to suppress the warning, we refrain from passing the
>>> $(ALL_CFLAGS) macro to the linker.
>>
>> Alternatively, we could leave the makefile alone and fix it up in
>> compat/vcbuild/scripts/clink.pl
>
> Hmm, OK ... but it would be much easier if we didn't pass inappropriate
> options in the first place. :-P
Well, yes and no.

The vast majority of git devs work in an environment where compiler flags and linker flags aren't completely disjoint, and it's not very polite of us to rework their makefile to fit our view of the world. Especially when we already have a wrapper that fits their world to ours.

So I suggest that improving clink.pl is a whole lot easier for a whole lot more people (compared to reworking the entire makefile being easier for far fewer people).

> Also, are you correctly filtering *all* possible inappropriate options?
> For example, the very next patch on my branch (not sent to list) adds
> a -W3 option ... ;-)
Heck no. This only filters the options that are used by the git makefile.
But adding a filter for -W* is a trivial one liner (one character-er, even).
Peter Harris
Previous: Ramsay JonesNext: Ramsay Jones
Message 10 of 12 in “Makefile: Don't pass $(ALL_CFLAGS) to the linker”
  1. 4/4 Makefile: Don't pass $(ALL_CFLAGS) to the linkerRamsay Jones, Jun 23, 2010
  2. Jonathan NiederJun 23, 2010
  3. Ramsay JonesJun 26, 2010
  4. Jonathan NiederJun 26, 2010
  5. Ramsay JonesJun 30, 2010
  6. Andreas SchwabJun 30, 2010
  7. Bernhard R. LinkJun 27, 2010
  8. Peter HarrisJun 24, 2010
  9. Ramsay JonesJun 25, 2010
  10. Peter HarrisJun 27, 2010
  11. Ramsay JonesJun 30, 2010
  12. Peter HarrisJul 1, 2010

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.