[linux-nfc] [neard][PATCH v2 71/73] build: fix missing usage of PIE check result

Krzysztof Kozlowski <[email protected]> Mon, 19 Jul 2021 13:08:17 +0200
Newsgroups org.01.lists.linux-nfc,dev.linux.lists.oe-linux-nfc
Message-ID <[email protected]>
The test result whether compiler accepts -fPIE in acinclude.m4 is stored
as neard_cv_prog_cc_pie variable.  Using wrong name of that variable in
a test for accepting '--enable-pie' configure argument caused PIE to be
never enabled (unless by default by compiler).

Fixes: 10c7e4a3cec3 ("build: Namespace local macros with NEARD_ instead of AC_ or nothing")
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index b9419c1fad74..1ec6f4eb30ea 100644
--- a/configure.ac
+++ b/configure.ac
@@ -89,7 +89,7 @@ AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug],
 AC_ARG_ENABLE(pie, AS_HELP_STRING([--enable-pie],
 			[enable position independent executables flag]), [
 	if (test "${enableval}" = "yes" &&
-				test "${ac_cv_prog_cc_pie}" = "yes"); then
+				test "${neard_cv_prog_cc_pie}" = "yes"); then
 		CFLAGS="$CFLAGS -fPIE"
 		LDFLAGS="$LDFLAGS -pie"
 	fi
-- 
2.27.0
_______________________________________________
Linux-nfc mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s