]> err.no Git - systemd/commitdiff
[PATCH] enable native tdb spinlocks on i386 platforms.
authorgreg@kroah.com <greg@kroah.com>
Thu, 7 Oct 2004 06:40:35 +0000 (23:40 -0700)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 04:37:03 +0000 (21:37 -0700)
also clean out some stuff in the makefile that was never getting used.

Makefile
tdb/spinlock.c

index 9405b25c5f336a77109c5d6403a4738255c77af2..1b7c71c57ca730d0f804ad668cfd1722b60b48df 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -107,19 +107,11 @@ OPTIMIZATION := ${shell if $(CC) -Os -S -o /dev/null -xc /dev/null >/dev/null 2>
 # add -Wredundant-decls when libsysfs gets cleaned up
 WARNINGS := -Wall 
 
-# Some nice architecture specific optimizations
-ifeq ($(strip $(TARGET_ARCH)),arm)
-       OPTIMIZATION+=-fstrict-aliasing
-endif
-ifeq ($(strip $(TARGET_ARCH)),i386)
-       OPTIMIZATION+=-march=i386
-       OPTIMIZATION += ${shell if $(CC) -mpreferred-stack-boundary=2 -S -o /dev/null -xc \
-               /dev/null >/dev/null 2>&1; then echo "-mpreferred-stack-boundary=2"; fi}
-       OPTIMIZATION += ${shell if $(CC) -malign-functions=0 -malign-jumps=0 -S -o /dev/null -xc \
-               /dev/null >/dev/null 2>&1; then echo "-malign-functions=0 -malign-jumps=0"; fi}
-       CFLAGS+=-pipe -Dasmlinkage=__attribute__((regparm(0)))
-else
-       CFLAGS+=-pipe -Dasmlinkage=
+CFLAGS := -pipe -Dasmlinkage=
+
+# set up the proper tdb spinlock code if we can
+ifeq ($(strip $(ARCH)),i386)
+       CFLAGS += -DUSE_SPINLOCKS -DINTEL_SPINLOCKS
 endif
 
 ifeq ($(strip $(USE_LOG)),true)
index 50cd952c727a0cc7c72df7fbd08034f3771fa1eb..451617fadeb4f57d01265a75527ffbae8eb3cb29 100644 (file)
@@ -21,7 +21,6 @@
 #define STANDALONE
 #define TDB_DEBUG
 #define HAVE_MMAP      1
-#include "../udev.h"
 
 #if HAVE_CONFIG_H
 #include <config.h>
@@ -40,6 +39,8 @@
 #include <signal.h>
 #include "tdb.h"
 #include "spinlock.h"
+#include "../udev.h"
+#include "../logging.h"
 
 #else
 #include "includes.h"