Browse Source

Undo size optimizing patch that does not work with gcc-4.1-head, reported by sjhill, thanks cow for testing

Peter S. Mazinger 18 years ago
parent
commit
c60a8a994f
2 changed files with 18 additions and 4 deletions
  1. 9 2
      libcrypt/Makefile
  2. 9 2
      libutil/Makefile

+ 9 - 2
libcrypt/Makefile

@@ -39,10 +39,13 @@ else
 all: $(AR_LIB_NAME)
 endif
 
-$(AR_LIB_NAME): $(LIB_NAME).o
+# psm: 20051007 gcc-4.1-head optimizes crypt()/__des_crypt() away
+# $(AR_LIB_NAME): $(LIB_NAME).o
+
+$(AR_LIB_NAME): $(OBJS)
 	$(INSTALL) -d $(TOPDIR)lib
 	$(RM) $@
-	$(AR) $(ARFLAGS) $@ $<
+	$(AR) $(ARFLAGS) $@ $^
 
 $(SO_LIB_NAME): $(AR_LIB_NAME)
 	$(RM) $(TOPDIR)lib/$(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION) $@
@@ -57,5 +60,9 @@ $(LIB_NAME).o: $(CSRC)
 	$(CC) $(CFLAGS) -o $@ -c $^
 	$(STRIPTOOL) -x -R .note -R .comment $@
 
+$(OBJS): %.o : %.c
+	$(CC) $(CFLAGS) -c $< -o $@
+	$(STRIPTOOL) -x -R .note -R .comment $*.o
+
 clean:
 	$(RM) *.o *~ core

+ 9 - 2
libutil/Makefile

@@ -42,10 +42,13 @@ else
 all: $(AR_LIB_NAME)
 endif
 
-$(AR_LIB_NAME): $(LIB_NAME).o
+# psm: 20051007 gcc-4.1-head optimizes crypt()/__des_crypt() away
+# $(AR_LIB_NAME): $(LIB_NAME).o
+
+$(AR_LIB_NAME): $(OBJS)
 	$(INSTALL) -d $(TOPDIR)lib
 	$(RM) $@
-	$(AR) $(ARFLAGS) $@ $<
+	$(AR) $(ARFLAGS) $@ $^
 
 $(SO_LIB_NAME): $(AR_LIB_NAME)
 	$(RM) $(TOPDIR)lib/$(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION) $@
@@ -60,5 +63,9 @@ $(LIB_NAME).o: $(CSRC)
 	$(CC) $(CFLAGS) -o $@ -c $^
 	$(STRIPTOOL) -x -R .note -R .comment $@
 
+$(OBJS): %.o : %.c
+	$(CC) $(CFLAGS) -c $< -o $@
+	$(STRIPTOOL) -x -R .note -R .comment $*.o
+
 clean:
 	$(RM) *.o *~ core