batman-adv-devel: Add missing TARGET_* flags to batctl compile

The compilation step of batctl completely dropped the TARGET_CFLAGS,
TARGET_CPPFLAGS and TARGET_LDFLAGS and therefore weren't compiled and linked
with the flags given by the OpenWRT build environment.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
batman-adv-devel: Don't overwrite batctl's CFLAGS

The batctl makefile has CFLAGS which change the behavior of the compiler. This
includes important things like the C-dialect used or whether the compiler can
ignore aliasing problems during the optimization step.

The OpenWRT build environment should not overwrite these settings without a
good reason. Most of these reasons can probably directly be fixed upstream.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
batman-adv-devel: Remove unused parameters from MAKE_BATCTL_ARGS

The NODEBUG, UNAME and STRIP parameter aren't used in batctl's Makefile.
Removing them should be safe.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
batman-adv-devel: Use section garbage collection to reduce binary size

The linker can identify unused sections of a binary when each symbol is stored
in a separate section. This mostly removes unused linker sections and reduces
the size by ~3% on mipsel.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
batman-adv-devel: Enable Link-time optimization

Link-time optimization allows to move parts of the optimization from the single
source file to the global source view. This is done by emitting the GIMPLE
representation in each object file and analyzing it again during the link step.

This reduces the binary size by around 6% on mipsel (this includes parts which
were also removed by garbage collection).

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Merge http://git.open-mesh.org/openwrt-feed-batman-adv into HEAD
[ffulm] upgraded to latest batman-adv
[ffulm] upgraded to latest batctl
[ffulm] fixed a build problem in batman-adv

I'm not sure why these flags did not work. Removing them all solves the problem.