makefile: Explicitly add /lib and /usr/lib to the library search path
Some compiler & linkers on some platforms don't dynamically provide a way to determine the library search path, so if /lib and /usr/lib exist as directories they are added to the end of the library search path. As reported in #1026
This commit is contained in:
parent
be4e3c4e33
commit
e9025a189f
1 changed files with 10 additions and 0 deletions
10
makefile
10
makefile
|
@ -477,6 +477,16 @@ ifeq (${WIN32},) #*nix Environments (&& cygwin)
|
|||
endif
|
||||
endif
|
||||
endif
|
||||
ifeq (,$(filter /lib/,$(LIBPATH)))
|
||||
ifeq (existlib,$(shell if $(TEST) -d /lib/; then echo existlib; fi))
|
||||
LIBPATH += /lib/
|
||||
endif
|
||||
endif
|
||||
ifeq (,$(filter /usr/lib/,$(LIBPATH)))
|
||||
ifeq (existusrlib,$(shell if $(TEST) -d /usr/lib/; then echo existusrlib; fi))
|
||||
LIBPATH += /usr/lib/
|
||||
endif
|
||||
endif
|
||||
# Some gcc versions don't support LTO, so only use LTO when the compiler is known to support it
|
||||
ifeq (,$(NO_LTO))
|
||||
ifneq (,$(GCC_VERSION))
|
||||
|
|
Loading…
Add table
Reference in a new issue