[OE-core] [PATCH 1/2] insane.bbclass: check invalid ac_cv value

Burton, Ross ross.burton at intel.com
Fri Jun 12 11:06:05 UTC 2015


On 12 June 2015 at 04:23, Robert Yang <liezhi.yang at windriver.com> wrote:

> +        for var in tocheck.split():
> +            if var.startswith('ac_cv_'):
> +                varname = var.split('=')[0]
> +                cfgscript=d.expand("${S}/configure")
> +                if os.path.exists(cfgscript):
> +                    statement = "grep -q -F %s  %s > /dev/null" %
> (varname, cfgscript)
>

So your assumption that ac_cv_* variables are referenced in full in
configure is bad.  This is what strace has for the giant AC_CHECK_HEADERS
block:

for ac_header in asm/cachectl.h asm/sysmips.h bluetooth/bluetooth.h elf.h
inttypes.h ioctls.h linux/bsg.h linux/falloc.h linux/filter.h
linux/hiddev.h linux/mmtimer.h linux/perf_event.h linux/seccomp.h
linux/securebits.h linux/utsname.h mqueue.h netinet/sctp.h poll.h scsi/sg.h
stropts.h sys/conf.h sys/epoll.h sys/fanotify.h sys/filio.h sys/ioctl.h
sys/poll.h sys/reg.h sys/vfs.h sys/xattr.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header"
"$ac_includes_default"

The variable name is constructed, so this test can't work.

Ross
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20150612/f5d2f3e9/attachment-0002.html>


More information about the Openembedded-core mailing list