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
include/bits/alltypes.h: include/bits/alltypes.h.sh
sh $< > $@
+src/ldso/dynlink.lo: arch/$(ARCH)/reloc.h
+
%.o: $(ARCH)/%.s
$(CC) $(CFLAGS_ALL_STATIC) -c -o $@ $<
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 $@