README 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. * Configuration:
  2. cp ./extra/Configs/Config.<target arch> ./Config
  3. Then edit ./Config for your setup. In particular, modify CROSS and
  4. KERNEL_SOURCE as necessary. You may also want to modify
  5. SHARED_LIB_LOADER_PATH, DEVEL_PREFIX, and SYSTEM_DEVEL_PREFIX depending
  6. on where you want to install the development environment. By default,
  7. the development environment is installed into /usr/<arch>-linux-uclibc/.
  8. * Building:
  9. make
  10. * Installing the development environment:
  11. (As root, if necessary,)
  12. make install
  13. This will install the header files, libraries, and the gcc
  14. wrapper into the directories defined in Config.
  15. * Installing the target runtime environment:
  16. (As root, if necessary,)
  17. make PREFIX=<temporary path> install_target
  18. This installs only the files that are necessary to run binaries
  19. compiled against uClibc. Hint: You probably do not want to install
  20. the target runtime environment on your host machine.
  21. * Using uClibc:
  22. To compile programs with uClibc,
  23. export PATH={uClibc DEVEL_PREFIX}/bin:$PATH
  24. and then just ./configure and make as usual.
  25. Note:
  26. You may also want to look at extra/gcc-uclibc/gcc-uclibc.c for
  27. additional information concerning what options and environment
  28. variables the gcc wrapper handles.
  29. Note2:
  30. There is an unwholesomely huge amount of code out there that
  31. depends on the presence of GNU libc header files. We have GNU
  32. libc header files. So we have committed a horrible sin in
  33. uClibc. We _lie_ and claim to be GNU libc in order to force
  34. many applications to work as their developers intended. This
  35. is IMHO, pardonable, since these defines are not really
  36. intended to check for the presence of a particular library, but
  37. rather are used to define an _interface_. Some programs (such
  38. as GNU binutils) are especially chummy with glibc, and need
  39. this behavior disabled by adding CFLAGS+=-D__FORCE_NOGLIBC