FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 02-06-2009, 04:43 AM
daid kahl
 
Default Multiple architectures for portage CFLAGS?

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
 
Old 02-07-2009, 04:54 AM
ABCD
 
Default Multiple architectures for portage CFLAGS?

-----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

iEYEARECAAYFAkmNIhcACgkQOypDUo0oQOpmzwCbBmDk9w0vdr 1OxO8YPBeLhQBq
lqkAoJ41FE04llfOHF1RH1DG0rUxJg9d
=rEti
-----END PGP SIGNATURE-----
 

Thread Tools




All times are GMT. The time now is 08:27 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org