diff options
author | pommicket <pommicket@gmail.com> | 2022-02-20 13:18:21 -0800 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2022-02-20 13:18:21 -0800 |
commit | 9bc8a11afeed3569736b89754012e3ca22ee10f6 (patch) | |
tree | 5f0ec0d5c05f879b1ee86adfa654ed3ef2178d5f /05/musl-0.6.0/INSTALL | |
parent | 0f97a589b800bdb71dda05984192f0f66a52edaa (diff) |
conclusion
Diffstat (limited to '05/musl-0.6.0/INSTALL')
-rw-r--r-- | 05/musl-0.6.0/INSTALL | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/05/musl-0.6.0/INSTALL b/05/musl-0.6.0/INSTALL new file mode 100644 index 0000000..5dd7b67 --- /dev/null +++ b/05/musl-0.6.0/INSTALL @@ -0,0 +1,58 @@ + +A quick-and-simple guide to installing musl: + + +STEP 1: Configuration + +Edit config.mak to override installation prefix, compiler options, +target architecture, etc. as needed. Currently supported archs are +i386 and x86_64. Otherwise, the defaults should be okay for trying out +musl with static linking only. + +DO NOT set the prefix to /, /usr, or even /usr/local unless you really +know what you're doing! You'll probably break your system such that +you'll no longer be able to compile and link programs against glibc! +This kind of setup should only be used if you're building a system +where musl is the default/primary/only libc. + +The default prefix is /usr/local/musl for a reason, but some people +may prefer /opt/musl or $HOME/musl. + + +STEP 2: Compiling + +Run "make". (GNU make is required.) + + +STEP 3: Installation + +With appropriate privileges, run "make install". + + +STEP 4: Using the gcc wrapper. + +musl comes with a script "musl-gcc" (installed in /usr/local/bin by +default) that can be used to compile and link C programs against musl. +It requires a version of gcc with the -wrapper option (gcc 4.x should +work). For example: + +cat > hello.c <<EOF +#include <stdio.h> +int main() +{ + printf("hello, world!\n"); + return 0; +} +EOF +musl-gcc hello.c +./a.out + +For compiling programs that use autoconf, you'll need to configure +them with a command like this: + +CC=musl-gcc ./configure + +Be aware that (at present) libraries linked against glibc are unlikely +to be usable, and the musl-gcc wrapper inhibits search of the system +library paths in any case. You'll need to compile any prerequisite +libraries (like ncurses, glib, etc.) yourself. |