Skip to content

Commit 48a031a

Browse files
dm0-gitster
authored andcommitted
Makefile: reorder linker flags in the git executable rule
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". Move the ALL_LDFLAGS variable expansion in the git executable rule to be consistent with all the other linking rules, namely to have LDFLAGS such as -L$where before the object files *.o being linked together. Signed-off-by: David Michael <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f51140c commit 48a031a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1735,8 +1735,8 @@ git.sp git.s git.o: EXTRA_CPPFLAGS = \
17351735
'-DGIT_INFO_PATH="$(infodir_relative_SQ)"'
17361736

17371737
git$X: git.o GIT-LDFLAGS $(BUILTIN_OBJS) $(GITLIBS)
1738-
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ git.o \
1739-
$(BUILTIN_OBJS) $(ALL_LDFLAGS) $(LIBS)
1738+
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) git.o \
1739+
$(BUILTIN_OBJS) $(LIBS)
17401740

17411741
help.sp help.s help.o: common-cmds.h
17421742

0 commit comments

Comments
 (0)