Parlib and other user libs are built with -fPIC Also, this collects the common user library flags into the top-level Makefile.
diff --git a/Makefile b/Makefile index 106fd5f..0e5044a 100644 --- a/Makefile +++ b/Makefile
@@ -349,8 +349,9 @@ CFLAGS_USER += -O2 -std=gnu99 -fno-stack-protector -fgnu89-inline CXXFLAGS_USER += -O2 +CFLAGS_USER_LIBS += -fPIC -static -fomit-frame-pointer -g -export CFLAGS_USER CXXFLAGS_USER +export CFLAGS_USER CXXFLAGS_USER CFLAGS_USER_LIBS # Akaros include stuff (includes custom make targets and user overrides) # =========================================================================
diff --git a/user/benchutil/Makefile b/user/benchutil/Makefile index 9adbe3e..136859b 100644 --- a/user/benchutil/Makefile +++ b/user/benchutil/Makefile
@@ -1,5 +1,5 @@ ARCH ?= none # catch bugs -CFLAGS_USER += -static -fomit-frame-pointer -g +CFLAGS_USER += $(CFLAGS_USER_LIBS) LIBNAME = benchutil # DEPLIBS passed in from the top-level Makefile DEPLIBS := $(DEPLIBS)
diff --git a/user/bsd/Makefile b/user/bsd/Makefile index c82edcd..4330b28 100644 --- a/user/bsd/Makefile +++ b/user/bsd/Makefile
@@ -1,5 +1,5 @@ ARCH ?= none # catch bugs -CFLAGS_USER += -static -fomit-frame-pointer -g +CFLAGS_USER += $(CFLAGS_USER_LIBS) LIBNAME = bsd # DEPLIBS passed in from the top-level Makefile DEPLIBS := $(DEPLIBS)
diff --git a/user/iplib/Makefile b/user/iplib/Makefile index 1cc42e3..30a7b7e 100644 --- a/user/iplib/Makefile +++ b/user/iplib/Makefile
@@ -1,5 +1,5 @@ ARCH ?= none # catch bugs -CFLAGS_USER += -static -fomit-frame-pointer -g +CFLAGS_USER += $(CFLAGS_USER_LIBS) LIBNAME = iplib # DEPLIBS passed in from the top-level Makefile DEPLIBS := $(DEPLIBS)
diff --git a/user/ndblib/Makefile b/user/ndblib/Makefile index 490813d..670eec8 100644 --- a/user/ndblib/Makefile +++ b/user/ndblib/Makefile
@@ -1,5 +1,5 @@ ARCH ?= none # catch bugs -CFLAGS_USER += -static -fomit-frame-pointer -g +CFLAGS_USER += $(CFLAGS_USER_LIBS) LIBNAME = ndb # DEPLIBS passed in from the top-level Makefile DEPLIBS := $(DEPLIBS)
diff --git a/user/parlib/Makefile b/user/parlib/Makefile index 9a553cf..e89b43c 100644 --- a/user/parlib/Makefile +++ b/user/parlib/Makefile
@@ -1,5 +1,5 @@ ARCH ?= none # catch bugs -CFLAGS_USER += -static -fomit-frame-pointer -g +CFLAGS_USER += $(CFLAGS_USER_LIBS) LIBNAME = parlib # DEPLIBS passed in from the top-level Makefile DEPLIBS := $(DEPLIBS)
diff --git a/user/pthread/Makefile b/user/pthread/Makefile index 498685e..a52eb56 100644 --- a/user/pthread/Makefile +++ b/user/pthread/Makefile
@@ -1,5 +1,5 @@ ARCH ?= none # catch bugs -CFLAGS_USER += -static -fomit-frame-pointer -g +CFLAGS_USER += $(CFLAGS_USER_LIBS) LIBNAME = pthread # DEPLIBS passed in from the top-level Makefile DEPLIBS := $(DEPLIBS)