syslinux-000-user-headers-from-sysroot.patch 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. efi: look for headers and libs in the sysroot
  2. Currently, syslinux hard-codes search paths to /usr/.... directories.
  3. This does not play well in cross-compilation.
  4. If $SYSROOT is defined, prepend it to the search paths.
  5. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
  6. diff -durN syslinux-6.02.orig/efi/find-gnu-efi.sh syslinux-6.02/efi/find-gnu-efi.sh
  7. --- syslinux-6.02.orig/efi/find-gnu-efi.sh 2013-10-13 19:59:03.000000000 +0200
  8. +++ syslinux-6.02/efi/find-gnu-efi.sh 2014-04-22 00:19:23.638483887 +0200
  9. @@ -9,7 +9,7 @@
  10. find_include()
  11. {
  12. for d in $include_dirs; do
  13. - found=`find $d -name efi -type d 2> /dev/null`
  14. + found=`find $SYSROOT$d -name efi -type d 2> /dev/null`
  15. if [ "$found"x != "x" ] && [ -e $found/$ARCH/efibind.h ]; then
  16. echo $found
  17. break;
  18. @@ -20,12 +20,12 @@
  19. find_lib()
  20. {
  21. for d in $lib_dirs; do
  22. - found=`find $d -name libgnuefi.a 2> /dev/null`
  23. + found=`find $SYSROOT$d -name libgnuefi.a 2> /dev/null`
  24. if [ "$found"x != "x" ]; then
  25. crt_name='crt0-efi-'$ARCH'.o'
  26. - crt=`find $d -name $crt_name 2> /dev/null`
  27. + crt=`find $SYSROOT$d -name $crt_name 2> /dev/null`
  28. if [ "$crt"x != "x" ]; then
  29. - echo $d
  30. + echo $SYSROOT$d
  31. break;
  32. fi
  33. fi