According to this,
https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling
, you just need to set a few more variables for cross compilation.

In the old days, that could be done in the ebuild *.mk files under
build-data and build-root. However, I believe ebuild was optimized for
autotools, and I have not studied what has changed since cmake was
instituted. Anyway, the magic originates in build-root/Makefile (unless
some newer techniques are available.)

Burt

On Wed, Dec 19, 2018 at 10:40 AM Andrew Pinski <pins...@gmail.com> wrote:

> On Wed, Dec 19, 2018 at 8:54 AM Damjan Marion via Lists.Fd.Io
> <dmarion=me....@lists.fd.io> wrote:
> >
> > i
> >
> > On 19 Dec 2018, at 14:00, Saxena, Nitin <nitin.sax...@cavium.com> wrote:
> >
> > Hi Damjan,
> >
> > >>Somebody needs to spend a bit of time to teach CMake how to properly
> cross-compile....
> >
> > Correct me if I am wrong but I think cross-compilation support was there
> before CMake transition.
> >
> > I guess so, never used it...
>
> I am still disappointed moving away from autotools.  CMake has too
> much junk science of getting it right; autotools just work for all of
> these special cases.
> Yes it is a bit slower to build with autotools but it makes cross
> compiling and debugging what is going wrong with the build easier.
>
> >
> > Also I am not finding capability to link VPP with externally compiled
> dpdk? Am I correct or missing anything
> >
> > You can just specify -DCMAKE_INSTALL_PREFIX:PATH=..... to the tree where
> dpdk tree is.
> > That is what we do today with /opt/vpp/external/$(uname -m)/
>
> Also it makes help messages from configure easier to find the needed
> options including but not limited to the above.  Having reading cmake
> files in the past and autoconfig files, the autoconf is easier to
> understand and understand how it works.  Also autoconf is standard,
> while cmake is very much unstandardized when it comes to finding
> headers, etc.  You need to pull in a library, here have a weird cmake
> file which might or might not work.
>
> Thanks,
> Andrew Pinski
>
> >
> > --
> > Damjan
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> >
> > View/Reply Online (#11694): https://lists.fd.io/g/vpp-dev/message/11694
> > Mute This Topic: https://lists.fd.io/mt/28800506/912176
> > Group Owner: vpp-dev+ow...@lists.fd.io
> > Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [pins...@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
>
> View/Reply Online (#11695): https://lists.fd.io/g/vpp-dev/message/11695
> Mute This Topic: https://lists.fd.io/mt/28800506/541103
> Group Owner: vpp-dev+ow...@lists.fd.io
> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [bur...@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#11696): https://lists.fd.io/g/vpp-dev/message/11696
Mute This Topic: https://lists.fd.io/mt/28800506/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to