我想使用clang將httpd編譯爲LLVM字節碼。首先,我嘗試使用GCC,爲此,我做了以下編譯它:使用clang將Apache httpd編譯爲LLVM字節碼
./configure --prefix=/home/varun/apache/httpd/gcc --with-included-apr
make
sudo make install
併成功安裝!現在
,我嘗試用鏗鏘編譯它,因爲我做到以下幾點:
CC="clang" CFLAGS="-O4" ./configure --prefix=/home/varun/apache/httpd/clang --with-included-apr
make # didn't come to this step
sudo make install # didn't come to this step
而且,本身出現故障的配置。我選擇-O4,因爲我讀LLVM輸出字節碼如果您使用-O4或-emit-llvm作爲CFLAGS(他們都不工作)。
這是錯誤我得到:
checking whether the C compiler works... no
configure: error: in `/home/varun/apache/httpd/httpd-2.4.3/srclib/apr':
configure: error: C compiler cannot create executables
這是關係到鏈接器不能夠LLVM的字節碼文件鏈接?
謝謝@雷牟,編輯問題。我應該適當地構思這個問題。 – varuaa