Gentoo Archives: gentoo-dev

From: "Preston A. Elder" <prez@××××××××××××××××.net>
To: gentoo-user@g.o
Cc: gentoo-dev@g.o
Subject: [gentoo-dev] GCC 3.0 use flag?
Date: Wed, 27 Mar 2002 03:36:43
Message-Id: 1017221545.27285.15.camel@haven
1 Hi all,
3 What do you all think of adding a 'gcc3' USE flag. This could be used
4 to activate special patches/flags that are only required on GCC 3.0 (and
5 above), and possibly break compilation by 2.95.3 if used.
7 More and more as I look at things, its getting necessary to know which
8 compiler will be building a package. The example I can think of off the
9 top of my head, is that I'm creating an ebuild file for openoffice 641c
10 (currently only 641b is in the archive).
12 Openoffice has a configure flag, called --enable-gcc3, for when
13 compiling with the 3.0.x compiler suite. Openoffice has moved to 3.0.x
14 for their linux builds as of 641c (641b I believe they still used
15 2.95.x). I'm not even sure if it still compiles on 2.95.x, but it
16 should, however I would love to be able to give the option to compile
17 with either, and just set the flag if its gcc 3.0.x.
19 I could figure out the compiler version by doing:
20 GCC_MAJOR=`gcc --version | cut -f1 -d.`
21 and then
22 local myflags
23 if [ $GCC_MAJOR == 3 ]; then
24 myflags="--enable-gcc3"
25 fi
26 then simply add $myflags to the configure options.
28 however the above seems like (and is) a hack. Plus, when patches start
29 being made to fix code that wont compile on gcc 3.0.x (see my previous
30 email), we're going to NEED to know the gcc version in use. Hense, I
31 would suggest a gcc3 use flag. That, or there could be a default
32 veriable offered by portage which contains the GCC version (now THAT
33 would be cool, but not expected).
35 Anyway,
37 Comments? opinions?
39 --
40 PreZ
41 Systems Administrator
44 Goth Code '98: tSKeba5qaSabsaaaGbaa75KAASWGuajmsvbieqcL4BaaLb3F4
45 nId5mefqmDjmmgm#haxthgzpj4GiysNkycSRGHabiabOkauNSW
48 Free online resource for the gothic community.


File name MIME type
signature.asc application/pgp-signature