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

[PATCH 1/1] Windows: force-recompile git.res for differing architectures

From
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
Date
Nov 6, 2018, 14:55 UTC
Message-ID
<87794514ef3a83f95d81f89287b81aeed5c92296.1541516148.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.67.git.gitgitgadget@gmail.com>
From: Johannes Schindelin <johannes.schindelin@gmx.de>

When git.rc is compiled into git.res, the result is actually dependent on the architecture. That is, you cannot simply link a 32-bit git.res into a 64-bit git.exe.

Therefore, to allow 32-bit and 64-bit builds in the same directory, we let git.res depend on GIT-PREFIX so that it gets recompiled when compiling for a different architecture (this works because the exec path changes based on the architecture: /mingw32/libexec/git-core for 32-bit and /mingw64/libexec/git-core for 64-bit).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index bbfbb4292d..8375736c32 100644
--- a/Makefile
+++ b/Makefile
@@ -2110,7 +2110,7 @@ $(SCRIPT_LIB) : % : %.sh GIT-SCRIPT-DEFINES
 	$(QUIET_GEN)$(cmd_munge_script) && \
 	mv $@+ $@
 
-git.res: git.rc GIT-VERSION-FILE
+git.res: git.rc GIT-VERSION-FILE GIT-PREFIX
 	$(QUIET_RC)$(RC) \
 	  $(join -DMAJOR= -DMINOR= -DMICRO= -DPATCHLEVEL=, $(wordlist 1, 4, \
 	    $(shell echo $(GIT_VERSION) 0 0 0 0 | tr '.a-zA-Z-' ' '))) \
-- 
gitgitgadget
Previous: Johannes Schindelin via GitGitGadgetNext: Johannes Sixt
Message 2 of 7 in “Windows: force-recompile git.res for differing architectures”
  1. 0/1 Windows: force-recompile git.res for differing architecturesJohannes Schindelin via GitGitGadget, Nov 6, 2018
  2. 1/1 Windows: force-recompile git.res for differing architecturesJohannes Schindelin via GitGitGadget, Nov 6, 2018
  3. Johannes SixtNov 6, 2018
  4. Junio C HamanoNov 7, 2018
  5. Johannes SixtNov 7, 2018
  6. Junio C HamanoNov 7, 2018
  7. Johannes SchindelinNov 7, 2018

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.