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

[PATCH 2/3] Makefile: Reorder linker flags in the git executable rule

From
David Michael <fedora.dm0@gmail.com>
Date
Oct 26, 2014, 17:33 UTC
Message-ID
<87mw8iag72.fsf@gmail.com>

The XL C compiler can fail due to mixing library path and object file arguments, for example when linking git while building with "gmake LDFLAGS=-L$prefix/lib". This moves the ALL_LDFLAGS variable expansion in the git executable rule to be consistent with all the other linking rules.

Signed-off-by: David Michael <fedora.dm0@gmail.com>
---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index fcd51ac..827006b 100644
--- a/Makefile
+++ b/Makefile
@@ -1610,8 +1610,8 @@ git.sp git.s git.o: EXTRA_CPPFLAGS = \
 	'-DGIT_INFO_PATH="$(infodir_relative_SQ)"'
 
 git$X: git.o GIT-LDFLAGS $(BUILTIN_OBJS) $(GITLIBS)
-	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ git.o \
-		$(BUILTIN_OBJS) $(ALL_LDFLAGS) $(LIBS)
+	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) git.o \
+		$(BUILTIN_OBJS) $(LIBS)
 
 help.sp help.s help.o: common-cmds.h
 
-- 
1.9.3
Next: Eric Sunshine
Message 1 of 7 in “Makefile: Reorder linker flags in the git executable rule”
  1. 2/3 Makefile: Reorder linker flags in the git executable ruleDavid Michael, Oct 26, 2014
  2. Eric SunshineOct 26, 2014
  3. Jeff KingOct 26, 2014
  4. David MichaelOct 26, 2014
  5. Jeff KingOct 27, 2014
  6. Junio C HamanoOct 27, 2014
  7. Jeff KingOct 28, 2014

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.