openssh: disable PIE when building for ARC

Fixes build failure reported here:
http://autobuild.buildroot.net/results/262/26218e028f3d2c77c5192b45154627f08384b688/

uClibc toolchain for ARC doesn't support PIE

Attempt to build anything with "-pie" option lead to linker failure:

arc-buildroot-linux-uclibc-gcc -pie test.c
ld: ../4.8-r3/bin/../arc-buildroot-linux-uclibc/sysroot/usr/lib/crt1.o: warning: unresolvable relocation against symbol `__uClibc_main' from .text section
ld: ../4.8-r3/bin/../lib/gcc/arc-buildroot-linux-uclibc/4.8.0/crtbegin.o: warning: unresolvable relocation against symbol `__deregister_frame_info@@GCC_3.0' from .text section
ld: ../4.8-r3/bin/../lib/gcc/arc-buildroot-linux-uclibc/4.8.0/crtbegin.o: warning: unresolvable relocation against symbol `__deregister_frame_info@@GCC_3.0' from .text section
ld: ../4.8-r3/bin/../lib/gcc/arc-buildroot-linux-uclibc/4.8.0/crtbegin.o: warning: unresolvable relocation against symbol `__register_frame_info@@GCC_3.0' from .text section
ld: ../4.8-r3/bin/../lib/gcc/arc-buildroot-linux-uclibc/4.8.0/crtbegin.o: warning: unresolvable relocation against symbol `__register_frame_info@@GCC_3.0' from .text section

In its turn this behavior confuses configure script of openssh so some options
get set improperly. In particular "strnvis" gets determined as existing which
causes failure during compilation:

log.c:67:25: error: 'VIS_SAFE' undeclared (first use in this function)
 #define LOG_STDERR_VIS (VIS_SAFE|VIS_OCTAL)

With disabled PIE ("--without-pie") openssh gets built without issues.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>

Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Anton Kolesov <akolesov@synopsys.com>
Acked-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
mpd: bump to version 0.18.12

Small bugfixes and improvements, and patches upstreamed.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/libdrm: Bump version to 2.4.56

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
binutils, gdb: support unified binutils-gdb git repository

If Binutils and/or GDB are fetched from the unified binutils-gdb
repository, then the tarball will contain both Binutils and GDB
sources, unlike the "normal" tarballs that contain only the titular
package. To keep packages separated in Buildroot we need to disable
undesired components when configuring.

Binutils and GDB migrated to a common Git repository in the October
2013 [1]. Previous Git repositories were incomplete copies of CVS
repository which copied only the relevant files (no binutils files in
GDB, and vice versa). In the new binutils-gdb repository there is no
such separation and a result all files exist in directory after
checkout. So if "configure" and "make" are used without explicit
targets, all projects will be built: binutils, ld, gas, bfd, opcodes,
gdb, etc. In case of Buildroot this would mean that selecting Binutils
only, still will build both Binutils and GDB.  And if GDB is selected
as well, then both packages will be built two times, and Binutils from
GDB directory will overwrite initial build of Binutils (or vice versa
if Binutils will be built after the GDB). This is a serious problem,
because binutils and GDB use separate branches in this common
repository. In case of Buildroot this means that separate Git commits
(or tags) should be used when downloading source from Git.

This affects only Git repositories, because GNU release tarballs still
contain only relevant packages.

This change is backward compatible, because if "normal" tarball is
used (without extra directories), than --disable-* configure options
are just ignored by configure.

[1] https://sourceware.org/ml/gdb/2013-10/msg00071.html

[Thomas: use variables to factorize options, and add comments in the
relevant .mk files to explain what's going on.]

Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
libiconv: disable building the preloadable library

We were already removing the preloadable iconv library (that can be
used through LD_PRELOAD to override the C library iconv
implementation) from staging/target, but it was still built. And this
causes issues in static only scenarios, so this patch changes that to
not even build/install the preloadable library.

[Thomas: changed Gustavo's patch to take into the fact that we never
need the preloadable library.]

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
gcc-final: disable shared build for static

Disable shared build for host-gcc-final when building for static targets.
We really want static or shared, there's no such thing as "preferring static"
since we can't choose with any degree of granularity for which packages.
And it confuses linking scripts having both available at the same time. Fixes:
http://autobuild.buildroot.net/results/c54/c54bdf88eff6d60c7001cb0e2cb6792cc75178db/

[Thomas: slightly amend the commit to factorize the installation of
static libraries.]

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package infra: revert 0a4bd19f

Revert commit 0a4bd19f4a136930c611027942ce43124a81c5cb
Using --static is not documented and actually breaks static linking
according to my tests.
Fixes:
http://autobuild.buildroot.net/results/327/327c18db4e5d0ddc2c72a4684e103c19a1405e50/
...for external toolchains

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package infra: add -static to C/CXXFLAGS

Generic infra packages might not use LDFLAGS at all so add -static for
static builds to CFLAGS and CXXFLAGS too.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
support/libtool: make -static behave like -all-static

After switching TARGET_LDFLAGS from --static to -static, one issue
appears: from the point of view of libtool, -static only means to link
statically against the 'uninstalled libtool libraries' (i.e the
libraries that libtool has built in the current package), but
otherwise links dynamically with the other libraries. To really get a
completely static build, you need to pass -all-static to
libtool. Unfortunately, -all-static is only a valid option for
libtool, not as a general LDFLAGS, so we cannot to TARGET_LDFLAGS =
-all-static without breaking virtually all packages.

As pointed out 10 years ago on the libtool mailing list, the current
naming of the options is very confusing and the source of issues, and
there was a proposal to change -static to have the behavior of
-all-static, and instead introduce a separate -lt-static to have the
current behavior of -static. But that never got merged, because it was
breaking the current behavior. See:

  http://lists.gnu.org/archive/html/libtool/2004-11/msg00017.html

However, in Buildroot, when we pass -static, we really mean it, and we
want a completely static build. Therefore, this patch adapts our
ltmain.sh patches so that they alter the behavior of -static to make
it work like -all-static. The changes are small and quite easy to
understand, and have been tested to work fine with a small selection
of packages.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
polarssl: disable microblaze inline assembly

Fixes:
http://autobuild.buildroot.net/results/4d5/4d54958ded61a0d929d992e4ca0bb31c996953cb/

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
bind: fix static openssl linking

Apparently LIBS (environment) isn't pushed to LIBS (autoconf) for the
tests, hence when static linking openssl it misses libz and assumes some
basic digests required for ecdsa support are missing, which is false. Fixes:
http://autobuild.buildroot.net/results/204/20411901d1bc6811e1ef8fa39457257d6bf1a146/

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>