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/recipes-core/glibc-site/site_config/funcs | |
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/recipes-core/glibc-site/site_config/funcs')
-rw-r--r-- | meta/recipes-core/glibc-site/site_config/funcs | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc-site/site_config/funcs b/meta/recipes-core/glibc-site/site_config/funcs new file mode 100644 index 0000000000..d80bb1fdd7 --- /dev/null +++ b/meta/recipes-core/glibc-site/site_config/funcs @@ -0,0 +1,66 @@ +bind_textdomain_codeset +clock_gettime +fcntl +fork +ftruncate +getaddrinfo +getcwd +geteuid +getgrgid_r +gethostbyname +getline +getopt_long_only +getpagesize +getpwuid_r +gettimeofday +getuid +localtime_r +mbrtowc +memcpy +memmove +mempcpy +memset +mkstemp +mmap +mprotect +nl_langinfo +pipe +poll +putenv +raise +readlink +realpath +select +setenv +setlocale +setresuid +sigaction +snprintf +socket +stpcpy +strcasecmp +strchr +strdup +strerror +strerror_r +strftime +strncasecmp +strndup +strnlen +strrchr +strstr +strtol +strtoul +symlink +sysconf +towlower +tsearch +unsetenv +vasprintf +vfork +vprintf +vsnprintf +waitpid +wcrtomb +wcslen +wcsnlen |