Commit 0ef442e
committed
Makefile: dedup archives in $(LIBS) so link recipes don't repeat them
A handful of link recipes listed archive files twice: once explicitly
via $(filter %.a,$^) and again implicitly through $(LIBS), which
expanded to $(filter-out %.o,$(GITLIBS)) $(EXTLIBS). On macOS the
linker warned about the duplicates:
ld: warning: ignoring duplicate libraries: 'libgit.a', 'target/release/libgitcore.a'
Redefine $(LIBS) to list archive prerequisites from $^ first, then
the rest of the library list with those archives filtered out so each
appears only once.
Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>1 parent 9ac3f19 commit 0ef442e
1 file changed
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2503 | 2503 | | |
2504 | 2504 | | |
2505 | 2505 | | |
2506 | | - | |
| 2506 | + | |
| 2507 | + | |
| 2508 | + | |
2507 | 2509 | | |
2508 | 2510 | | |
2509 | 2511 | | |
| |||
3392 | 3394 | | |
3393 | 3395 | | |
3394 | 3396 | | |
3395 | | - | |
| 3397 | + | |
3396 | 3398 | | |
3397 | 3399 | | |
3398 | 3400 | | |
| |||
4015 | 4017 | | |
4016 | 4018 | | |
4017 | 4019 | | |
4018 | | - | |
| 4020 | + | |
4019 | 4021 | | |
4020 | 4022 | | |
4021 | 4023 | | |
4022 | 4024 | | |
4023 | 4025 | | |
4024 | | - | |
| 4026 | + | |
4025 | 4027 | | |
4026 | 4028 | | |
4027 | 4029 | | |
| |||
0 commit comments