package/cargo: pass appropriate library path to the linker
authorThomas Petazzoni <thomas.petazzoni@bootlin.com>
Fri, 28 Dec 2018 13:25:50 +0000 (14:25 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Thu, 17 Jan 2019 22:01:11 +0000 (23:01 +0100)
commitb5e1b51dd1ee68ee342a3340c9c947c083861eb8
tree9eff6bd609969f1039c522ef1bc52071948e7c9d
parent5d882b71a8c0c87b0ccdea7ad620a8f44c33fcb1
package/cargo: pass appropriate library path to the linker

When linking the host cargo binary, the linker should be told to find
libraries in $(HOST_DIR)/lib, otherwise it will not work libraries
such as libhttp_parser. This was found with per-package directory
support, where the build failed with:

  = note: /usr/bin/ld: cannot find -lhttp_parser
          collect2: error: ld returned 1 exit status

In order to fix this, instead of passing -L$(HOST_DIR)/lib during the
build of Cargo, we make sure all flags in $(HOST_LDFLAGS) are passed.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/cargo/cargo.mk