From: Jan Kiszka <jan.kiszka@domain.hid>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: Thomas Wiedemann <Thomas.Wiedemann@domain.hid>, xenomai@xenomai.org
Subject: Re: [Xenomai-core] Compiler and linker flags
Date: Sun, 08 Oct 2006 19:59:55 +0200 [thread overview]
Message-ID: <45293C9B.1030608@domain.hid> (raw)
In-Reply-To: <17705.6276.735921.764908@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 3468 bytes --]
Gilles Chanteperdrix wrote:
> Jan Kiszka wrote:
> > Thomas Wiedemann wrote:
> > >> BTW, providing a patch, even if it's trivial, is always welcome in such
> > >> cases.
> > >
> > > I had already attached it to the email, but then i thought it was so
> > > ridiculously small ... and removed it :)
> > > So here it is again.
> >
> > The point is if you start a thread like "[PATCH] Remove -I. from
> > xeno-config" and attach a full patch (including ChangeLog fragment) you
> > make it more likely to gain full attention and help to get it applied
> > quickly.
> >
> > >
> > >
> > >> Well, -Wall should be considered a reasonable policy to keep code clean.
> > >> Me feeling is that this switch is fairly appropriate, specifically for
> > >> real-time applications. But it can easily be relaxed by adding specific
> > >> -Wno-xxx after the Xenomai flags. And *that* should happen explicitly.
> > >>
> > >> -pipe is an optimisation of the build process, something one may
> > >> discuss, though I don't see an immediate reason why it could fail in the
> > >> context of Xenomai applications (that should use the GNU toolchain
> > > anyway).
> > >
> > > I definitley agree on the use of "-Wall" and "-pipe", but i think these
> > > optional flags should be set in the main project, and not by external
> > > libraries or tools. It's not that i think they would conflict with
> > > other flags or that they are wrong or inappropriate, but just because
> > > i expect *-config-tools to not specify any flags that affect the
> > > compiler behaviour. I just don't want every libraries' config-script
> > > to place the authors favorite compiler-flags into my own flags.
> >
> > I agree now, for the sake of cleanness and as we are not just discussing
> > -Wall and -pipe here:
> >
> > # xeno-config --xeno-cflags
> > -I. -I<xenomai-inst>/include -O2 -D_GNU_SOURCE -D_REENTRANT -D__XENO__
> > -Wall -pipe -fstrict-aliasing -Wno-strict-aliasing
> >
> > # xeno-config --posix-cflags
> > -I. -I<xenomai-inst>/include -I<xenomai-inst>/include/posix -O2
> > -D_GNU_SOURCE -D_REENTRANT -D__XENO__ -Wall -pipe -fstrict-aliasing
> > -Wno-strict-aliasing
> >
> > # xeno-config --xeno-ldflags
> > -L<xenomai-inst>/lib -lpthread -rdynamic
> >
> > # xeno-config --posix-ldflags
> > -Wl,@<xenomai-inst>/lib/posix.wrappers -L<xenomai-inst>/lib -lpthread_rt
> > -lpthread -lrt -rdynamic
> >
> > (all x86, other platforms may vary)
> >
> > @All: What flags are *really* required to build and link some *user*
> > application against Xenomai? Beside that -I. at least -O2 can be fairly
> > problematic I guess - if not even more. Also the debug mode of the
> > Xenomai build leaks to the user if (s)he wants it or not.
> >
> > Time for a cleanup?
>
> -D_GNU_SOURCE is necessary, at least when compiling for the POSIX skin,
> because on some platforms, it makes the defines for the pthread mutex
> types available.
>
> -D_REENTRANT is required when compiling a multithreaded application with
> the glibc. Theoretically, the glibc is not supposed to make its services
> thread safe when a program is not compiled with this define.
>
Ok, they will be saved from the hoover. What about those:
o -D__XENO__
o -fstrict-aliasing -Wno-strict-aliasing
o -rdynamic
Again, only /wrt to user apps. We can keep them all internally.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
next prev parent reply other threads:[~2006-10-08 17:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-04 12:07 [Xenomai-core] Please remove "-I." in "xeno-config --*-cflags Thomas Wiedemann
2006-10-04 13:11 ` Jan Kiszka
2006-10-04 14:23 ` Thomas Wiedemann
2006-10-08 13:23 ` [Xenomai-core] Compiler and linker flags (was: Please remove "-I." in "xeno-config --*-cflags) Jan Kiszka
2006-10-08 15:25 ` Gilles Chanteperdrix
2006-10-08 17:59 ` Jan Kiszka [this message]
2006-10-08 19:31 ` [Xenomai-core] Compiler and linker flags Philippe Gerum
2006-10-08 19:51 ` Jan Kiszka
2006-10-08 20:44 ` Philippe Gerum
2006-10-09 4:54 ` Gilles Chanteperdrix
2006-10-09 6:57 ` Philippe Gerum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45293C9B.1030608@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=Thomas.Wiedemann@domain.hid \
--cc=gilles.chanteperdrix@xenomai.org \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.