diff options
Diffstat (limited to 'Makerules')
| -rw-r--r-- | Makerules | 15 | 
1 files changed, 12 insertions, 3 deletions
| @@ -22,6 +22,9 @@ ifeq ($(UCLIBC_FORMAT_SHARED_FLAT),y)  libs: $(lib-gdb-y)  endif  libs: $(lib-a-y) +ifeq ($(HAVE_LDSO),y) +$(lib-a-y): | $(ldso) +endif  endif  objs: all_objs  $(lib-so-y) $(lib-a-y): | $(top_builddir)lib @@ -83,7 +86,7 @@ SHELL_SET_X := set +x  define rel_srcdir  	$(shell $(CONFIG_SHELL) $(top_srcdir)/extra/scripts/relative_path.sh $(@D) .)  endef -ifneq ($(findstring s,$(MAKEFLAGS)),) +ifneq (,$(filter -s,$(wordlist 1,$(words $(MAKEFLAGS)),$(MAKEFLAGS))))  export MAKE_IS_SILENT := y  SECHO := -@false  DISP := sil @@ -273,7 +276,7 @@ cmd_compile.mi= $(cmd_compile.m:-c=-E -dD) $(UCLIBC_EXTRA_CPPFLAGS)  cmd_compile-m = $(CC) $^ -c -o $@ $(CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(notdir $(@D))) $(CFLAGS-$(notdir $@)) $(sort $(foreach d,$(^:$(top_srcdir)=),$(collect_multi_flags)))  cmd_strip     = $(STRIPTOOL) $(STRIP_FLAGS) $^  cmd_t_strip   = $(STRIPTOOL) $(STRIP_FLAGS) $@ -cmd_ar        = $(AR) $(ARFLAGS) $@ $(call objects_with_syms,,$^) +cmd_ar        = $(AR) $(ARFLAGS) $@ @$@.list  define do_ln  	@$(disp_ln) @@ -314,6 +317,7 @@ hcompile.u= @$(disp_hcompile.u); $(cmd_hcompile.u)  hcompile.o= @$(disp_hcompile.o); $(cmd_hcompile.o)  define do_ar +	@$(file >$@.list,$(call objects_with_syms,,$^))  	@$(disp_ar) ; $(cmd_ar)  	@$(do_t_strip)  endef @@ -331,7 +335,7 @@ define link.so  		-Wl,-soname=$(notdir $@).$(2) \  		$(CFLAG_-nostdlib) $(CFLAG_-nostartfiles) \  		-o $(dir $@)$(1) $(START_FILE-$(notdir $@)) \ -		-Wl,--whole-archive $(firstword $^) -Wl,--no-whole-archive \ +		-Wl,--whole-archive $(firstword $^) -Wl,--no-whole-archive -shared \  		$(LIBS-$(notdir $@)) $(LIBGCC) $(END_FILE-$(notdir $@))  	$(Q)$(LN) -sf $(1) $@.$(2)  	$(Q)$(LN) -sf $(1) $@ @@ -405,8 +409,13 @@ else  CRTS=$(top_builddir)lib/$(CRT).o  endif +ifeq ($(STATIC_PIE),y) +CRTS+=$(top_builddir)lib/r$(CRT).o +endif +  ASFLAGS-$(CRT).o := -DL_$(CRT)  ASFLAGS-S$(CRT).o := $(PIEFLAG) -DL_S$(CRT) +ASFLAGS-r$(CRT).o := $(PIEFLAG) -DL_r$(CRT)  $(CRTS): $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/$(CRT).S  	$(compile.S)  	$(Q)$(STRIPTOOL) -x -R .note -R .comment $@ | 
