From 5fd69f7652b0854b0eeba6b96c6a80ed0efc67a2 Mon Sep 17 00:00:00 2001 From: "Kirill K. Smirnov" Date: Sat, 10 Sep 2016 03:35:53 +0300 Subject: complibs: let mingw-gcc find target companion libs mingw-gcc searches for include and libs in /mingw directory while non-mingw-gcc uses /usr. This patch sets an appropriate prefix for target companion libs. Signed-off-by: Kirill K. Smirnov --- scripts/build/companion_libs/200-libelf.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'scripts/build/companion_libs/200-libelf.sh') diff --git a/scripts/build/companion_libs/200-libelf.sh b/scripts/build/companion_libs/200-libelf.sh index 529bba22..b373b547 100644 --- a/scripts/build/companion_libs/200-libelf.sh +++ b/scripts/build/companion_libs/200-libelf.sh @@ -69,13 +69,24 @@ if [ "${CT_LIBELF_TARGET}" = "y" ]; then do_libelf_for_target() { local -a libelf_opts + local prefix CT_DoStep INFO "Installing libelf for the target" CT_mkdir_pushd "${CT_BUILD_DIR}/build-libelf-target-${CT_TARGET}" + case "${CT_TARGET}" in + *-*-mingw*) + prefix="/mingw" + ;; + *) + prefix="/usr" + ;; + esac + libelf_opts+=( "destdir=${CT_SYSROOT_DIR}" ) libelf_opts+=( "host=${CT_TARGET}" ) - libelf_opts+=( "prefix=/usr" ) + + libelf_opts+=( "prefix=${prefix}" ) libelf_opts+=( "shared=y" ) do_libelf_backend "${libelf_opts[@]}" -- cgit v1.2.3