From 7d3fabb31a106596565dd9b7c97e8d5f448b4e37 Mon Sep 17 00:00:00 2001 From: Pascal Packaging Team Date: Wed, 8 Feb 2017 09:53:35 +0000 Subject: [PATCH] fix_powerpc_ftbfs_with_new_glibc Gbp-Pq: Name fix_powerpc_ftbfs_with_new_glibc.patch --- fpcsrc/rtl/linux/powerpc/cprt0.as | 8 ++------ fpcsrc/rtl/unix/dl.pp | 5 +++-- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/fpcsrc/rtl/linux/powerpc/cprt0.as b/fpcsrc/rtl/linux/powerpc/cprt0.as index e237d8d1..9b651c9f 100644 --- a/fpcsrc/rtl/linux/powerpc/cprt0.as +++ b/fpcsrc/rtl/linux/powerpc/cprt0.as @@ -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 diff --git a/fpcsrc/rtl/unix/dl.pp b/fpcsrc/rtl/unix/dl.pp index b2a1253a..0e0089f0 100644 --- a/fpcsrc/rtl/unix/dl.pp +++ b/fpcsrc/rtl/unix/dl.pp @@ -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} -- 2.30.2