Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Tue, 17 Jul 2012 18:37:28 +0200
From: Szabolcs Nagy <>
Subject: customizable -lgcc in makefile

the following modification allows config.mak
to override the -lgcc linker flag

this is needed when compiling musl with pcc
(then LIBCC=-Lpath/to/libpcc -lpcc)

i wonder what clang needs there and if there is
any libgcc specific code in musl

diff --git a/Makefile b/Makefile
index 0c13417..ad701c9 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

+LIBCC = -lgcc
 CFLAGS = -Os -pipe
 CFLAGS_C99FSE = -std=c99 -ffreestanding -nostdinc
@@ -91,7 +92,7 @@ include/bits/alltypes.h: include/bits/
 lib/ $(LOBJS)
        $(CC) $(CFLAGS_ALL_SHARED) $(LDFLAGS) -nostdlib -shared \
        -Wl,-e,_start -Wl,-Bsymbolic-functions \
-       -Wl, -o $@ $(LOBJS) -lgcc
+       -Wl, -o $@ $(LOBJS) $(LIBCC)

 lib/libc.a: $(OBJS)
        rm -f $@

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.