Add logic that will permit us to build user libraries with different CFLAGS than kernel code. This is needed because we need the -fno-common option when building ELF code to prevent SHN_COMMON relocations

This commit is contained in:
Gregory Nutt 2014-09-09 15:45:37 -06:00
parent a3e85c0b87
commit 6a897a6d71

View File

@ -86,6 +86,11 @@ ARCHWARNINGSXX = -Wall -Wshadow
ARCHDEFINES =
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
ifneq ($(KERNEL),y)
ARCHCFLAGS += -fno-common
ARCHCXXFLAGS += -fno-common
endif
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe