On 5/7/21 9:15 AM, Michael Olbrich wrote:
> Signed-off-by: Michael Olbrich <m.olbr...@pengutronix.de>
> ---
> 
> Would this work? Or do we need to exclude /usr/lib explicitly as well?
> 
> Michael
> 
>  scripts/pkg-config-wrapper | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/scripts/pkg-config-wrapper b/scripts/pkg-config-wrapper
> index d86fa7c683b5..dd786e47b212 100755
> --- a/scripts/pkg-config-wrapper
> +++ b/scripts/pkg-config-wrapper
> @@ -17,9 +17,11 @@ else
>  fi
>  
>  declare -a libdir system_path system_incpath
> -libdir=( $(find ${prefix} -maxdepth 3 -type d -name pkgconfig) > 
> -system_libpath=( "${libdir[@]/%//../../lib}" "${libdir[@]/%//../lib}"
"/usr/lib" "/lib" )
> -system_incpath=( "${libdir[@]/%//../../include}" 
> "${libdir[@]/%//../include}" "/usr/include" "/include" )
> +libdir=( $(find ${prefix} -maxdepth 3 -type d -path */lib*/pkgconfig) )
> +lib="$(basename $(dirname ${libdir[0]}))"

Only one libdir? Lost lib64 in translation? Not sure I understand this.

> +libdir+=( "${prefix/%//share/pkgconfig}" )
> +system_libpath=( "${libdir[@]/%//../../${lib}}" "/usr/${lib}" "/${lib}" )

This looks strange to me. libdir contains lib64, but $lib is only "lib".

Doesn't this assume that system libpath is the same as the target?
I'm a bit confused what the filtering needs to filter.
Removing host directories, whatever they may be or removing directories
that are similar to those we are including?

Couldn't host path filtering be of similar construction as the cross libdir?

> +system_incpath=( "${libdir[@]/%//../../include}" "/usr/include" "/include"

Not sure i understand libdir to include path filtering either. :)
This becomes sysroot-target/usr/lib{64}/pkgconfig/../../include,
/usr/include. /include?

>  
>  orig_IFS="${IFS}"
>  IFS=":"
> 


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to 
ptxdist-requ...@pengutronix.de

Reply via email to