Update of /cvsroot/linux-vax/toolchain/scripts
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23835
Modified Files:
build_toolchain.sh
Log Message:
- Install uClibc
- Fiddle a bit with symlinks to allow GCC to actually find the library
as well as the matching header files.
- This results in a somewhat working userland compiler.
- exit(xx) is broken at the moment. crt1.S is supposed to push a function
pointer (named rtld_fini) on the stack (to be passed to __uClibc_main()),
but I don't know what it is supposed to be, so I just pushed 0x00000002,
but that gets executed as a function pointer (and we crash, obviously).
- If you use _exit(), it'll work.
- I could push 0x00000000 instead (the value is checked to not be a NULL
pointer before being referenced), but that wouldn't remind me that
there's still a broken spot. So I prefer seeing the application crash
instead.
Index: build_toolchain.sh
===================================================================
RCS file: /cvsroot/linux-vax/toolchain/scripts/build_toolchain.sh,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- build_toolchain.sh 30 Sep 2005 19:45:32 -0000 1.18
+++ build_toolchain.sh 9 Oct 2005 18:54:45 -0000 1.19
@@ -551,11 +551,28 @@
#
pushd "${UCLIBC_SRC}" # Yes, we build within the source dir...
# Configure
+ # RUNTIME_PREFIX="/usr/$(TARGET_ARCH)-linux-uclibc/"
+ # DEVEL_PREFIX="/usr/$(TARGET_ARCH)-linux-uclibc/usr/"
echo "KERNEL_SOURCE=\"${LINUX_SRC}\"" >> .config
+ # echo "DEVEL_PREFIX=\"${INSTALL_BASE}/usr/\"" >> .config
+ echo "DEVEL_PREFIX=\"${INSTALL_BASE}/usr/${TARGET}/lib\"" >> .config
+ echo "RUNTIME_PREFIX=\"${INSTALL_BASE}/runtime-prefix/\""
+
build "${BUILD_UCLIBC}" && execute make oldconfig
# Build
build "${BUILD_GCC1}" && execute make ${MAKEFLAGS}
+ # Install
+ build "${BUILD_GCC1}" && execute make install
+
+ # Fixup. Until LINK_SPEC is correct for GCC, we need to fiddle
+ # with library and header file location...
+ pushd "${INSTALL_BASE}/usr/${TARGET}/lib"
+ ln -s lib/* .
+ popd
+ pushd "${INSTALL_BASE}/usr/${TARGET}"
+ ln -s lib/include .
+ popd
popd
|