# DP: Make sure libc_nonshared.a is compiled with -fPIC on m68k

---
 ports/sysdeps/m68k/Makefile |    4 ++++
 1 file changed, 4 insertions(+)

--- a/ports/sysdeps/m68k/Makefile
+++ b/ports/sysdeps/m68k/Makefile
@@ -32,3 +32,7 @@
 ifeq ($(subdir),elf)
 CFLAGS-rtld.c += -Wno-uninitialized -Wno-unused
 endif
+
+# Build objects in libc_nonshared.a with -fPIC (instead of -fpic) to avoid
+# possible linkage problems.
+CFLAGS-.oS += -fPIC
