Charlton, John wrote:
> > 
> > 
> > -----Original Message----- From: Gilles Chanteperdrix
> > [mailto:[email protected]] Sent: Thursday, August 13,
> > 2009 7:32 AM To: Charlton, John Cc: [email protected] Subject: Re:
> > [Xenomai-help] pthread_setschedparam: Function not implemented
> 
> > Ah. So, it is a build issue. Show us the flags with which Xenomai is
> > configured by this build tool? Note however that since latency is not
> > linked with libpthread_rt.so.1.0.0 I do not see how overwriting
> > libpthread_rt.so can make latency -t 1 or latency -t 2 run.
> 
>
> This issue is now resolved.  Thank you for the help.  Sorry I didn't
> make it clear that it was a build issue.  This is what Jay determined
> is the problem:
>
> The problem was one (or more) of the following compiler flags, which
>  are added as part of the defaults for OE/Angstrom:
> -fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2

Ok. I am a bit surprised, but I do not know the x86 syscall macros well
enough to know whether compiling them with -O2 may break them. So, maybe
that is what happens. If that is the case, I think we should fix it (and
maybe Jan latest work on the syscall macros fixes it).

>
> These are the flags passed for "FULL_OPTIMAZATION". Obviously, one of
> these optimizations messes up xenomai. In fact, if you look at the
> Makefile, -O2 is used for the user programs, but not for the skins
> libraries.
>
> The bitbake recipe now includes the following lines:
> # set CFLAGS and CXXFLAGS to ${CPPFLAGS} so that they just have the
> appropirate -isystem flag, but no of the other -f flags, as they break
> the posix skin library build
> export CFLAGS="${CPPFLAGS}"
> export CXXFLAGS="${CPPFLAGS}"
> export TARGET_CFLAGS="${CFLAGS}"
> export TARGET_CXXFLAGS="${CXXFLAGS}"
> ./configure --build=i686-angstrom-linux

This is wrong. Passing the flags to configure using environment variable
is deprecated since even before the birth of the Xenomai project.
TARGET_CFLAGS and TARGET_CXXFLAGS are not used anywhere by Xenomai build
system.

> The CPPFLAGS variable doesn't get the optimization flags, but does get
> the required -isystem flag, so we'll use that for our CFLAGS and
> CXXFLAGS.
>
> I've run into code in the past that was broken by compiler
> optimizations, this is just another case.


-- 
                                          Gilles


_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to