Sat 14 Feb 2009 08:05:46 PM UTC, comment #1:
Apologies for the confusion, I had diffed the files the wrong way around. The patch should be:
--- freetype-2.3.8-orig/builds/unix/ftconfig.in 2008-10-04 12:29:37.000000000 +0100
+++ freetype-2.3.8/builds/unix/ftconfig.in 2009-02-14 19:16:14.000000000 +0000
@@ -305,7 +305,7 @@
"adds %1, %1, %0\n\t" /* %1 += %0 */
"adc %2, %2, #0\n\t" /* %2 += carry */
"mov %0, %1, lsr #16\n\t" /* %0 = %1 >> 16 */
- "orr %0, %2, lsl #16\n\t" /* %0 |= %2 << 16 */
+ "orr %0, %0, %2, lsl #16\n\t" /* %0 |= %2 << 16 */
: "=r"(a), "=&r"(t2), "=&r"(t)
: "r"(a), "r"(b) );
return a;
(plus, really I ought to have fixed the formatting at the same time. For clarity of the single-line change, I haven't done so even in this revised patch).
|
Sat 14 Feb 2009 08:02:13 PM UTC, original submission:
The current CVS head and also 2.3.8 have a compilation error for ARM. I was cross-compiling with gcc3.4.4, so it may be a gcc-specific issue, but the source has a non-standard ARM opcode which fails to compile.
In order to compile, a simple patch needs to be made:
--- freetype-2.3.8/builds/unix/ftconfig.in 2009-02-14 19:16:14.000000000 +0000
+++ freetype-2.3.8-orig/builds/unix/ftconfig.in 2008-10-04 12:29:37.000000000 +0100
@@ -305,7 +305,7 @@
"adds %1, %1, %0\n\t" /* %1 += %0 */
"adc %2, %2, #0\n\t" /* %2 += carry */
"mov %0, %1, lsr #16\n\t" /* %0 = %1 >> 16 */
- "orr %0, %0, %2, lsl #16\n\t" /* %0 |= %2 << 16 */
+ "orr %0, %2, lsl #16\n\t" /* %0 |= %2 << 16 */
: "=r"(a), "=&r"(t2), "=&r"(t)
: "r"(a), "r"(b) );
return a;
Put simply, the "or" instruction should be of the form "orr DEST, SRC1, SRC2". The comment on that line is correct, but the %0 operand needed to be added to make it "%0 = %0 | %2<<16".
This may build on other versions of GCC as their assemblers may infer this behaviour, but to the best of my knowledge it's non-standard.
I ran and tested my patched version and all seems well (fonts rendered fine).
|