Makefile.in: add CPPFLAGS support
support: libtool-{1.5,2.2,2.4}: cleanup rpath

Ensure the build directory does not appear in the rpath.
cmake: bump to version 2.8.8
cmake: add patch removing duplicates in rpath.
pkg-cmake.mk: cleanup rpath
readline: cleanup rpath in of the target libraries
Convert gettext to autotargets

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Samuel MARTIN <s.martin49@gmail.com>
gettext: get rid of LIBINTL stuff

The AUTOTARGET conversion of gettext introduces some changes:
- the target 'gettext' now builds and installs libintl if locale
  support is enabled. The target 'libintl' no longer exists, so the
  libintl dependency is no longer needed;
- the gettext binaries (usr/bin/gettext{,.sh,ize}), formerly installed
  together with 'libintl', are now installed together with 'gettext'.
  Because the gettext binaries have a rather small footprints, they
  are now alway installed together with 'gettext'.

This patch does:
- update the gettext package;
- warn about libintl availability depending on the locale support
  enabled in the toolchain;
- cleanup all remaining  gettext/libintl dependencies;
- fix/cleanup some BR2_NEEDS_GETTEXT/BR2_NEEDS_GETTEXT_IF_LOCALE
  dependencies.
relocatable SDK: add todo
Makefile: add show-host-rpath target

The show-host-rpath target search the host subtree, except the staging one
and the external toolchain location, for elf files dynamically linked and
displays their rpath, emphazing non-relocatable binary.

Also, add some variables to make things non-harcoded:
- ext-tool.mk: set TOOLCHAIN_EXTERNAL_SUBDIR to opt/ext-toolchain
- pkg-utils.mk: declare ADJUST_RPATH_DIR_FILTER
package: add chrpath (host package only)
Add chrpath to BASE_TARGET.

Add a new variable BASE_HOST_TARGET, which stores host packages required
before building any toolchain.

So, BASE_HOST_TARGET records the host-chrpath dependency, as well as the
optional host-ccache one.

Of course, BASE_TARGET includes every targets recorded in BASE_HOST_TARGET.

Note: For building Crosstool-NG toolchain, the dependencies contained in
BASE_HOST_TARGET must be built before all other Crosstool-NG's
dependencies.
pkg-utils.mk: add ADJUST_RPATH helper

This helper fixes rpath in binary files using chrpath.

Also, in Makefile.in:
- add/set HOST_RPATH_PREFIX_DEFAULT to X
- update the HOST_LDFLAGS definition using this HOST_RPATH_PREFIX_DEFAULT
  variable
package: add RPATH fixing infrastructure

The RPATH fixing infrastructure can only be triggered if the package being
built is a host package.

The infrastructure provides some knobs that allows to:
- skip the rpath fix step: $(PKG)_FIX_RPATH = YES|NO;
- override the per-package rpath prefix for the post-configure fix, in
  such case, escaping make and shell '$' may be quite a challenge:
  $(PGK)_RPATH_PREFIX = <any string escaping '$'>;
- use the post-link rpath fix instead of the post-configure one:
  $(PKG)_FIX_RPATH_POST_BUILD = YES|NO.

Rpath fixing methods:

* Post-configure

In this case, the goal is substiting the rpath value in the Makefiles after
the configure phase of the package.
This way, the linker will automatically and correctly set the rpath value
in the binary (no extra step in the build)
The substitution is done after the configure scripts have been run to
avoid having to escape the '$' character for both configure scripts (most
of the time written in shell), and makefiles.

This method should be recommended if the $(PGK)_RPATH_PREFIX is easily
found.

* Post-link

Here, the strategy is to set the rpath value at configure time to something
constant-proof to the configure scripts and makefiles, at least as long as
the final value of the rpath we want a the binary, and something identified
as an invalid rpath.
Then, the package is built and installed with this invalid rpath and the
rpath fix is done by post-install hook on the installed binaries
themselves.

Whatever the used method, infrastructure knobs, dependencies and hooks are
automatically set to their defaults if they are not override by the package
itself.
makedevs: make host binary relocatable
toolchain: add call to ADJUST_RPATH after each host install step
pkg-cmaketargets.mk: make toolchainfile.cmake fully relocatable
Make external toolchain relocatable

The external toolchain wrapper sets sysroot etc. to an absolute path.
By changing this to a relative path, it is possible to move the host
directory to a different location and still have a working build
system.

This only works for a downloaded external toolchain.  For a pre-installed
external toolchain, it is possible to move the host directory to a
different location, but not the external toolchain directory (it does work
if the external toolchain directory lies within the host directory).  For
an internal or crosstool-ng toolchain, there is no wrapper so updating the
sysroot path should be done in a different way.

See http://lists.busybox.net/pipermail/buildroot/2012-February/050371.html
for information about others things to do to make the host directory
relocatable.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
automake: disable rpath fix step

Automake only install perl scripts, so in this case, fixing rpath is
unneeded.
pkg-utils: fix ADJUST_RPATH