fix_powerpc_ftbfs_with_new_glibc
authorPascal Packaging Team <pkg-pascal-devel@lists.alioth.debian.org>
Sat, 10 Jun 2017 17:13:48 +0000 (18:13 +0100)
committerAbou Al Montacir <abou.almontacir@sfr.fr>
Sat, 10 Jun 2017 17:13:48 +0000 (18:13 +0100)
Gbp-Pq: Name fix_powerpc_ftbfs_with_new_glibc.patch

fpcsrc/rtl/linux/powerpc/cprt0.as
fpcsrc/rtl/unix/dl.pp

index e237d8d1bc0b8d267e2fffbe8a9e95774b3513f9..9b651c9fccc319976b8719c128f3e494ccf4635f 100644 (file)
@@ -88,12 +88,8 @@ main_stub:
     .globl  _haltproc
     .type   _haltproc, @function
 _haltproc:
-    lis     11, ___fpc_ret@ha
-    lwz     1, ___fpc_ret@l(11)
-    addi    1, 1, 16
-    lwz     0, 0(1)
-    mtlr    0
-    blr
+    bl     _exit
+    b      _haltproc
 
 #    li      0, 1       /* exit call */
 #    lis     3, operatingsystem_result@h
index b2a1253a6df7f5b25ce0ed8d511774593b425164..0e0089f0d382e0e1520ad806b7b3a6de23b45579 100644 (file)
@@ -31,8 +31,9 @@ const
   {$define ELF} // ELF symbol versioning.
 {$endif}
 
-{$if defined(linux) and defined(cpuarm)}
-{ arm-linux seems to require this }
+{$if defined(linux) and (defined(cpuarm) or defined(cpupowerpc))}
+{ some linux targets seem to require this, if libc is not linked
+  the wrong start up code is used }
 {$linklib c}
 {$endif}