nftables: fix build in static scenarios

When linking against readline, it forgets to link against ncurses,
which is needed by readline. Fix this by passing LIBS="-lcurses" to
the configure script.

Fixes:

  http://autobuild.buildroot.org/results/98b/98b707ffdeeb1cda94b7c1019ef29cf5fd7db8bf/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
libnftnl: add patch to avoid symbol conflict

When ELF binaries and shared libraries are used, the internal
functions of libnftnl such as xfree() are not visible to the outside
world (their visibility is 'hidden'). Therefore, the fact that other
programs (especially nftables) may have symbols with the same name
does not cause any problem.

However, when doing static linking on a non-ELF platform (such as
Blackfin, which uses the FLAT binary format), there is no way of
encoding this visibility. Therefore, the xfree() symbols of libnftnl
becomes visible to the outside world, causing a conflict with the
xfree() symbol defined by nftables.

To solve this, this patch renames the libnftnl xfree() function to
libnftnl_xfree().

This commit fixes a problem seen after building nftables statically on
Blackfin. This problem was seen after the previous patch fixing the
autobuilder failure:

  http://autobuild.buildroot.org/results/98b/98b707ffdeeb1cda94b7c1019ef29cf5fd7db8bf/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
configs/{atngw100, atstk100x}: fix build of AVR32 defconfigs

Since we marked the AVR32 architecture deprecated, it can no longer be
selected in a normal configuration. This has caused the AVR32
defconfigs to fail to build in our daily Jenkins tests. In order to
make them build again, they must use BR2_DEPRECATED=y. Of course, when
we remove AVR32 completely, we'll remove those defconfigs as well.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
gcc/4.7: add patch to enable more C++ features with uClibc

This commit fixes bug #7250, by allowing more libstdc++ features to be
enabled with uClibc. libstdc++ wants an absolutely complete C99
support in the C library before enabling *any* feature that needs some
C99 functions. However, uClibc doesn't provide C99 complex numbers, so
libstdc++ disables a lot of C++ standard methods, even though they are
not related to C99 complex numbers.

A partial solution already existed in the patch
302-c99-snprintf.patch, but this commit replaces it by the more
complete 850-libstdcxx-uclibc-c99.patch, which is highly inspired by
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58393, except that it
doesn't rely on configure.ac checks, but simply on testing
defined(__UCLIBC__) like was done in 302-c99-snprintf.patch. This
allows to avoid having to autoreconf gcc, which is quite complicated
to achieve.

Reported-by: Richard <tarka.t.otter@gmail.com>
Cc: Richard <tarka.t.otter@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
gcc/4.8: add patch to enable more C++ features with uClibc

This commit fixes bug #7250, by allowing more libstdc++ features to be
enabled with uClibc. libstdc++ wants an absolutely complete C99
support in the C library before enabling *any* feature that needs some
C99 functions. However, uClibc doesn't provide C99 complex numbers, so
libstdc++ disables a lot of C++ standard methods, even though they are
not related to C99 complex numbers.

A partial solution already existed in the patch
302-c99-snprintf.patch, but this commit replaces it by the more
complete 850-libstdcxx-uclibc-c99.patch, which is highly inspired by
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58393, except that it
doesn't rely on configure.ac checks, but simply on testing
defined(__UCLIBC__) like was done in 302-c99-snprintf.patch. This
allows to avoid having to autoreconf gcc, which is quite complicated
to achieve.

Reported-by: Richard <tarka.t.otter@gmail.com>
Cc: Richard <tarka.t.otter@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
gcc/4.9: add patch to enable more C++ features with uClibc

This commit fixes bug #7250, by allowing more libstdc++ features to be
enabled with uClibc. libstdc++ wants an absolutely complete C99
support in the C library before enabling *any* feature that needs some
C99 functions. However, uClibc doesn't provide C99 complex numbers, so
libstdc++ disables a lot of C++ standard methods, even though they are
not related to C99 complex numbers.

A partial solution already existed in the patch
302-c99-snprintf.patch, but this commit replaces it by the more
complete 850-libstdcxx-uclibc-c99.patch, which is highly inspired by
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58393, except that it
doesn't rely on configure.ac checks, but simply on testing
defined(__UCLIBC__) like was done in 302-c99-snprintf.patch. This
allows to avoid having to autoreconf gcc, which is quite complicated
to achieve.

Reported-by: Richard <tarka.t.otter@gmail.com>
Cc: Richard <tarka.t.otter@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
gcc/arc-4.8-R3: add patch to enable more C++ features with uClibc

This commit fixes bug #7250, by allowing more libstdc++ features to be
enabled with uClibc. libstdc++ wants an absolutely complete C99
support in the C library before enabling *any* feature that needs some
C99 functions. However, uClibc doesn't provide C99 complex numbers, so
libstdc++ disables a lot of C++ standard methods, even though they are
not related to C99 complex numbers.

A partial solution already existed in the patch
302-c99-snprintf.patch, but this commit replaces it by the more
complete 850-libstdcxx-uclibc-c99.patch, which is highly inspired by
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58393, except that it
doesn't rely on configure.ac checks, but simply on testing
defined(__UCLIBC__) like was done in 302-c99-snprintf.patch. This
allows to avoid having to autoreconf gcc, which is quite complicated
to achieve.

Reported-by: Richard <tarka.t.otter@gmail.com>
Cc: Richard <tarka.t.otter@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
gcc/4.7: fix C++ exceptions and pthread_exit()

Following the introduction of the support for the musl C library, the
support of C++ exceptions or features like pthread_exit() got broken
even with other libraries such as glibc. This was reported as bug #7028.

The problem was caused by the gcc patch needed to add support for
musl, which modified the libgcc/unwind-dw2-fde-dip.c logic to decide
whether USE_PT_GNU_EH_FRAME should be enabled or not. It completely
removed the existing logic, replacing it by a single logic based on
the definition of TARGET_DL_ITERATE_PHDR. However, this constant gets
defined by the configure script only for Solaris, or Linux Musl
platforms. For glibc/uClibc, the configure script does not define it,
and therefore USE_PT_GNU_EH_FRAME is not defined, causing issues with
exception handling.

This patch fixes that by restoring all the logic of
libgcc/unwind-dw2-fde-dip.c, and just adding the musl logic as one
more case.

It has been successfully runtime tested using the two code examples
provided in bug #7208, with uClibc, musl and glibc.

Cc: Krzysztof Wrzalik <kwrzalik@gmail.com>
Cc: David Bachelart <david.bachelart@bbright.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
gcc/4.8: fix C++ exceptions and pthread_exit()

Following the introduction of the support for the musl C library, the
support of C++ exceptions or features like pthread_exit() got broken
even with other libraries such as glibc. This was reported as bug #7028.

The problem was caused by the gcc patch needed to add support for
musl, which modified the libgcc/unwind-dw2-fde-dip.c logic to decide
whether USE_PT_GNU_EH_FRAME should be enabled or not. It completely
removed the existing logic, replacing it by a single logic based on
the definition of TARGET_DL_ITERATE_PHDR. However, this constant gets
defined by the configure script only for Solaris, or Linux Musl
platforms. For glibc/uClibc, the configure script does not define it,
and therefore USE_PT_GNU_EH_FRAME is not defined, causing issues with
exception handling.

This patch fixes that by restoring all the logic of
libgcc/unwind-dw2-fde-dip.c, and just adding the musl logic as one
more case.

It has been successfully runtime tested using the two code examples
provided in bug #7208, with uClibc, musl and glibc.

Cc: Krzysztof Wrzalik <kwrzalik@gmail.com>
Cc: David Bachelart <david.bachelart@bbright.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
gcc/4.9: fix C++ exceptions and pthread_exit()

Following the introduction of the support for the musl C library, the
support of C++ exceptions or features like pthread_exit() got broken
even with other libraries such as glibc. This was reported as bug #7028.

The problem was caused by the gcc patch needed to add support for
musl, which modified the libgcc/unwind-dw2-fde-dip.c logic to decide
whether USE_PT_GNU_EH_FRAME should be enabled or not. It completely
removed the existing logic, replacing it by a single logic based on
the definition of TARGET_DL_ITERATE_PHDR. However, this constant gets
defined by the configure script only for Solaris, or Linux Musl
platforms. For glibc/uClibc, the configure script does not define it,
and therefore USE_PT_GNU_EH_FRAME is not defined, causing issues with
exception handling.

This patch fixes that by restoring all the logic of
libgcc/unwind-dw2-fde-dip.c, and just adding the musl logic as one
more case.

It has been successfully runtime tested using the two code examples
provided in bug #7208, with uClibc, musl and glibc.

Cc: Krzysztof Wrzalik <kwrzalik@gmail.com>
Cc: David Bachelart <david.bachelart@bbright.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
CHANGES: update with recent changes

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
npe-firmware: new package

Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net>
apex: new bootloader

Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net>
configs: add nslu2_defconfig

Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net>
todo