[Bug 3988] pth-2.0.2-r0 does not compile

bugzilla-daemon at treke.net bugzilla-daemon at treke.net
Sat Mar 22 13:54:39 UTC 2008


http://bugs.openembedded.net/show_bug.cgi?id=3988





--- Comment #2 from Claes Mogren <cm at acc.umu.se>  2008-03-22 13:54:39 ---
I've tried to look around in pth_mctx.c to see if I could figure out a way
around it. What version of glibc is OpenMoko really using? If I do a bitbake -c
rebuild glibc it looks like glibc-2.5-r10 is being built. Or are multiple
versions built, and linked differently with different programs? 

This is the code in pth_mctx.c where the ifdefs fail:

8<--------------------------------------------------

/*
 * VARIANT 3: LINUX SPECIFIC JMP_BUF FIDDLING
 *
 * Oh hell, I really love it when Linux guys talk about their "POSIX
 * compliant system". It's far away from POSIX compliant, IMHO. Autoconf
 * finds sigstack/sigaltstack() on Linux, yes. But it doesn't work. Why?
 * Because on Linux below version 2.2 and glibc versions below 2.1 these
 * two functions are nothing more than silly stub functions which always
 * return just -1. Very useful, yeah...
 */

#include <features.h>

intern int pth_mctx_set(
    pth_mctx_t *mctx, void (*func)(void), char *sk_addr_lo, char *sk_addr_hi)
{
    pth_mctx_save(mctx);
#if defined(__GLIBC__) && defined(__GLIBC_MINOR__) \
    && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 0 && defined(JB_PC) &&
defined(JB_SP)
    mctx->jb[0].__jmpbuf[JB_PC] = (int)func;
    mctx->jb[0].__jmpbuf[JB_SP] = (int)sk_addr_hi;
#elif defined(__GLIBC__) && defined(__GLIBC_MINOR__) \
    && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 0 && defined(__mc68000__)
    mctx->jb[0].__jmpbuf[0].__aregs[0] = (long int)func;
    mctx->jb[0].__jmpbuf[0].__sp = (int *)sk_addr_hi;
#elif defined(__GNU_LIBRARY__) && defined(__i386__)
    mctx->jb[0].__jmpbuf[0].__pc = (char *)func;
    mctx->jb[0].__jmpbuf[0].__sp = sk_addr_hi;
#else
#error "Unsupported Linux (g)libc version and/or platform"
#endif
    sigemptyset(&mctx->sigs);
    mctx->error = 0;
    return TRUE;
}

8<--------------------------------------------------

I don't think that pth is the problem any more, rather something in the
dependancies in om. I'll try yet another fresh rebuild soon to see if that
helps.


-- 
Configure bugmail: http://bugs.openembedded.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.




More information about the Openembedded-issues mailing list