configure: check for $cxx before use
PATCH 1/1 configure: check for $cxx before use
I broke this when adding checks for clang++.
Reported-by Laurent Vivier <[email protected]>
Signed-off-by John Snow <[email protected]>
--- configure | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
configure +2 -1
@@ -4435,7 +4435,8 @@ fi if test "$fortify_source" != "no"; then if echo | $cc -dM -E - | grep __clang__ > /dev/null 2>&1 ; then fortify_source="no"; - elif echo | $cxx -dM -E - | grep __clang__ > /dev/null 2>&1 ; then + elif test -n "$cxx" && + echo | $cxx -dM -E - | grep __clang__ >/dev/null 2>&1 ; then fortify_source="no"; else fortify_source="yes"
Signature · 1 line
2.4.3
Quoted 15 lines · John Snow
I broke this when adding checks for clang++.
Reported-by Laurent Vivier <[email protected]>Signed-off-by John Snow <[email protected]>--- configure | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)configure +0
-0
configure fi · line 4442
Quoted 9 lines
configure +2
-1@@ -4435,7 +4435,8 @@ fi if test "$fortify_source" != "no"; then if echo | $cc -dM -E - | grep __clang__ > /dev/null 2>&1 ; then fortify_source="no"; - elif echo | $cxx -dM -E - | grep __clang__ > /dev/null 2>&1 ; then + elif test -n "$cxx" && + echo | $cxx -dM -E - | grep __clang__ >/dev/null 2>&1 ; then fortify_source="no"; else fortify_source="yes"
This fixes the problem: no more error message.
Thanks,
Laurent
Quoted 14 lines · John Snow
I broke this when adding checks for clang++.
Reported-by Laurent Vivier <[email protected]>Signed-off-by John Snow <[email protected]>--- configure | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)configure +0
-0
configure fi · line 4442
Quoted 9 lines
configure +2
-1@@ -4435,7 +4435,8 @@ fi if test "$fortify_source" != "no"; then if echo | $cc -dM -E - | grep __clang__ > /dev/null 2>&1 ; then fortify_source="no"; - elif echo | $cxx -dM -E - | grep __clang__ > /dev/null 2>&1 ; then + elif test -n "$cxx" && + echo | $cxx -dM -E - | grep __clang__ >/dev/null 2>&1 ; then fortify_source="no"; else fortify_source="yes"
Reviewed-by Peter Maydell <[email protected]>
I'll apply it directly to master as a buildfix.
thanks
-- PMM