diff options
author | Rich Felker <dalias@aerifal.cx> | 2012-08-02 21:05:43 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2012-08-02 21:05:43 -0400 |
commit | 1b23145e8890f4930c9129ed3f28eea9cbb1effc (patch) | |
tree | 36d279ea8172b47618e13d73718257147c2b40bb | |
parent | b0fc78520d7d51ab064f629e228c27d0fa5a4b82 (diff) | |
download | musl-1b23145e8890f4930c9129ed3f28eea9cbb1effc.tar.gz musl-1b23145e8890f4930c9129ed3f28eea9cbb1effc.tar.xz musl-1b23145e8890f4930c9129ed3f28eea9cbb1effc.zip |
abstract out compiler runtime library for linking libc.so
this allows config.mak to override the default -lgcc for building with other compilers such as pcc/clang/etc.
-rw-r--r-- | Makefile | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile index 0c134175..ad701c90 100644 --- a/Makefile +++ b/Makefile @@ -23,6 +23,7 @@ GENH = include/bits/alltypes.h IMPH = src/internal/stdio_impl.h src/internal/pthread_impl.h src/internal/libc.h LDFLAGS = +LIBCC = -lgcc CPPFLAGS = CFLAGS = -Os -pipe CFLAGS_C99FSE = -std=c99 -ffreestanding -nostdinc @@ -91,7 +92,7 @@ include/bits/alltypes.h: include/bits/alltypes.h.sh lib/libc.so: $(LOBJS) $(CC) $(CFLAGS_ALL_SHARED) $(LDFLAGS) -nostdlib -shared \ -Wl,-e,_start -Wl,-Bsymbolic-functions \ - -Wl,-soname=libc.so -o $@ $(LOBJS) -lgcc + -Wl,-soname=libc.so -o $@ $(LOBJS) $(LIBCC) lib/libc.a: $(OBJS) rm -f $@ |