* MIPS atomic builtins
@ 2008-05-06 11:50 James Molloy
2008-05-06 11:59 ` James Molloy
0 siblings, 1 reply; 2+ messages in thread
From: James Molloy @ 2008-05-06 11:50 UTC (permalink / raw)
To: gcc-help
Hi,
I'm compiling for the mips64el-elf target and would like to use gcc's
atomic builtin functions as provided by this patch:
http://gcc.gnu.org/ml/gcc-patches/2007-09/msg00839.html
I'm using GCC 4.3.0, and a quick grep of the source tree tells me that
the above patch has been applied already (it was not, on GCC 4.2.3).
I'm configuring with the option --with-llsc=yes, and the configure and
compile completes successfully, however when I attempt to compile
sources which use the builtin __sync_bool_compare_and_swap or
__sync_add_and_fetch I still get an unresolved external link error;
> CMakeFiles/kernel.dir/core/process/Semaphore.cc.o: In function
`Atomic<int>::compareAndSwap(int, int)':
>
(.text._ZN6AtomicIiE14compareAndSwapEii[Atomic<int>::compareAndSwap(int,
int)]+0x30): undefined reference to `__sync_bool_compare_and_swap_4'
When I try to compile with the -mllsc option, as suggested by the patch
description, cc1plus quits with an invalid command line option error.
I'd appreciate it if someone could give me a hint as to how to get gcc
to use its builtins for my MIPS target - it should be noted however that
I am compiling with -mips32; that is I am compiling 32-bit mips code
(which is intended to be run on a 64-bit processor - an r4000 compatible).
Thanks,
James Molloy
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: MIPS atomic builtins
2008-05-06 11:50 MIPS atomic builtins James Molloy
@ 2008-05-06 11:59 ` James Molloy
0 siblings, 0 replies; 2+ messages in thread
From: James Molloy @ 2008-05-06 11:59 UTC (permalink / raw)
To: James Molloy, gcc-help
James Molloy wrote:
> Hi,
>
> I'm compiling for the mips64el-elf target and would like to use gcc's
> atomic builtin functions as provided by this patch:
>
> http://gcc.gnu.org/ml/gcc-patches/2007-09/msg00839.html
>
> I'm using GCC 4.3.0, and a quick grep of the source tree tells me that
> the above patch has been applied already (it was not, on GCC 4.2.3).
>
> I'm configuring with the option --with-llsc=yes, and the configure and
> compile completes successfully, however when I attempt to compile
> sources which use the builtin __sync_bool_compare_and_swap or
> __sync_add_and_fetch I still get an unresolved external link error;
>
> > CMakeFiles/kernel.dir/core/process/Semaphore.cc.o: In function
> `Atomic<int>::compareAndSwap(int, int)':
> >
> (.text._ZN6AtomicIiE14compareAndSwapEii[Atomic<int>::compareAndSwap(int,
> int)]+0x30): undefined reference to `__sync_bool_compare_and_swap_4'
>
> When I try to compile with the -mllsc option, as suggested by the
> patch description, cc1plus quits with an invalid command line option
> error.
>
> I'd appreciate it if someone could give me a hint as to how to get gcc
> to use its builtins for my MIPS target - it should be noted however
> that I am compiling with -mips32; that is I am compiling 32-bit mips
> code (which is intended to be run on a 64-bit processor - an r4000
> compatible).
>
> Thanks,
>
> James Molloy
>
Please ignore this. I was using a build script that created a symlink to
GCC - the wrong version. It was still using the old GCC version (4.2.2).
Apologies.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-05-06 11:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-06 11:50 MIPS atomic builtins James Molloy
2008-05-06 11:59 ` James Molloy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).