cpan_build: Fix cmaker Build.PL module builds

Certain cpan Build.PL based modules were failing to build due to
the host's config information being used instead of the targets.

This patch sets the appropriate variables to ensure the modules
get the correct configuration from the target config_heavy.pl script.

It also ensures the linker is CCLD, not LD since the LDFLAGS contain
-Wl,XXX options and build failures result if LD is used.

libencode-detect-perl is a module which tests this class extensively.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
perl-native: Add errno_ver.diff patch to native perl

Apply the errno_ver.diff patch to the native perl version. This ensures that when
we're building target modules, running the native perl binary but in a target
configuration we don't see error messages.

libencode-detect-perl is a module which tests this.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
perl: Add dyanloader build hack

Patch perl to allow builds to work where a native perl running against target modules
attempts to load a dynamic binary module. We assume that a native version of the
module exists as it would for the target and perform an appropriate path
substitution.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
perl-rprovides: Fix perl-module-config anf perl-module-build providers

The rearrangement of various file contents left these empty modules which
don't get packaged and hence lead to image creation errors on anything using
them. This patch ensures the dependencies are attached to the packages
which contain the config files or the build module infrastructure as
appropriate. It also resolves some confusion over whether the name is
perl-module-build or perl-module-module-build, the latter being the
autogenerated dependency which previously couldn't be found.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
gcc: Enable OpenMP compiling and library

Multicore embedded systems are getting more and more common.

Remove "--disable-openmp" from the GCC configuration options and
always build libgomp. This only creates a "bigger" compiler but
has no effect on the compiled binaries that don't use openmp.

Tested a clean build on mips32el and arm7a, no problems encountered.

Autoconf will not detect OpenMP after this change, because it will
build and run a target binary on the build system. In order to use
OpenMP, the variable ac_cv_prog_c_openmp=-fopenmp must be set.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
sanity.bbclass: Ensure tmpdir exists when running the check

This avoids tracebacks from bitbake if the directory doesn't already
exist.

[YOCTO #3640]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
packagedata: Add warnings if multiple recipes try to write the same package

If multiple recipes try and write the same package it resulted in a
rather confusing traceback and unintuitive error. This patch
prints a human readable error instead.

[YOCTO #3645]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
perl-native: update to 5.14.3:

There is a securty issue:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-5195
Update perl to 5.14.3 could resolve this problem. And update perl-native
first.

Signed-off-by: Kang Kai <kai.kang@windriver.com>
perl: update to 5.14.3

There is a securty issue:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-5195
Update perl to 5.14.3 to resolve this problem.

Patches hurd-ccflags.diff, h2ph-multiarch.diff, index-tainting.diff and
hurd-hints.diff have been merged, so remove them from SRC_URI.
Update patches config.sh and Makefile.SH.patch with new PV.

[Yocto 3701]

Signed-off-by: Kang Kai <kai.kang@windriver.com>