# Fix hardcoded compiler / -Os in the makefile...
--- Makefile.sharedlibrary	2017-01-26 11:56:36.000000000 -0800
+++ Makefile.sharedlibrary.new	2017-04-15 15:57:34.679605829 -0700
@@ -44,11 +44,11 @@
 # to $INSTALL_PREFIX/include on installation.
 
 libduktape.so.$(REAL_VERSION):
-	gcc -shared -fPIC -Wall -Wextra -Os -Wl,-soname,libduktape.so.$(SONAME_VERSION) \
+	$(CC) -shared -fPIC -Wall -Wextra $(CFLAGS) -Wl,-soname,libduktape.so.$(SONAME_VERSION) \
 		-o $@ $(DUKTAPE_SRCDIR)/duktape.c
 
 libduktaped.so.$(REAL_VERSION):
-	gcc -shared -fPIC -g -Wall -Wextra -Os -Wl,-soname,libduktaped.so.$(SONAME_VERSION) \
+	$(CC) -shared -fPIC -g -Wall -Wextra $(CFLAGS) -Wl,-soname,libduktaped.so.$(SONAME_VERSION) \
 		-o $@ $(DUKTAPE_SRCDIR)/duktape.c
 
 # Symlinks depend on platform conventions.
