fix_cflags_handling.patch 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. From 1e94a03541e35718dc1eaa8023e0ec3cf2de369b Mon Sep 17 00:00:00 2001
  2. From: Richard Purdie <richard.purdie@linuxfoundation.org>
  3. Date: Fri, 30 Apr 2021 10:35:02 +0100
  4. Subject: [PATCH] libxcrypt: Update to 4.4.19 release and fix symbol version
  5. If you pass CFLAGS with a leading space, " " gets passed to popen and convinces
  6. gcc to try and open a file called " ". This results in a confusing error message
  7. like:
  8. x86_64-pokysdk-linux-gcc: error: : No such file or directory
  9. Avoid this by stripping empty elements out of CFLAGS.
  10. Upstream-Status: Submitted [https://github.com/besser82/libxcrypt/pull/126]
  11. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
  12. ---
  13. build-aux/scripts/compute-symver-floor | 2 ++
  14. 1 file changed, 2 insertions(+)
  15. diff --git a/build-aux/scripts/compute-symver-floor b/build-aux/scripts/compute-symver-floor
  16. index 4ec82e1..8117342 100644
  17. --- a/build-aux/scripts/compute-symver-floor
  18. +++ b/build-aux/scripts/compute-symver-floor
  19. @@ -36,6 +36,8 @@ sub preprocessor_check {
  20. die "C compiler not available\n" unless @CC;
  21. @CFLAGS = sh_split($ENV{CFLAGS} // q{});
  22. + # Remove empty elements, particularly leading ones which cause issues with popen below
  23. + @CFLAGS = grep {$_} @CFLAGS;
  24. # Remove empty elements, particularly leading ones which
  25. # cause issues with popen below.