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

Re: [PATCH 7/9] sparse: Fix errors due to missing target-specific variables

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 7, 2011, 23:18 UTC
Message-ID
<7vfwpt6474.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4D9E06EE.9090803@ramsay1.demon.co.uk>
Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:
Show 24 quoted lines
> In particular, sparse issues the following errors:
>
>     attr.c:472:43: error: undefined identifier 'ETC_GITATTRIBUTES'
>     config.c:821:43: error: undefined identifier 'ETC_GITCONFIG'
>     exec_cmd.c:14:37: error: undefined identifier 'PREFIX'
>     exec_cmd.c:83:28: error: undefined identifier 'GIT_EXEC_PATH'
>     builtin/help.c:328:46: error: undefined identifier 'GIT_MAN_PATH'
>     builtin/help.c:374:40: error: undefined identifier 'GIT_INFO_PATH'
>     builtin/help.c:382:45: error: undefined identifier 'GIT_HTML_PATH'
>     git.c:96:42: error: undefined identifier 'GIT_HTML_PATH'
>     git.c:241:35: error: invalid initializer
>     http.c:293:43: error: undefined identifier 'GIT_HTTP_USER_AGENT'
>
> which is caused by not passing the target-specific additions to
> the EXTRA_CPPFLAGS variable to cgcc.
>
> In order to fix the problem, we define a new sparse target which
> depends on an a set of non-existent "sparse object" files (*.sp)
> which correspond to the set of C source files. In addition to the
> new target, we also provide a new pattern rule for "creating" the
> sparse object files from the source files by running cgcc.  This
> allows us to add '*.sp' to the rules setting the target-specific
> EXTRA_CPPFLAGS variable, which is then included in the new pattern
> rule to run cgcc.

Hmm, shouldn't this be part of [1/9]? I don't think I saw these with "make check" before applying that patch.

Also shouldn't you be marking .sp suffix as .PHONY?
Previous: Ramsay JonesNext: Ramsay Jones
Message 2 of 3 in “sparse: Fix errors due to missing target-specific variables”
  1. 7/9 sparse: Fix errors due to missing target-specific variablesRamsay Jones, Apr 7, 2011
  2. Junio C HamanoApr 7, 2011
  3. Ramsay JonesApr 11, 2011

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.