depends: Add multilib paths for Linux cross-compile

This commit is contained in:
Jack Grigg 2020-10-12 20:47:47 +01:00
parent 0887f64c90
commit fa54a1661a
1 changed files with 8 additions and 0 deletions

View File

@ -15,3 +15,11 @@ i686_linux_CC=$(default_host_CC) -m32
i686_linux_CXX=$(default_host_CXX) -m32
x86_64_linux_CC=$(default_host_CC) -m64
x86_64_linux_CXX=$(default_host_CXX) -m64
# Clang doesn't appear to find these multilib paths by default,
# so help it out if we are cross-compiling.
ifneq ($(canonical_host),$(build))
# CFLAGS is copied to CXXFLAGS after it is fully-evaluated.
linux_CFLAGS += -idirafter /usr/$(host)/include
linux_LDFLAGS += -L/usr/$(host)/lib
endif