* [gentoo-user] Multiple architectures for portage CFLAGS?
@ 2009-02-06 5:43 daid kahl
2009-02-07 5:54 ` [gentoo-user] " ABCD
0 siblings, 1 reply; 2+ messages in thread
From: daid kahl @ 2009-02-06 5:43 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 765 bytes --]
Hello,
I have encountered a problem maintaining my system using revdep-rebuild. I
have both gcc-3.4.6 and gcc-4.3.2 installed on my machine. I mainly use
gcc4, but sometimes I need g77 because many people at my laboratory use
fortran code that is not compliant with gfortran standards.
However, I have an Intel duo Core machine, so I usually have the CFLAG
march=core2, but this is not supported in gcc3. Thus, if I need to rebuild
gcc3 during revdep-rebuild, I have to do most of the updates by hand so that
I can turn on an older march setting for gcc3 (such as march=nocona).
Is there some way to set specfic CFLAGS for different gcc installs? Is my
method of manually having different architectures for different gcc
installations a risk?
Regards,
daid
[-- Attachment #2: Type: text/html, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* [gentoo-user] Re: Multiple architectures for portage CFLAGS?
2009-02-06 5:43 [gentoo-user] Multiple architectures for portage CFLAGS? daid kahl
@ 2009-02-07 5:54 ` ABCD
0 siblings, 0 replies; 2+ messages in thread
From: ABCD @ 2009-02-07 5:54 UTC (permalink / raw
To: gentoo-user
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
daid kahl wrote:
> Hello,
>
> I have encountered a problem maintaining my system using revdep-rebuild. I
> have both gcc-3.4.6 and gcc-4.3.2 installed on my machine. I mainly use
> gcc4, but sometimes I need g77 because many people at my laboratory use
> fortran code that is not compliant with gfortran standards.
>
> However, I have an Intel duo Core machine, so I usually have the CFLAG
> march=core2, but this is not supported in gcc3. Thus, if I need to rebuild
> gcc3 during revdep-rebuild, I have to do most of the updates by hand so that
> I can turn on an older march setting for gcc3 (such as march=nocona).
>
> Is there some way to set specfic CFLAGS for different gcc installs? Is my
> method of manually having different architectures for different gcc
> installations a risk?
>
> Regards,
> daid
>
It is possible, although unsupported, to set CFLAGS/CXXFLAGS for a
particular version of a package. The bashrc for the base profile (which
all modern profiles inherit from) will attempt to source, if they exist,
the following files:
/etc/portage/env/${CATEGORY}/${PN}
/etc/portage/env/${CATEGORY}/${PN}-${PV}
/etc/portage/env/${CATEGORY}/${PN}-${PV}-${PR}
(where for sys-devel/gcc-3.4.6-r2, CATEGORY=sys-devel, PN=gcc, PV=3.4.6,
and PR=r2 (when there is no "-r#" part, PR=r0))
In one of those files, you can export a new value for CFLAGS/CXXFLAGS.
Note that not all portage variables can be changed in this manner. (To
be precise, variables that are referenced from the parts of portage
written in bash can be changed in this manner.) Also note that if you
have 'CXXFLAGS="${CFLAGS}"' in your make.conf, this will set CXXFLAGS to
the value of CFLAGS *that is in make.conf*, so you will need to modify
CXXFLAGS as well as CFLAGS.
- --
ABCD
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkmNIhcACgkQOypDUo0oQOpmzwCbBmDk9w0vdr1OxO8YPBeLhQBq
lqkAoJ41FE04llfOHF1RH1DG0rUxJg9d
=rEti
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-02-07 5:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-06 5:43 [gentoo-user] Multiple architectures for portage CFLAGS? daid kahl
2009-02-07 5:54 ` [gentoo-user] " ABCD
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox