Cross Compiler 是一種編譯器,可讓開發人員在一種架構上開發軟體並在不同的架構上執行。



Cross Compiler 是一種編譯器,可讓開發人員在一種架構上開發軟體並在不同的架構上執行。通常在開發應用程式時,開發人員會使用編譯器將原始碼轉換為可執行的機器碼,而這些編譯器只能在特定的平台上運行。

然而,當需要將應用程式移植到其他平台時,就需要使用 Cross Compiler 來進行編譯。Cross Compiler 可以在開發人員的開發平台上運行,但可以生成在目標平台上運行的機器碼。

舉例來說,假設開發人員在 x86 架構上開發了一個應用程式,但想要在 ARM 架構上執行該應用程式。因為這兩個架構有不同的指令集,所以需要使用 ARM 架構上的 Cross Compiler 來編譯該應用程式,生成可以在 ARM 架構上運行的機器碼。

Cross Compiler 在嵌入式系統和跨平台應用程式開發中非常常見。


wiki:Cross compiler A cross compiler is a compiler capable of creating executable code for a platform other than the one on which the compiler is run. Cross compiler tools are generally found in use to generate compiles for embedded system or multiple platforms. 

It is a tool that one must use for a platform where it is inconvenient or impossible to compile on that platform, like microcontrollers that run with a minimal amount of memory for their own purpose. 

It has become more common to use this tool for paravirtualization where a system may have one or more platforms in use.

 -- Building a cross compiler manually 

1. Build binary utilities 
2. Build bootstrap compiler without glibc 
3. Build C library 
4. Rebuild compiler with glibc

 -- 例如為了讓一般的C/C++的程式可以在不同的機器平台上執行, 
所以需要cross compiler將C/C++程式編譯成不同格式的執行檔。

 而要如何安裝可以參考 安裝cross compiler (toolchain) 


留言

Google Search

推薦內容橫式

本月熱門文章

什麼是 OTA ?

[失戀歌單] 陳奕迅/林夕 <想哭> - 若無其事原來是最狠的報復

內政部也來辦聯誼 單身聯誼不厭券 內政部109年單身聯誼活動

【直擊】新北國王聖誕週:從福和管弦的磅礡氣勢到全恩菲、曼萍的女神魅力,打造職籃最頂視覺聽覺饗宴!

轉錄 女神變黃金剩女只因「太難追」? 這些30+女星貌美如花卻仍然單身

[裝修百科] 鐵工師傅 公寓陽台安裝防盜鐵窗紀錄

Taiwan CPBL team Rakuten Monkeys Quick Guide

半澤直樹兩主角 堺雅人 香川照之 搞笑體驗銀行生活

新北市板橋區私立寶仁幼兒園負責人褚家雯 園長彭瑞君 還有經營那些教育機構?

這個網誌中的熱門文章

Android應用開發豆知識:利用 adb 安裝 apk 到裝置上

Android 中文輸入法 官方版 ! Gboard - Google 鍵盤 開始支援注音輸入啦

Google Play 推薦Android app 誠徵App排行榜

北京故宮首訪,一窺清宮秘史 大玉兒 & 甄嬛

[家教][社會觀察] 建中教我的事 沒上建中被父母親折磨? 在建中到底是如何 ...

[FAANG面試] Amazon/AWS 領導力準則 14 Amazon Leadership Principles

[品質控制] 什麼是Sanity test ? 軟體測試常見名詞整理 包含不同部門的測試人員負責範圍

Acer ICONIA Smart S300 更新後越來越好 Acer也有出手機?!

新鮮人找工作:職場名詞解釋 AE FAE Pre-sales Post-sales