From c7627e6d4346964cad693419f41c942591ebaf35 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Fri, 26 Apr 2013 12:18:41 +0200 Subject: If PERL_NO_INLINE_FUNCTIONS is defined, don't include "inline.h" This permits test code to include the perl headers for definitions without creating a link dependency on the perl library (which may not exist yet). Some of the static inline functions in inline.h reference functions in the perl object files, and some compilers aren't smart enough to eliminate unused static inline functions, hence including the inline.h in probe code can cause link errors even though the probe code uses none of the functions it declares. When probing, a failed link is taken as meaning that the probed-for function is not present, as the assumption is that the link fails because of it. Hence other causes of link failures cause the probing code to generate incorrect results, and action (and bugs) at a distance. --- cflags.SH | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cflags.SH') diff --git a/cflags.SH b/cflags.SH index 899c465cac..5363f992a5 100755 --- a/cflags.SH +++ b/cflags.SH @@ -142,7 +142,7 @@ Intel*) ;; # # Is that you, Intel C++? case " $ccflags " in *" $opt "*) ;; # Skip if already there. *) rm -f _cflags$_exe - case "`$cc $cflags $warn $stdflags $opt _cflags.c -o _cflags$_exe 2>&1`" in + case "`$cc -DPERL_NO_INLINE_FUNCTIONS $cflags $warn $stdflags $opt _cflags.c -o _cflags$_exe 2>&1`" in *"unrecognized"*) ;; *"implicit declaration"*) ;; # Was something useful hidden? *"Invalid"*) ;; -- cgit v1.2.1