[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: System V IPC on LX



David Andersson wrote:
> 
> When trying to make for target, I get:
> 
> [david@burk14 hello]$ make
> gcc_cris -mlinux -DCRISMMU
> -muclibc=/home/david/LX/axis/devboard_lx/eroot -s -static hello.o  -o
> hello
> hello.o: In function `main':
> hello.o(.text+0x46): undefined reference to `semget'
> hello.o(.text+0x6e): undefined reference to `semctl'
> hello.o(.text+0xb0): undefined reference to `semop'
> hello.o(.text+0x148): undefined reference to `semop'
> collect2: ld returned 1 exit status
> make: *** [hello] Error 1
> 
> What am I doing wrong?

Hi David,

You're not doing anything wrong.  The SYSV IPC semaphore functions were
added recently to Lineo's uC-libc, but are currently missing in the
uC-libc that comes with the developer board.  Good news is they are easy
enough to add.  The semaphore functions are multiplexed via the ipc
system call, like this:

int
semget (key, nsems, semflg)
    key_t key;
    int nsems;
    int semflg;
{
    return __ipc(IPCOP_semget, key, nsems, semflg, NULL);
}

I'll add it to our uC-libc, and get back to you with a patch to uC-libc
once I have tested it.

-- 
Orjan Friberg              E-mail: orjan.friberg@xxxxxxx.com
Axis Communications AB     Phone:  +46 46 272 17 68