Browse Source

combine the crt1.0/Scrt1.o rules since they are pretty much the samething

Mike Frysinger 19 years ago
parent
commit
28f1d458d4
1 changed files with 5 additions and 8 deletions
  1. 5 8
      Makerules

+ 5 - 8
Makerules

@@ -181,7 +181,7 @@ $(libc):
 $(headers_dep):
 $(headers_dep):
 	@cd $(top_builddir); $(MAKE) headers
 	@cd $(top_builddir); $(MAKE) headers
 
 
-CRT=crt1
+CRT := crt1
 
 
 ifeq ($(HAVE_SHARED),y)
 ifeq ($(HAVE_SHARED),y)
 CRTS=$(top_builddir)lib/$(CRT).o $(top_builddir)lib/S$(CRT).o
 CRTS=$(top_builddir)lib/$(CRT).o $(top_builddir)lib/S$(CRT).o
@@ -189,14 +189,11 @@ else
 CRTS=$(top_builddir)lib/$(CRT).o
 CRTS=$(top_builddir)lib/$(CRT).o
 endif
 endif
 
 
-$(top_builddir)lib/$(CRT).o: $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/$(CRT).S
+ASFLAGS-$(CRT).o := -DL_$(CRT)
+ASFLAGS-S$(CRT).o := $(PIEFLAG) -DL_S$(CRT)
+$(CRTS): $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/$(CRT).S
 	$(Q)$(INSTALL) -d $(dir $@)
 	$(Q)$(INSTALL) -d $(dir $@)
-	$(compile.S) -DL_$(patsubst %$(suffix $(notdir $@)),%,$(notdir $@))
-	$(Q)$(STRIPTOOL) -x -R .note -R .comment $@
-
-$(top_builddir)lib/S$(CRT).o: $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/$(CRT).S
-	$(Q)$(INSTALL) -d $(dir $@)
-	$(compile.S) $(PIEFLAG) -DL_$(patsubst %$(suffix $(notdir $@)),%,$(notdir $@))
+	$(compile.S)
 	$(Q)$(STRIPTOOL) -x -R .note -R .comment $@
 	$(Q)$(STRIPTOOL) -x -R .note -R .comment $@
 
 
 CTOR_TARGETS=$(top_builddir)lib/crti.o $(top_builddir)lib/crtn.o
 CTOR_TARGETS=$(top_builddir)lib/crti.o $(top_builddir)lib/crtn.o