configure “--prefix” option for cross compiling

前端 未结 2 579
难免孤独
难免孤独 2021-02-14 10:37

Which path should I pass to the --prefix option when doing cross compiling: should I specify the path on my build machine or the path on the target platform?

<
2条回答
  •  醉梦人生
    2021-02-14 10:46

    As you may found:

    --prefix=dirname Specify the toplevel installation directory. This is the recommended way to install the tools into a directory other than the default. The toplevel installation directory defaults to /usr/local.

    As far as I understand you are trying to compile a compiler for some target.

    In this case prefix will specify directory when the compiler will be installed after make install command on build machine. After it you can take a compiler there.

    . Should I use --prefix=/home/me/arm/build/target_fs/usr or just --prefix=/usr and then make install DESTDIR=/home/me/arm/build/target_fs?

    In your case prefix command have no sense. Because you are copy binaries by hands.

    Also you can find all other info on GCC official site: https://gcc.gnu.org/install/finalinstall.html

提交回复
热议问题