Building 32bit and 64bit applications at the same time

Dear all,

I need to run 32bits and 64bits applications on targets at the same time, so how can I specify dedicates target for each package in OpenWRT?

I don't mean to produce different cross-toolchain for different applications, can I just simply specify the different target in the Makefile of each application?

For example, if target=32bit, it will produce 32bit binaries, or it will produce 64bit binaries.

Thanks and Regards

Yes, sure. Probably needs something like TARGET_CFLAGS += $(if $(TARGET_x86_64,-m64,-m32)

Actual details depend on your packages, targets etc. though.

Thanks, jow,

What I'm going to do is put both 32bit and 64bit libraries on the target at runtime, for example, /lib32 for 32bit libraries and /lib64 for 64bit libraries.

Thanks and Regards

hello, jackysteps:
could you show me how corss-compile the 32 bits app for the 64bits machine in openwrt .my machine is the mt7622 ,which is a 64 bits cpu.
looking for your responses!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.