作者zxvc (zxvc)
看板LinuxDev
标题Re: [问题一] 关於Build a GUN/Linux ARM Toolchai …
时间Mon Apr 23 07:46:30 2007
※ 引述《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)