package/yajl: fix build when explicit link with libm is needed
authorSamuel Martin <s.martin49@gmail.com>
Sun, 24 Apr 2016 18:29:38 +0000 (20:29 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 24 Apr 2016 21:26:34 +0000 (23:26 +0200)
commit302563539dacb284576a443401cdfd061eb2e1e8
treec676f914e023083b36da9509a68a11d123fd424e
parent31294a5cb1f5ab2120c153303482267a2e600413
package/yajl: fix build when explicit link with libm is needed

This change adds another fix to the yajl build-system code.
This patch checks for isnan function in libc, and if not, it makes sure
libm is passed to the linker flags.

This change fixes build failure looking like:

  make[3]: Entering directory `/home/peko/autobuild/instance-2/output/build/yajl-2.1.0'
  [ 81%] Building C object example/CMakeFiles/parse_config.dir/parse_config.c.o
  ../yajl-2.1.0/lib/libyajl.so.2.1.0: undefined reference to `__isnan'
  ../yajl-2.1.0/lib/libyajl.so.2.1.0: undefined reference to `__isinf'
  collect2: error: ld returned 1 exit status
  make[3]: *** [verify/json_verify] Error 1

Fixes:
  http://autobuild.buildroot.org/results/312/31268e4d20aa34bb90c09aa771b1923f979578ab/
  and many others

Cc: Benoît Mauduit <bmauduit@beneth.fr>
Cc: Bernd Kuhls <bernd.kuhls@t-online.de>
Cc: Jörg Krause <joerg.krause@embedded.rocks>
Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Tested-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/yajl/0004-Link-libyajl-_s-with-libm-when-isnan-is-not-brought-.patch [new file with mode: 0644]