* [gentoo-dev] interest assay: eclass for stripping "modern" C[XX]FLAGS
@ 2003-07-03 3:11 George Shapovalov
2003-07-03 3:25 ` Mike Frysinger
0 siblings, 1 reply; 4+ messages in thread
From: George Shapovalov @ 2003-07-03 3:11 UTC (permalink / raw
To: gentoo-dev; +Cc: David Holm
Hi gang.
While working on getting ada related apps ready for use I stumbled upon the
following issue. It happens that validated (read stable and verified as
opposed to alpha-quality stuff in gcc-3.x tree) versions of gnat are based
around older version of gcc, more specifically 2.8.1 (quite popular version
amongst gcc-based compiler developers I might add). This means that when you
will try to use your gcc-3.3 superoptimized set of C[XX]FLAGS for emerging
ada pakages you will get into trouble.
(Note that when you emerge gnat you merely get gcc-2.8.1 backend in addition
to your existing versions. It goes into its own dir and does not even show up
in gcc-config. Thus your regular gcc based emerges are not affected).
In order to go around this some flag stripping and mapping
(like -march={ pentium-mmx => i586 or athlon-* => i686 })
has to be done in the eclass common to ada-related packages.
I highly suspect that this situation is not unique. I can myself name at least
one more such package - gpc, which is so far mostly stable on gcc-2.95.3,
although later alphas can be built with gcc-3.x.
Thus I would like to get an estimate on how usefull it will be to package code
stripping "modern" C[XX]FLAGS to get them in conformance with the required
version of gcc. I envision eclass that provides (say) versionize-flags
function and takes a single argument - two major gcc version numbers (2.8,
2.95 or 3.x) and strips "not yet recognized" flags accordingly.
Actually while I am on it, I think this function will be best fit into the
existing flag-o-matic.eclass.
What does everybody thinks?
George
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-dev] interest assay: eclass for stripping "modern" C[XX]FLAGS
2003-07-03 3:11 [gentoo-dev] interest assay: eclass for stripping "modern" C[XX]FLAGS George Shapovalov
@ 2003-07-03 3:25 ` Mike Frysinger
2003-07-03 8:43 ` George Shapovalov
0 siblings, 1 reply; 4+ messages in thread
From: Mike Frysinger @ 2003-07-03 3:25 UTC (permalink / raw
To: gentoo-dev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wednesday 02 July 2003 23:11, George Shapovalov wrote:
> What does everybody thinks?
i think we already have a function that does this kind of thing ...
see 'strip-flags' ... `man flag-o-matic` if you have a masked version of
portage ;)
- -mike
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
iQIVAwUBPwOiFkFjO5/oN/WBAQIdjw/8CR0+3UJO9VVHOKmpXxOPEbZ7kAbGXvGi
9qTlF2ZdrwxVXTmLmSA3qjiUT7mGzbvcKvadDGCMvL9JzMQtNjTxpH/iqh1g5ZWz
uKAaFwD4PzAHt7pYcTiUku6a5Ykg86nChYgAFEgRayqiLMCs13468X36Z4ZwxxZ0
v5IN/jvLGDJ2JJfxP0QLYwrViLpgl2qi/4pDhGq0u+z0ppDj4fI6iwnHuaeeNg69
94zui/DJfLolZ2ujCquFHXU2Mg126wJkDoqAlUj1XwcorVO8OBVAlUNZtuHrEkPR
8yKDki2NmVJ/1hjG7ggB2TT9V/TI8HDPokg59rnBcOlOM72Xr//AmbbKabo6JNoh
Yk+0EtHJlTHxDmW0GtIWejb9jXaAbJYEviZeOrBULpT498TwRKg0uuulcoytA+6+
5BVFU8/BqjYm83J0vfaffpvUH/pWLZK2CBYaz1377eJRm1b7yJqQ1ggEF0OqxGzd
8Oz0yqcd1Vf+zoWpHCuG2T/VoIPrjIE5dBghxFV1zCyfdQ3qLvIuevksIaAaqSmR
KqB+0ocDiNZZNi8OxdDy4f/7X9z04LXArPV2eh3Yg0FYjmCMp90kmzxeO95Vopmc
3y15LszNC9tJ06AVN+8GqHf8bsp1J08oo/FHEa+xz+hBdTELnezpgYFxnXRQW5hr
48GPIVZ/ycc=
=0HcK
-----END PGP SIGNATURE-----
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-dev] interest assay: eclass for stripping "modern" C[XX]FLAGS
2003-07-03 3:25 ` Mike Frysinger
@ 2003-07-03 8:43 ` George Shapovalov
2003-07-03 12:05 ` David Holm
0 siblings, 1 reply; 4+ messages in thread
From: George Shapovalov @ 2003-07-03 8:43 UTC (permalink / raw
To: gentoo-dev
On Wednesday 02 July 2003 20:25, Mike Frysinger wrote:
> On Wednesday 02 July 2003 23:11, George Shapovalov wrote:
> i think we already have a function that does this kind of thing ...
> see 'strip-flags' ... `man flag-o-matic` if you have a masked version of
> portage ;)
Nice try, but this does not cut it ;).
For one thing that function is gcc version agnostic. For example it will
permit certain -march combinations which are only supported by >=gcc-3*.
On the other hand it may be too restricitve in general, by only allowing flags
listed on some (very small) list.
The function (or alternatively two - three functions containing corresponding
gcc version in the name) to fit the bill perfectly should only strip
unsupported flags for the specified version, "correcting" them where
possible.
Thus, for example:
-march=i686 will be permitted, but
-march=pentium3 will get changed to -march=i686, and
-mfpmath=* will get stripped, etc.
while keeping other flags intact..
Of course in a very pedantic situation both function could be applied in turn
yielding converted and (then) stripped flags ..
George
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-dev] interest assay: eclass for stripping "modern" C[XX]FLAGS
2003-07-03 8:43 ` George Shapovalov
@ 2003-07-03 12:05 ` David Holm
0 siblings, 0 replies; 4+ messages in thread
From: David Holm @ 2003-07-03 12:05 UTC (permalink / raw
To: gentoo-dev
I wrote an ada eclass which I think I submitted along with the gnat ebuilds. However the
flag-stripping is a straight ripoff from the gcc.eclass function gcc2-flags() and maybe I should
inherit that one instead. It also sets some of the standard variables such as $ADAC, $ADAMAKE
and $ADABIND (these are normally read by autoconf whenever you use it to compile ada code).
Another issue is that when you use gnatmake you cannot just throw in the CFLAGS in a random
order. You have to specify -cargs $(CFLAGS) -largs $(LDFLAGS) and these has to come after the
gnatmake flags and the name of the unit you wish to compile.
On another account. Yesterday I managed for the first time to compile the cvs-version of gnat
which is based on gcc 3.2.3. The version of gnat in gcc cvs is a version taken from
ACTs cvs maybe a month before gcc 3.3 was released. So far I haven't seen a single distribution
which provides gnat snapshots as everyone is either using 3.15p or the gcc version, I will try
to whip up an ebuild of it =). Which also means that it would probably be better to make an
eclass that could detect which version is installed and select the appropriate one.
I will have to read up on eclasses as I'm not very familiar with those yet though and something
similar to gcc-config might be in order as I believe the interest for gnat 3.15p will be big
amongst people doing professional work even after the upcoming version is released.
//David Holm
On Thu, 3 Jul 2003 01:43:38 -0700
George Shapovalov <george@gentoo.org> wrote:
> On Wednesday 02 July 2003 20:25, Mike Frysinger wrote:
> > On Wednesday 02 July 2003 23:11, George Shapovalov wrote:
> > i think we already have a function that does this kind of thing ...
> > see 'strip-flags' ... `man flag-o-matic` if you have a masked version of
> > portage ;)
> Nice try, but this does not cut it ;).
> For one thing that function is gcc version agnostic. For example it will
> permit certain -march combinations which are only supported by >=gcc-3*.
> On the other hand it may be too restricitve in general, by only allowing flags
> listed on some (very small) list.
>
> The function (or alternatively two - three functions containing corresponding
> gcc version in the name) to fit the bill perfectly should only strip
> unsupported flags for the specified version, "correcting" them where
> possible.
> Thus, for example:
> -march=i686 will be permitted, but
> -march=pentium3 will get changed to -march=i686, and
> -mfpmath=* will get stripped, etc.
> while keeping other flags intact..
>
> Of course in a very pedantic situation both function could be applied in turn
> yielding converted and (then) stripped flags ..
>
> George
>
>
>
> --
> gentoo-dev@gentoo.org mailing list
>
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-07-03 12:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-03 3:11 [gentoo-dev] interest assay: eclass for stripping "modern" C[XX]FLAGS George Shapovalov
2003-07-03 3:25 ` Mike Frysinger
2003-07-03 8:43 ` George Shapovalov
2003-07-03 12:05 ` David Holm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox