Cross-compile: How to install with one prefix, and deploy with a different prefix?

后端 未结 2 1956
一整个雨季
一整个雨季 2021-02-14 00:47

I\'m trying to cross-compile some applications for an alternative architecture.

My typical procedure is as follows:

  1. Download and untar source into /var/sou
2条回答
  •  说谎
    说谎 (楼主)
    2021-02-14 01:34

    If I understand correctly, /var/install on your x86 system will be / on your alternative architecture. To solve your issue, you need to modify the following step:

    • configure will certainly do some sed in file, so you need to specify the final place

      ./configure --prefix=/ CC=[my-cross-compiler-gcc]

    • makefile generated by automake have support of variable DESTDIR which is prepended to the installation path:

      make DESTDIR=/var/install install

提交回复
热议问题