Stefan Fiedler: libx11: move -L and -I compiler options for cross-builds to parse-config --- package/xorg/xorg_config.sh (Revision 28) +++ package/xorg/xorg_config.sh (Revision 29) @@ -58,10 +58,6 @@ if [ $stagelevel -lt 3 ] ; then # configure cannot auto-detect this in cross builds var_append extraconfopt " " "--enable-malloc0returnsnull" - - # only use headers and libraries from the target system - var_append GCC_WRAPPER_REMOVE " " "-I/usr/X11R7/include" - var_append GCC_WRAPPER_APPEND " " "-I$root/usr/X11R7/include -L$root/usr/X11R7/$multilib" fi # Set the path so that locally built apps will be found and used --- package/xorg/libx11/parse-config (Revision 0) +++ package/xorg/libx11/parse-config (Revision 29) @@ -0,0 +1,11 @@ +#!/bin/bash + +if [ $stagelevel -lt 3 -a "$crossnative" == cross ] ; then + # only use headers and libraries from the target system + if $arch_target-pkg-config --exists x11 ; then + xorg_prefix="$($arch_target-pkg-config --variable=prefix x11)" + var_append GCC_WRAPPER_FILTER "|" \ + "sed -e 's,-I\($xorg_prefix/include\),-I$root\1,g ; s,-L\($xorg_prefix/$multilib\),-L$root\1,g'" + var_append GCC_WRAPPER_APPEND " " "-Wl,--rpath-link -Wl,$root$xorg_prefix/$multilib" + fi +fi