[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 ;)


I now hacked a bit and got stuff working on one of those cluster machines.

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

qt4-x11-4.4.0$ find . | grep parisc

Maybe it would be possible to use gcc's atomic builtin functions ?

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.

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);
     void q_atomic_lock(int *lock)

Reply to: