Re: [問題一] 關於Build a GUN/Linux ARM Toolchai …
※ 引述《FFz (澎湖.仙人掌.234)》之銘言:
: 請教一下
: Building a GNU/Linux ARM Toolchain (from scratch)
: http://www.schnozzle.org/~coldwell/toolchain/
: 這個教學中的
: Glibc headers此階段中,他的configure 參數如下
: ../../glibc-2.3.5/configure
: --prefix=/usr
: --host=${TARGET}
: --enable-add-ons=linuxthreads
: --with-headers=${SYSROOT}/usr/include 2>&1 | tee configure.out
: 他將 --prefix=/usr 這樣不就會安裝到 /usr底下
: 不是應該安裝到 Toolchain的目錄下嗎
: 而且安裝到 /usr 不就把原系統的資料給蓋掉了
這裡要特別小心。
該作者是在 make install 時指定另外一個安裝路徑:
make cross-compiling=yes install_root=${SYSROOT} install-headers ...
所以其實headers是被安裝在 ${SYSROOT}/usr ,並不是 /usr。
: 還有 GNU C Library 此階段也是
: ../../glibc-2.3.5/configure
: --prefix=/usr
: --build=i386-redhat-linux
: --host=arm-unknown-linux-gnu
: --target=arm-unknown-linux-gnu
: --without-__thread
: --enable-add-ons=linuxthreads
: --with-headers=${SYSROOT}/usr/include 2>&1 | tee configure.out괊: 這樣安裝沒錯嗎?
: ====================================================
: 在安裝Glibc Headers這個階段原著在最後有執行
: touch ${SYSROOT}/usr/include/gnu/stubs.h
: touch ${SYSROOT}/usr/include/bits/stdio_lim.h
: 可是我找不到這個兩檔案,所以我複製了系統裡的檔案來用
: 之後在touch這兩個檔案
我不知道複製系統的檔案能不能用,不過如果你直接 touch 這兩個不存在的檔案
那麼 touch 會自動幫你新增這兩個空檔案。
其實我也不是很清楚這個步驟的意義。
: # Glibc headers
: cp -a /usr/include/bits/ /foo/sysroot/usr/include/
: cp -a /usr/include/gnu/ /foo/sysroot/usr/include/
: touch ${SYSROOT}/usr/include/gnu/stubs.h
: touch ${SYSROOT}/usr/include/bits/stdio_lim.h
: ====================================================
: 關於在 Stage 1 GCC 這個階段
: 我在 configure 時出現了下列訊息
: *** This configuration is not supported in the following subdirectories:
: target-libffi target-libstdc++-v3 target-libf2c target-boehm-gc
: target-zlib target-libjava zlib fastjar target-libobjc
: (Any other directories should still work fine.)
: 我的設定如下
: ../../gcc-3.4.4/configure
: --prefix=/foo
: --target=arm-elf
: --enable-languages=c
: --with-sysroot=/foo/sysroot 2>&1 | tee configure.out
: 但是他讓我configure通過了
這不是錯誤訊息,我之前在編gcc也看過這個訊息,你應該可以忽略它。
--
Albert Einstein :
If there is any religion that could cope with modern scientific needs it
would be Buddhism.
《金剛經》一切有為法 如夢幻泡影 如露亦如電 應作如是觀
http://web.cc.ncu.edu.tw/~93501025/jg.doc
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.115.200.121
※ 編輯: zxvc 來自: 140.115.200.121 (04/23 07:58)
LinuxDev 近期熱門文章
PTT數位生活區 即時熱門文章