[haiku-bugs] Re: [Haiku] #10240: PowerPC build broken after PM

  • From: "kallisti5" <trac@xxxxxxxxxxxx>
  • Date: Mon, 03 Jul 2017 04:20:31 -0000

#10240: PowerPC build broken after PM
----------------------------+----------------------------
   Reporter:  kallisti5     |      Owner:  mmu_man
       Type:  bug           |     Status:  assigned
   Priority:  normal        |  Milestone:  Unscheduled
  Component:  Build System  |    Version:  R1/Development
 Resolution:                |   Keywords:  ppc bootstrap
 Blocked By:                |   Blocking:
Has a Patch:  1             |   Platform:  PowerPC
----------------------------+----------------------------

Comment (by kallisti5):

 the issues above are resolved. Now dealing with atomic issues under
 powerpc.

 I opened a gcc bug around it:
 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81283

 I (incorrectly) worked around one of these dynamic atomic failovers... but
 now running into a bunch:

 {{{
 diff --git a/src/system/libroot/os/arch/ppc/atomic.S
 b/src/system/libroot/os/arch/ppc/atomic.S
 index d0c2a27379..540bf3dda3 100644
 --- a/src/system/libroot/os/arch/ppc/atomic.S
 +++ b/src/system/libroot/os/arch/ppc/atomic.S
 @@ -83,3 +83,13 @@ lost6:       lwarx   %r5, 0, %r3
                 mr              %r3, %r5
                 blr
  FUNCTION_END(atomic_get)
 +
 +/* If GCC emits this, it means
 +   the target architecture doesn't
 +   support 64-bit atomics.
 +   Just do a sync, and return
 +*/
 +FUNCTION(__atomic_fetch_add_8):
 +       sync
 +       blr
 +FUNCTION_END(__atomic_fetch_add_8)
 }}}

 {{{
 Link
 
/home/kallisti5/Code/haiku/generated.ppc/objects/haiku/ppc/release/servers/app/app_server
 
/home/kallisti5/Code/haiku/generated.ppc/objects/haiku/ppc/release/servers/app/DelayedMessage.o:
 In function `DelayedMessageSender::CountSentMessages() const':
 DelayedMessage.cpp:(.text+0xd38): undefined reference to `__atomic_load_8'
 
/home/kallisti5/Code/haiku/generated.ppc/objects/haiku/ppc/release/servers/app/DelayedMessage.o:
 In function `DelayedMessageSender::_SendDelayedMessages()':
 DelayedMessage.cpp:(.text+0x1078): undefined reference to
 `__atomic_store_8'
 DelayedMessage.cpp:(.text+0x11e8): undefined reference to
 `__atomic_store_8'
 DelayedMessage.cpp:(.text+0x127c): undefined reference to
 `__atomic_load_8'
 DelayedMessage.cpp:(.text+0x12cc): undefined reference to
 `__atomic_store_8'
 
/home/kallisti5/Code/haiku/generated.ppc/objects/haiku/ppc/release/servers/app/DelayedMessage.o:
 In function `DelayedMessageSender::_MessageLoop()':
 DelayedMessage.cpp:(.text+0x1394): undefined reference to
 `__atomic_load_8'
 DelayedMessage.cpp:(.text+0x13d0): undefined reference to
 `__atomic_load_8'
 
/home/kallisti5/Code/haiku/generated.ppc/objects/haiku/ppc/release/servers/app/DelayedMessage.o:
 In function `DelayedMessageSender::_Wakeup(long long)':
 DelayedMessage.cpp:(.text+0x1500): undefined reference to
 `__atomic_load_8'
 DelayedMessage.cpp:(.text+0x1524): undefined reference to
 `__atomic_store_8'
 collect2: error: ld returned 1 exit status
 }}}

--
Ticket URL: <https://dev.haiku-os.org/ticket/10240#comment:26>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: