Skip to contentSkip to conversation

How to use the native package?

DISCUSSION 代尔欣 3 participants 3 messages May 20, 2009

lore
Share & tools
lore

代尔欣

author
#0 lore raw

Hi all,
Is it the right place to ask? I have a question about the OE compile.
Hope I can tell you the case clearly.
I have a package. Let's say it "mypackage". The compile process is:

When make "mypackage", it will generate a intermedia tool. Let's call it mytools.bin through Makefile.

%.c: %.tmp

    ./mytools.bin $< > $@

Then it will use mytools.bin generate some c files. Using those generated c files compile out the final bin file.

"./mytools.bin" is reasonable. Because mytools.bin is generated by the source codes locally. But in OE, a target version compiled, and can't run on host machine.

From above process, mypackage depends on mypackage-native. I can write a mypackage-native.bb and generate the mytools.bin and place it into staging folder. mytools.bin can run on my host machine but how can I use it when compile mypackage.bb? Note the Makefile is using "./mytools.bin", it always look for the current folder one.

I can hack to use native mytools.bin. I want to know the normal way in OE treat this case.

Thanks!

#1 lore raw
Quoted 2 lines · On Wednesday 20 May 2009 10:59:29 代尔欣 wrote:

I can hack to use native mytools.bin. I want to know the normal way in OE treat this case.

It's a package bug in first place. There is quite a number of packages in OE that build some temporary (not included in installation) tools in process and use them for some purposes. But if the package is done properly, that tools are never compiled by cross-compiler. So, IMHO, this should be fixed in package. And how to do that depends on package build system, of course. If that's some custom make, then BUILD_CC should be your friend, I guess.

#2 lore raw
In reply to 代尔欣

Dnia środa, 20 maja 2009 o 08:59:29 代尔欣 napisał(a):

Quoted 5 lines

Hi all,
Is it the right place to ask? I have a question about the OE
compile. Hope I can tell you the case clearly.
I have a package. Let's say it "mypackage". The compile process is:

Quoted 8 lines

When make "mypackage", it will generate a intermedia tool. Let's call it mytools.bin through Makefile.

%.c: %.tmp

    ./mytools.bin $< > $@

Then it will use mytools.bin generate some c files. Using those generated c files compile out the final bin file.

I would hack^Wpatch makefile to build "mytools.bin" as host binary.

Regards,

Signature · 3 lines
JID:      [email protected]
Website:  http://marcin.juszkiewicz.com.pl/
LinkedIn: http://www.linkedin.com/in/marcinjuszkiewicz