diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2019-01-08 17:42:52 +0800 |
---|---|---|
committer | Robert Yang <liezhi.yang@windriver.com> | 2019-01-09 19:31:19 -0800 |
commit | 625dc853b0c953a4e066d9088796886f6d0b5103 (patch) | |
tree | bf32b34eba74936eb9de087842d7a9217179f157 /meta/site | |
parent | 237ed166f48b0e32684a5307d3b47b9485238ed9 (diff) | |
download | openembedded-core-contrib-625dc853b0c953a4e066d9088796886f6d0b5103.tar.gz |
glibc-site_2.28.bb: Add it for speeding up do_configure
* How to generate site_config/funcs:
- Do a world build and save autoconf cache values to a directory such as
/tmp/saved_ac_cv:
1) Add the following line to local.conf
MACHINE="qemux86"
EXTRA_OECONF_append = " --cache-file=/tmp/saved_ac_cv/${TARGET_ARCH}/${PN}-cache"
2) Do a world build
$ bitbake world
3) Find out the top 100 used functions, these functions are used by about more
than 20 recipes in a world build.
$ find /tmp/i586/ /tmp/qemux86/ -name '*_cache_config' -exec cat {} \; | \
grep '^ac_cv_func_' | awk -F= '{print $1}' | sed 's/^ac_cv_func_//' | \
sort | uniq -c | sort -n | awk '{print $2}' | tail -n 100 | sort -o /tmp/target_funcs
- Find out glibc functions
$ grep '^ ' /path/to/2.28-r0/build-i586-poky-linux/libc.map | sed -e 's/;/\n/g' | \
sed -e 's/^ *//g' -e '/^$/d' | sort -o /tmp/libc.map
- Get the common funcs in both /tmp/libc.map and /tmp/target_funcs
$ comm -1 -2 /tmp/libc.map /tmp/target_funcs > site_config/funcs
* How to generate site_config/headers:
- Find out the top 100 used headers, these functions are used by about more
than 20 recipes in a world build.
$ find /tmp/i586/ /tmp/qemux86/ -name '*_cache_config' -exec cat {} \; | \
grep '^ac_cv_header_' | awk -F= '{print $1}' | sed 's/^ac_cv_header_//' | \
sort | uniq -c | sort -n | awk '{print $2}' | tail -n 100 | sort -o /tmp/target_headers
- Find out glibc headers
$ find tmp/work/i586-poky-linux/glibc/2.28-r0/git/include/ -name '*.h' | \
sed -e 's#.*git/include/##' | sort -o /tmp/libc_headers_orig
$ cat /tmp/libc_headers_orig | sed -e 's#.*git/include/##' -e 's#/#_#g' -e 's#\.#_#g' | sort -o /tmp/libc_headers
$ comm -1 -2 /tmp/target_headers /tmp/libc_headers > /tmp/tr_headers
$ for i in `cat /tmp/libc_headers_orig`; do
i_tr=`echo $i | sed -e 's#.*git/include/##' -e 's#/#_#g' -e 's#\.#_#g'`
if grep -q -E "^$i_tr$" /tmp/tr_headers; then
echo $i
fi
done > site_config/headers
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Diffstat (limited to 'meta/site')
0 files changed, 0 insertions, 0 deletions