summaryrefslogtreecommitdiff
path: root/README
blob: fd882fc440bc6a400204b887aa122d36e176c337 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64

* Configuration:

  ln -s ./extra/Configs/Config.<arch> ./Config

Then edit ./Config for your setup.  In particular, modify CROSS and
KERNEL_SOURCE as necessary.  You may also want to modify
SHARED_LIB_LOADER_PATH, DEVEL_PREFIX, and SYSTEM_DEVEL_PREFIX depending
on where you want to install the development environment.  By default,
the development environment is installed into /usr/<arch>-linux-uclibc/.


* Building:

  make


* Installing the development environment:

(As root, if necessary,)

  make install

This will install the header files, libraries, and the gcc
wrapper into the directories defined in Config.


* Installing the target runtime environment:

(As root, if necessary,)

   make PREFIX=<temporary path> install_target

This installs only the files that are necessary to run binaries
compiled against uClibc.  Hint: You probably do not want to install
the target runtime environment on your host machine.


* Using uClibc:

To compile programs with uClibc,

   export PATH={uClibc DEVEL_PREFIX}/bin:$PATH

and then just ./configure and make as usual.

Note: 

	You may also want to look at extra/gcc-uclibc/gcc-uclibc.c for
	additional information concerning what options and environment
	variables the gcc wrapper handles.

Note2: 

	There is an unwholesomely huge amount of code out there that
	depends on the presence of GNU libc header files.  We have GNU
	libc header files.  So we have committed a horrible sin in
	uClibc.  We _lie_ and claim to be GNU libc in order to force
	many applications to work as their developers intended.  This
	is IMHO, pardonable, since these defines are not really
	intended to check for the presence of a particular library, but
	rather are used to define an _interface_.  Some programs (such
	as GNU binutils) are especially chummy with glibc, and need
	this behavior disabled by adding CFLAGS+=-D__FORCE_NOGLIBC