libnspr: use __nios2__ instead of nios2
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 6 Apr 2017 07:25:36 +0000 (09:25 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 6 Apr 2017 14:13:52 +0000 (16:13 +0200)
commit9a521546ed553d2be23740bbf1a7aa05bce9eb09
treeb131a6c6374fb37e4f2287d085375c176fe54785
parent7039c4d456259ca2c2708be16ebea98a82adee3f
libnspr: use __nios2__ instead of nios2

Our patch adding nios2 support to libnspr uses the built-in compiler
define "nios2". However, this doesn't work with C++11, where only the
__nios2__ define is available. Since __nios2__ is always available,
use that instead:

$ ./output/host/usr/bin/nios2-linux-gcc -dM -E - < /dev/null | grep -E "( nios2 | __nios2__ )"

$ ./output/host/usr/bin/nios2-linux-gcc -std=c++11 -x c++ -dM -E - < /dev/null | grep -E "( nios2 | __nios2__ )"

Patch 0001-nios2.patch is therefore changed to use __nios2__ (the rest
of the change noise is due to using quilt to format the patch). Patch
0002-microblaze.patch is simply updated to apply correctly on top of
the modified 0001-nios2.patch.

This fixes the build of the poppler library on nios2. It is built with
-std=c++11, and includes nspr headers (through nss), causing a build
issue.

Fixes:

  http://autobuild.buildroot.net/results/9fee58076157d814616fa0da51afde8da21a8973/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/libnspr/0001-nios2.patch
package/libnspr/0002-microblaze.patch