[討論] configure build host target 什麼意思

看板Programming作者 (雲端傳送)時間1年前 (2023/05/20 04:29), 1年前編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
ubuntu x86_64 or linux 若要編譯一包 open source 通常會使用到 ./configure --build=xxx-linux-gnu --host=xxx-linux-gnu --target=xxx-linux-gnu 這裡給出幾個解釋 讓大家真正了解定義 https://sensperiodit.files.wordpress.com/2011/04/hagen-the-definitive-guide-to-gcc-2e-apress-2006.pdf CHAPTER 11 COMPILING GCC P.233 The build system is the machine on which you build GCC; the host system is the machine on which the completed compiler will run; and the target system is the machine for which the compiler will generate code. refer to: GCC source https://ftp.gnu.org/gnu/gcc AR AS LD binutils source https://ftp.gnu.org/gnu/binutils // https://stackoverflow.com/questions/47010422/cross-compilation-terminologies-build-host-and-target I have a PowerPC machine making a compiler that you will run on an x86 machine that will make binaries that run on an ARM. That makes the PPC the build, the x86 the host, and the target is the ARM // https://blog.csdn.net/liufuchun111/article/details/81509651 ./configure --build=i386-linux --host=powerpc-linux --target=powerpc-linux 利用i386-linux(--build)的編譯器對gcc進行編譯 編譯出來的gcc運行在powerpc-linux(--host) 這個gcc用來編譯能夠在powerpc-linux(--target)運行的代碼。 // https://linux.die.net/man/1/config.guess config.guess This script will guess the type of the 'build' machine. // https://github.com/gcc-mirror/gcc/blob/master/config.guess Note: NetBSD doesn't particularly care about the vendor portion of the name. We always set it to "unknown". // EX: ./configure --build=x86_64-unknown-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu build: 編譯 GCC source 與 編譯 AR AS LD source 是在 x86_64 未知製造商的 linux 系統 host: GCC & AR AS LD 在 86_64-linux 執行 hello_world.c 的編譯 target: hello_world 在 CPU 為 arm64 的系統下執行 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 218.187.81.159 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Programming/M.1684528169.A.FBE.html ※ 編輯: feelthat (218.187.81.159 臺灣), 05/20/2023 22:40:13
文章代碼(AID): #1aPzmf-- (Programming)
文章代碼(AID): #1aPzmf-- (Programming)