svn commit: branches/uClibc-nptl: libcrypt libpthread/nptl_db test
sjhill at uclibc.org
sjhill at uclibc.org
Wed Nov 16 03:04:48 UTC 2005
Author: sjhill
Date: 2005-11-15 19:04:47 -0800 (Tue, 15 Nov 2005)
New Revision: 12276
Log:
Clean up -O optimizations for MIPS and fix libcrypt Makefile temporarily.
Modified:
branches/uClibc-nptl/Rules.mak
branches/uClibc-nptl/libcrypt/Makefile
branches/uClibc-nptl/libpthread/nptl_db/Makefile
branches/uClibc-nptl/test/Rules.mak
Changeset:
Modified: branches/uClibc-nptl/Rules.mak
===================================================================
--- branches/uClibc-nptl/Rules.mak 2005-11-16 03:00:38 UTC (rev 12275)
+++ branches/uClibc-nptl/Rules.mak 2005-11-16 03:04:47 UTC (rev 12276)
@@ -294,8 +294,11 @@
LDFLAGS_NOSTRIP:=$(CPU_LDFLAGS-y) -shared --warn-common --warn-once -z combreloc -z defs
ifeq ($(DODEBUG),y)
- #CFLAGS += -g3
+ifeq ($(strip $(TARGET_ARCH)),mips)
+ CFLAGS += -O1 -g3
+else
CFLAGS += -O0 -g3
+endif
LDFLAGS := $(LDFLAGS_NOSTRIP)
STRIPTOOL:= true -Since_we_are_debugging
else
Modified: branches/uClibc-nptl/libcrypt/Makefile
===================================================================
--- branches/uClibc-nptl/libcrypt/Makefile 2005-11-16 03:00:38 UTC (rev 12275)
+++ branches/uClibc-nptl/libcrypt/Makefile 2005-11-16 03:04:47 UTC (rev 12276)
@@ -33,29 +33,31 @@
CSRC = $(wildcard *.c)
+OBJS=$(patsubst %.c,%.o, $(CSRC))
+
ifeq ($(strip $(HAVE_SHARED)),y)
all: $(SO_LIB_NAME)
else
all: $(AR_LIB_NAME)
endif
-$(AR_LIB_NAME): $(LIB_NAME).o
+$(AR_LIB_NAME): $(OBJS)
$(INSTALL) -d $(TOPDIR)lib
- $(RM) $@
- $(AR) $(ARFLAGS) $@ $<
+ $(RM) $(AR_LIB_NAME)
+ $(AR) $(ARFLAGS) $(AR_LIB_NAME) $(OBJS)
$(SO_LIB_NAME): $(AR_LIB_NAME)
- $(RM) $(TOPDIR)lib/$(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION) $@
+ $(RM) $(TOPDIR)lib/$(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION) $(SO_LIB_NAME)
$(LD) $(LDFLAGS) -soname=$(LIB_NAME).so.$(MAJOR_VERSION) \
- -o $(TOPDIR)lib/$(SO_FULL_NAME) --whole-archive $< \
+ -o $(TOPDIR)lib/$(SO_FULL_NAME) --whole-archive $(AR_LIB_NAME) \
--no-whole-archive $(TOPDIR)libc/misc/internals/interp.o \
-L$(TOPDIR)lib -lc $(LDADD_LIBFLOAT) $(LIBGCC)
$(LN) -sf $(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION)
- $(LN) -sf $(SO_FULL_NAME) $@
+ $(LN) -sf $(SO_FULL_NAME) $(SO_LIB_NAME)
-$(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
Modified: branches/uClibc-nptl/libpthread/nptl_db/Makefile
===================================================================
--- branches/uClibc-nptl/libpthread/nptl_db/Makefile 2005-11-16 03:00:38 UTC (rev 12275)
+++ branches/uClibc-nptl/libpthread/nptl_db/Makefile 2005-11-16 03:04:47 UTC (rev 12276)
@@ -25,8 +25,13 @@
SO_LIB_NAME=$(TOPDIR)lib/$(LIB_NAME).so
SO_FULL_NAME=$(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
+ifeq ($(strip $(TARGET_ARCH)),mips)
+CFLAGS := $(CFLAGS:-O1=-O2) -DNOT_IN_libc=1 -DIS_IN_libthread_db=1 $(PTINC) \
+ -std=gnu99 -DLIBPTHREAD_SO="\"libpthread.so.$(MAJOR_VERSION)\""
+else
CFLAGS := $(CFLAGS:-O0=-O2) -DNOT_IN_libc=1 -DIS_IN_libthread_db=1 $(PTINC) \
-std=gnu99 -DLIBPTHREAD_SO="\"libpthread.so.$(MAJOR_VERSION)\""
+endif
# Remove any -z defs since this lib will have undefined symbols
LDFLAGS := $(subst -z defs,,$(LDFLAGS)) --warn-unresolved-symbols
Modified: branches/uClibc-nptl/test/Rules.mak
===================================================================
--- branches/uClibc-nptl/test/Rules.mak 2005-11-16 03:00:38 UTC (rev 12275)
+++ branches/uClibc-nptl/test/Rules.mak 2005-11-16 03:04:47 UTC (rev 12276)
@@ -72,7 +72,11 @@
# use '-Os' optimization if available, else use -O2, allow Config to override
# Override optimization settings when debugging
ifeq ($(DODEBUG),y)
+ ifeq ($(strip $(TARGET_ARCH)),mips)
+OPTIMIZATION = -O1
+ else
OPTIMIZATION = -O0
+ endif
else
OPTIMIZATION += $(call check_gcc,-Os,-O2)
endif
More information about the uClibc-cvs
mailing list