diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-04-30 14:26:54 +0100 |
---|---|---|
committer | Björn Esser <besser82@fedoraproject.org> | 2021-05-01 06:56:11 +0200 |
commit | fed81d1a98fab52839b60a55447d368899034847 (patch) | |
tree | 800ea751d4dc47fa2572079f4ff5e315b27c10e3 /build-aux | |
parent | eee420f5157ce424690438cbf3dd81a6253e8355 (diff) | |
download | libxcrypt-fed81d1a98fab52839b60a55447d368899034847.tar.gz libxcrypt-fed81d1a98fab52839b60a55447d368899034847.tar.bz2 libxcrypt-fed81d1a98fab52839b60a55447d368899034847.zip |
build-aux/compute-symver-floor: Fix handling of spaces in CFLAGS
If you pass CFLAGS with a leading space, " " gets passed to popen and convinces
gcc to try and open a file called " ". This results in a confusing error message
like:
x86_64-pokysdk-linux-gcc: error: : No such file or directory
Avoid this by stripping empty elements out of CFLAGS.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'build-aux')
-rw-r--r-- | build-aux/compute-symver-floor | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/build-aux/compute-symver-floor b/build-aux/compute-symver-floor index 553f391..4ec82e1 100644 --- a/build-aux/compute-symver-floor +++ b/build-aux/compute-symver-floor @@ -37,6 +37,10 @@ sub preprocessor_check { @CFLAGS = sh_split($ENV{CFLAGS} // q{}); + # Remove empty elements, particularly leading ones which + # cause issues with popen below. + @CFLAGS = grep { $_ } @CFLAGS; + # We call ensure_C_locale here, not from the main section, # because this sub might not get called at all, in which # case it would be unnecessary work. |