chicken: fix build options
chicken: fix build options

* Move the CHICKEN build options to the corresponding
  EXTRA_OEMAKE command lines (to avoid exporting them).

* Set C_COMPILER_OPTIONS: that's required because the C compiler
  was not getting the proper flags.  The C_COMPILER variable is
  supposed to be assigned the compiler binary _only_.  Yocto
  actually assign CC the compiler binary plus a bunch of
  parameters.  Thus, CC can't be used by CHICKEN because it
  shells out C_COMPILER.  We then resort to assigning C_COMPILER
  the C compiler binary only (${TARGET_PREFIX}gcc for target and
  ${HOST_PREFIX}gcc for cross) and set C_COMPILER_OPTIONS with
  the default option used by CHICKEN plus ${TUNE_CCARGS} and
  ${TARGET_CFLAGS} (we had to copy the C_COMPILER_OPTIONS used by
  CHICKEN into the recipe, since CHICKEN does not provide a way
  to append flags to that variable).

  All this dance was necessary because binaries were not getting
  linked against the right dynamic linker.  The dynamic linker is
  determined according to the -mfloat value, and that flag was
  not being passed to the CHICKEN build system.  So, on iMX6 for
  example, -mfloat=hard was not hitting C_COMPILER_OPTIONS, which
  was making binaries be linked against /lib/ld-linux.so.3 which
  was not in the image (the installed dynamic linker for that
  platform is /lib/ld-linux-armhf.so.3).

* Set LINKER_OPTIONS, for the same reason why we set
  C_COMPILER_OPTIONS (i.e., to pass -mfloat to the CHICKEN build
  system).

Signed-off-by: Mario Domenech Goulart <addb47291ee169f330801ce73520b96f2eaf20ea@ossystems.com.br>

OSSystems/meta-chicken,OSSystems/meta-chicken,OSSystems/meta-chicken