glibc: Migrate eglibc 2.19 -> glibc 2.20

- This is a big swoop change where we switch to using glibc
- option-groups are forward ported
- cross-localedef is extracted out from eglibc and hosted
  at github.com/kraj/localedef, its used for cross-localedef
  recipe
- Other non ported patches from eglibc are forward ported
  ppc8xx cache line workaround
  SH fpcr values
  dynamic resolver
  installing PIC archives is there but is not applied
  libc header bootstrap

- Delete eglibc recipes we moved back to using glibc now
- Fix ppc/e500 build

- Fix crypt module build when options are used
- Fix fnmatch build when options OPTION_EGLIBC_LOCALE_CODE is unset
  HAVE_MBSTATE_T and HAVE_MBSRTOWCS should be defined conditionally
  based upon OPTION_EGLIBC_LOCALE_CODE being set/unset
- Move the ports/ patches to relevant files now that ports is gone

Signed-off-by: Khem Raj <raj.khem@gmail.com>
distro: TCLIBC now defines glibc instead of eglibc

Adjust naming conventions to reflect eglibc->glibc move

Signed-off-by: Khem Raj <raj.khem@gmail.com>
conf: Account for eglibc->glibc move

Change references in documentation appropriately

Signed-off-by: Khem Raj <raj.khem@gmail.com>
image-swab.bbclass: Account for eglibc -> glibc move

Signed-off-by: Khem Raj <raj.khem@gmail.com>
oeqa: sstatetests should now look for glibc-initial

Signed-off-by: Khem Raj <raj.khem@gmail.com>
recipes: Remove references to eglibc

change use of eglibc related variabled to glibc equivalents

Signed-off-by: Khem Raj <raj.khem@gmail.com>
bitbake.conf: Use 2.6.32 for oldest supported kernel

glibc 2.20+ wont support any older than that

Signed-off-by: Khem Raj <raj.khem@gmail.com>
xf86-input-synaptics/xf86-input-vmmouse: Fix build with glibc 2.20

Backport the upstream patches needed for them to work with glibc 2.20

Signed-off-by: Khem Raj <raj.khem@gmail.com>
xf86-video-intel/xf86-video-omapfb: Fix build with glibc 2.20

include xorg-xserver.h

Signed-off-by: Khem Raj <raj.khem@gmail.com>
grub: Replace _BSD_SOURCE macro with _DEFAULT_SOURCE

This is needed with glibc 2.20 since _BSD_SOURCE
macro is gone

Signed-off-by: Khem Raj <raj.khem@gmail.com>
python-numpy: Fix build for mips64

Add missing mips64 specific config files

Signed-off-by: Khem Raj <raj.khem@gmail.com>
lz4: update to version 122

Makefile md5sum changed its is where they bump the version.

r122 fixes:
Fix : AIX & AIX64 support (SamG)
Fix : mips 64-bits support (lew van)
Added : Examples directory, using code examples from Takayuki Matsuoka
Updated : Framing specification, to v1.4.1
Updated : xxHash, to r36

r121 fixes:
Fix : make install for OS-X and BSD, thanks to Takayuki Matsuoka
Added : make install for kFreeBSD and Hurd (Nobuhiro Iwamatsu)
Fix : LZ4 HC streaming bug

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
package_rpm: Add custom extension support for spec generation.

Add hooks to allow customisation of the rpm spec files. Since python functions
aren't visible in the data store, one variable is used to trigger the call to
a separately named function. A dummy function is not provided since this then
triggers various class ordering complexities which are best avoided.

Ultimately this will be replaced by a refactor of the code to generate the
spec file using a python class.

This allows the tizen layer to add hooks for the security manifests for
example.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
package_rpm: Add builddir macro to define source directory

This allows its usage in other RPM macros so files in ${S} can be found.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
package_manager: Add rpm v4 support

Currently the package manager code only supports rpm v5. To be useful outside
of OE or with OE layers using v4, it makes sense to add in rpm v4 support. This
takes a patch from "Bartosh, Eduard" <eduard.bartosh@intel.com> and enhances
it to also include versions of the workarounds from poky-eurogiciel to
allow rpm v4 usage with the class for image construction.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/create-recipe: minor fixes

Fixed:
- Remove PR. We don't need the "PR = r0" in the bb file.
- Function length can't get the array's size correctly.
  Should use function scalar.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
pango / ptest: clean CFLAGS for host binary

The binary gen-all-unicode needs to be compiled for the host
architecture, the CFLAGS passed to target system could cause
build issues for it.

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
perf.bb: fix multilib build

Fixed:
$ bitbake perf lib32-perf
ERROR: QA Issue: lib32-perf: Files/directories were installed but not shipped
  /usr/lib64
  /usr/lib64/traceevent
  /usr/lib64/traceevent/plugins
  /usr/lib64/traceevent/plugins/plugin_function.so
  /usr/lib64/traceevent/plugins/plugin_scsi.so
  /usr/lib64/traceevent/plugins/plugin_hrtimer.so
  /usr/lib64/traceevent/plugins/plugin_kmem.so
  /usr/lib64/traceevent/plugins/plugin_jbd2.so
  /usr/lib64/traceevent/plugins/plugin_xen.so
  /usr/lib64/traceevent/plugins/plugin_mac80211.so
  /usr/lib64/traceevent/plugins/plugin_cfg80211.so
  /usr/lib64/traceevent/plugins/plugin_sched_switch.so
  /usr/lib64/traceevent/plugins/plugin_kvm.so [installed-vs-shipped]

The perf.do_configure edits kernel's
${STAGING_KERNEL_DIR}/tools/perf/config/Makefile, there would be
problems since kernel doesn't have multilib, and the build result is
undetermined.

Previously, the sed command changed libdir to /usr/lib64 (or 32) in the
Makefile, so the build result was different if we build perf (64) first
or lib32-perf first.

Use the weak assignment "libdir ?=" to instead of "libdir =" will fix
the problem since the multilib builds are in different processes, and
they won't affect each other any more.

The sed command will match both $(prefix)/$(lib) and $(prefix)/lib since
the Makefile may has been modified before this patch.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
classes/compress_doc.bbclass: compress man/info pages

A distribution compression policy should be established, and used by all
packages. It compressed man pages in ${mandir} and info pages in ${infodir}

1. The doc will be compressed to gz format by default, which is configured
in ${DOC_COMPRESS}

2. It will automatically correct the compressed doc which is not
in ${DOC_COMPRESS} but in ${DOC_COMPRESS_LIST} to the format
of ${DOC_COMPRESS} policy

3. It is easy to add a new type compression by editing
local.conf, such as:
...
DOC_COMPRESS_LIST_append = ' abc'
DOC_COMPRESS = 'abc'
DOC_COMPRESS_CMD[abc] = 'abc compress cmd ***'
DOC_DECOMPRESS_CMD[abc] = 'abc decompress cmd ***'
...

[YOCTO #1238]

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
package_rpm: Add optional improved directory handling

During spec generation, ideally directories should not be auto
packaged under the %file section of rpm packages but take ownership of
specific directories.

* packages only empty directories or explict directory.
   See:
       - http://www.rpm.org/max-rpm/s1-rpm-inside-files-list-directives.html
       - "The %dir Directive"

* This will prevent the overlapping of security permission.
   For example, in Tizen the directory /etc have smack label 'System::Shared'
   So Only one package should own and set the label of /etc to prevent
   the overwriting of the smack label.

Existing behaviour is maintained if DIRFILES is not set. If it is set,
the modified behaviour is used. If can be set to an empty value by
core recipes to trigger the modified behaviour.

[RP: Modified to allow optional usage of DIRFILES]
Signed-off-by: Ronan Le Martret <ronan@fridu.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>