diff options
Diffstat (limited to 'arch/powerpc/lib/Makefile')
| -rw-r--r-- | arch/powerpc/lib/Makefile | 23 | 
1 files changed, 22 insertions, 1 deletions
| diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile index 724d8ee7f74..cdd62a2061f 100644 --- a/arch/powerpc/lib/Makefile +++ b/arch/powerpc/lib/Makefile @@ -23,6 +23,19 @@  include $(TOPDIR)/config.mk +## Build a couple of necessary functions into a private libgcc +LIBGCC	= $(obj)libgcc.o +GLSOBJS	+= _ashldi3.o +GLSOBJS	+= _ashrdi3.o +GLSOBJS	+= _lshrdi3.o +LGOBJS	:= $(addprefix $(obj),$(GLSOBJS)) \ +	   $(addprefix $(obj),$(GLCOBJS)) + +## But only build it if the user asked for it +ifdef USE_PRIVATE_LIBGCC +TARGETS	+= $(LIBGCC) +endif +  LIB	= $(obj)lib$(ARCH).o  SOBJS-y	+= ppccache.o @@ -53,9 +66,14 @@ endif  COBJS	+= $(sort $(COBJS-y)) -SRCS	:= $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) +SRCS	:= $(GLSOBJS:.o=.S) $(GLCOBJS:.o=.c) \ +	   $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)  OBJS	:= $(addprefix $(obj),$(SOBJS-y) $(COBJS-y)) +TARGETS += $(LIB) + +all: $(TARGETS) +  $(LIB):	$(obj).depend $(OBJS)  	@if ! $(CROSS_COMPILE)readelf -S $(OBJS) | grep -q '\.fixup.*PROGBITS';\  	then \ @@ -65,6 +83,9 @@ $(LIB):	$(obj).depend $(OBJS)  	fi;  	$(call cmd_link_o_target, $(OBJS)) +$(LIBGCC): $(obj).depend $(LGOBJS) +	$(call cmd_link_o_target, $(LGOBJS)) +  #########################################################################  # defines $(obj).depend target | 
