[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: kde4libs vs qt4



Helge Deller wrote:
Sune Vuorela wrote:
On Friday 06 June 2008, Thibaut VARENE wrote:
On Fri, Jun 6, 2008 at 12:53 PM, Sune Vuorela <Sune@vuorela.dk> wrote:
Paer.debian.org is currently locked down, so there is not much I can do
about it myself.
Just for the records, your access to the ESIEE cluster is just a
matter of sending me a non-compromised ssh key ;)

HTH

I now hacked a bit and got stuff working on one of those cluster machines.
http://svn.debian.org/wsvn/pkg-kde/trunk/packages/qt4-
x11/debian/patches/72_generic_arch_atomic_header_fix.diff?op=file&rev=0&sc=0

This isn't the "real solution" though.

Qt4 has arch specific code for most archs (and a "generic" arch mostly used for bootstrapping of Qt), but no arch for linux/hppa, so we use the "generic" arch here.

The real solution involves some hppa assembler (which is way out of my league). There is a patch in the package by lamont about patching the hpux code, but I couldn't get taht to work with my quick tests.

To be inspired on what is needed, looking at other archs could be a inspiration:
qt4-x11-4.4.0$ find . | grep s390
./src/corelib/arch/s390
./src/corelib/arch/s390/arch.pri
./src/corelib/arch/qatomic_s390.h
./include/QtCore/qatomic_s390.h
./include/Qt/qatomic_s390.h

qt4-x11-4.4.0$ find . | grep parisc
./src/corelib/arch/parisc
./src/corelib/arch/parisc/q_ldcw.s
./src/corelib/arch/parisc/qatomic_parisc.cpp
./src/corelib/arch/parisc/arch.pri
./src/corelib/arch/qatomic_parisc.h
./include/QtCore/qatomic_parisc.h
./include/Qt/qatomic_parisc.h

Maybe it would be possible to use gcc's atomic builtin functions ?
http://gcc.gnu.org/onlinedocs/gcc/Atomic-Builtins.html

Haven't looked into it yet, but will do.

Hello Sune,

attached is a _completely_ untested patch which should
show what's needed. In principle we could
a) copy over the HPUX-parisc architecture files to arch/hppa and apply the patch on top of the copy (as you suggest above), or b) alternatively, we could try to merge HPUX's parisc and Linux's HPPA architecture into the existing Trolltech codebase of parisc.

I'll continue to look into it and will try to clean it up, depending on what you think which solution (a or b) is best.

Helge
diff -up ./src/corelib/arch/parisc/arch.pri.org ./src/corelib/arch/parisc/arch.pri
--- ./src/corelib/arch/parisc/arch.pri.org	2008-04-28 15:11:18.000000000 +0200
+++ ./src/corelib/arch/parisc/arch.pri	2008-06-10 00:19:10.000000000 +0200
@@ -1,5 +1,7 @@
 #
 # HP PA-RISC architecture
 #
-SOURCES += $$QT_ARCH_CPP/q_ldcw.s \
-	   $$QT_ARCH_CPP/qatomic_parisc.cpp
+
+hpux*:	SOURCES += $$QT_ARCH_CPP/q_ldcw.s
+
+SOURCES += $$QT_ARCH_CPP/qatomic_parisc.cpp
diff -up ./src/corelib/arch/parisc/qatomic_parisc.cpp.org ./src/corelib/arch/parisc/qatomic_parisc.cpp
--- ./src/corelib/arch/parisc/qatomic_parisc.cpp.org	2008-06-10 00:02:32.000000000 +0200
+++ ./src/corelib/arch/parisc/qatomic_parisc.cpp	2008-06-10 00:09:54.000000000 +0200
@@ -72,7 +72,21 @@ static int *align16(int *lock)
 
 extern "C" {
 
+#if defined(Q_OS_LINUX)
+    #if defined(__LP64__)
+	#define __LDCW  "ldcw,co"
+    #else
+	#define __LDCW  "ldcw"
+    #endif
+    #define q_ldcw(addr) ({					\
+	unsigned __ret;						\
+	__asm__ __volatile__(__LDCW " 0(%1),%0"			\
+				: "=r" (__ret) : "r" (addr));	\
+	__ret;							\
+	})
+#else /* for HP/UX */
     int q_ldcw(volatile int *addr);
+#endif
 
     void q_atomic_lock(int *lock)
     {

Reply to: