Patch by Alexander von Gluck (kallisti5) to get the PPC build going again
(mostly at least). Also disables -Werror for the binutils, but those should be fixed eventually. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29804 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
a9cd24f58e
commit
328029e178
@ -89,7 +89,7 @@ mkdir -p $installDir/lib/gcc/$haikuMachine/$gccVersion
|
||||
cd $binutilsObjDir
|
||||
CFLAGS="-O2" CXXFLAGS="-O2" $binutilsSourceDir/configure \
|
||||
--prefix=$installDir --target=$haikuMachine --disable-nls \
|
||||
--disable-shared --disable-multilib || exit 1
|
||||
--disable-shared --disable-multilib --disable-werror || exit 1
|
||||
$MAKE || exit 1
|
||||
$MAKE install || exit 1
|
||||
|
||||
|
@ -20,7 +20,7 @@ void ppc_pop_iframe(struct iframe_stack *stack);
|
||||
struct iframe *ppc_get_user_iframe(void);
|
||||
|
||||
|
||||
extern inline struct thread *
|
||||
static inline struct thread *
|
||||
arch_thread_get_current_thread(void)
|
||||
{
|
||||
struct thread *t;
|
||||
@ -29,7 +29,7 @@ arch_thread_get_current_thread(void)
|
||||
}
|
||||
|
||||
|
||||
extern inline void
|
||||
static inline void
|
||||
arch_thread_set_current_thread(struct thread *t)
|
||||
{
|
||||
asm volatile("mtsprg2 %0" : : "r"(t));
|
||||
|
@ -29,14 +29,6 @@ status_t arch_thread_enter_userspace(struct thread *t, addr_t entry,
|
||||
void arch_thread_switch_kstack_and_call(struct thread *t, addr_t new_kstack,
|
||||
void (*func)(void *), void *arg);
|
||||
|
||||
// ToDo: doing this this way is an ugly hack - please fix me!
|
||||
// (those functions are "static inline" for x86 - since
|
||||
// "extern inline" doesn't work for "gcc -g"...)
|
||||
#ifndef ARCH_x86
|
||||
struct thread *arch_thread_get_current_thread(void);
|
||||
void arch_thread_set_current_thread(struct thread *t);
|
||||
#endif
|
||||
|
||||
bool arch_on_signal_stack(struct thread *thread);
|
||||
status_t arch_setup_signal_frame(struct thread *t, struct sigaction *sa,
|
||||
int signal, int signalMask);
|
||||
|
@ -471,17 +471,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
|
||||
#if __POWERPC__ /* atoll is missing from the PowerPC standard library. */
|
||||
static long long atoll (const char *str) {
|
||||
long long result = 0;
|
||||
if (!str || !str[0])
|
||||
return 0;
|
||||
if (sscanf (str, "%Ld", &result) != 1)
|
||||
result = 0;
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Standard C++ library. */
|
||||
|
||||
#include <iostream>
|
||||
|
@ -85,7 +85,7 @@ arch_cpu_sync_icache(void *address, size_t len)
|
||||
void
|
||||
arch_cpu_memory_read_barrier(void)
|
||||
{
|
||||
#warning PPC: is it model-dependant ?
|
||||
// WARNING PPC: is it model-dependant ?
|
||||
asm volatile ("lwsync");
|
||||
}
|
||||
|
||||
@ -93,7 +93,7 @@ arch_cpu_memory_read_barrier(void)
|
||||
void
|
||||
arch_cpu_memory_write_barrier(void)
|
||||
{
|
||||
#warning PPC: is it model-dependant ?
|
||||
// WARNING PPC: is it model-dependant ?
|
||||
asm volatile ("isync");
|
||||
asm volatile ("eieio");
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ ppc_exception_entry(int vector, struct iframe *iframe)
|
||||
if (kernelDebugger) {
|
||||
// if this thread has a fault handler, we're allowed to be here
|
||||
struct thread *thread = thread_get_current_thread();
|
||||
if (thread && thread->fault_handler != NULL) {
|
||||
if (thread && thread->fault_handler != 0) {
|
||||
iframe->srr0 = thread->fault_handler;
|
||||
break;
|
||||
}
|
||||
|
@ -235,11 +235,6 @@ arch_restore_signal_frame(void)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_check_syscall_restart(struct thread *thread)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/** Saves everything needed to restore the frame in the child fork in the
|
||||
* arch_fork_arg structure to be passed to arch_restore_fork_frame().
|
||||
|
Loading…
Reference in New Issue
Block a user