]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
from systemd: build-sys: fix conftest.c to work on arm
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 3 Aug 2014 03:50:22 +0000 (23:50 -0400)
committerLucas De Marchi <lucas.demarchi@intel.com>
Wed, 25 Feb 2015 01:42:06 +0000 (22:42 -0300)
All tests for compiler support were failing with:

/usr/bin/ld: /tmp/ccwnVc2A.o: relocation R_ARM_MOVW_ABS_NC against `a' can not be used when making a shared object; recompile with -fPIC

m4/attributes.m4

index fad1c8f05f8154b029692b6e367d266c9838dfea..ab4b785a0f3b04939fe41e85b614f47f6d5f70e6 100644 (file)
@@ -42,7 +42,7 @@ AC_DEFUN([CC_CHECK_FLAG_APPEND], [
                  AS_TR_SH([cc_cv_$2_$3]),
                  [eval "AS_TR_SH([cc_save_$2])='${$2}'"
                   eval "AS_TR_SH([$2])='-Werror $3'"
-                  AC_LINK_IFELSE([AC_LANG_SOURCE([int a = 0; int main(void) { return a; } ])],
+                  AC_LINK_IFELSE([AC_LANG_SOURCE([int main(void) { return 0; } ])],
                           [eval "AS_TR_SH([cc_cv_$2_$3])='yes'"],
                           [eval "AS_TR_SH([cc_cv_$2_$3])='no'"])
                   eval "AS_TR_SH([$2])='$cc_save_$2'"])