[LEDE-DEV] -mcpu export

Dragan Stancevic ds at codeminutia.com
Sun May 13 09:56:58 PDT 2018


On 05/13/2018 10:14 AM, Dragan Stancevic wrote:
> Morning,
> 
> trying to port a utility to openwrt and I would like to capture the
> global make file -mcpu parameter export to use as a config variable.
> 
> 
> I tried using "$(ARCH)" and "$(OPTIMIZE_FOR_CPU)" but that is only
> producing "arm" and not a more specific sub type such as "cortex-a8"
> that comes from the "-mcpu=cortex-a8" parameter.

Well I just figured it out after a lot more digging, so in case anyone
else wonders in the future. There is a variable $(CONFIG_CPU_TYPE) that
contains both CPU and FPU, to get -mcpu= paramer equivalent you can just
do this:

MYCPU:=$(firstword $(subst +, ,$(CONFIG_CPU_TYPE)))



-- 
Home Based Linux SW-Engr Jobs @
http://codeminutia.com



More information about the Lede-dev mailing list