[oi-dev] Specifying GCC as a compiler in a Makefile for simple library

Alexander Pyhalov alp at rsu.ru
Mon May 16 07:16:45 UTC 2016


On 05/16/2016 09:33, Denys Rtveliashvili wrote:
>
> Unfortunately CC = gcc did not work.
> I figured it out at last. The correct incantation is:
>
> COMPONENT_BUILD_ARGS += CC=gcc
>

Hi.
Usually you have to do something like
COMPONENT_BUILD_ENV += CC="$(CC)"
COMPONENT_BUILD_ENV += CFLAGS="$(CFLAGS)"


note, CC="$(CC)" will ensure that correct gcc is used, as gcc symlinks 
are mediated and you can't rely on gcc in oi-userland Makefiles (it can 
be anything starting from 3.4 to 5.3).

-- 
Best regards,
Alexander Pyhalov,
system administrator of Southern Federal University IT department




More information about the oi-dev mailing list