# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.364 2005/11/07 15:46:05 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.365 2005/11/07 16:25:06 rocket Exp $
+
+ 07 Nov 2005; Eric Edgar <rocket@gentoo.org>
+ modules/generic_stage_target.py, modules/stage1_target.py:
+ Allow LDFLAGS to be specified as an ENV variable for stage1
07 Nov 2005; Eric Edgar <rocket@gentoo.org>
modules/generic_stage_target.py:
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.69 2005/11/07 15:46:05 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.70 2005/11/07 16:25:06 rocket Exp $
"""
This class does all of the chroot setup, copying of files, etc. It is
print "Using CXXFLAGS setting from seed stage"
self.settings["CXXFLAGS"]=self.makeconf["CXXFLAGS"]
+ def override_ldflags(self):
+ if os.environ.has_key("LDFLAGS"):
+ self.settings["LDFLAGS"] = os.environ["LDFLAGS"]
+ if self.settings.has_key("ldflags"):
+ self.settings["LDFLAGS"]=list_to_string(self.settings["ldflags"])
+ if self.makeconf.has_key("LDFLAGS"):
+ print "Using LDFLAGS setting from seed stage"
+ self.settings["LDFLAGS"]=self.makeconf["LDFLAGS"]
+
def set_install_mask(self):
if self.settings.has_key("install_mask"):
if type(self.settings["install_mask"]) != types.StringType:
self.override_chost()
self.override_cflags()
self.override_cxxflags()
+ self.override_ldflags()
# modify and write out make.conf (for the chroot)
cmd("rm -f "+self.settings["chroot_path"]+"/etc/make.conf","Could not remove "+self.settings["chroot_path"]+"/etc/make.conf")
myf=open(self.settings["chroot_path"]+"/etc/make.conf","w")
else:
myf.write('CXXFLAGS="${CFLAGS}"\n')
+ if self.settings.has_key("LDFLAGS"):
+ myf.write('LDFLAGS="'+self.settings["LDFLAGS"]+'"\n')
+
# figure out what our USE vars are for building
myusevars=[]
if self.settings.has_key("HOSTUSE"):
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/stage1_target.py,v 1.10 2005/08/09 14:12:26 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/stage1_target.py,v 1.11 2005/11/07 16:25:06 rocket Exp $
"""
Builder class for a stage1 installation tarball build.
if self.settings.has_key("cxxflags"):
self.settings["CXXFLAGS"]=list_to_string(self.settings["cxxflags"])
-def register(foo):
+ def override_ldflags(self):
+ if os.environ.has_key("LDFLAGS"):
+ self.settings["LDFLAGS"] = os.environ["LDFLAGS"]
+ if self.settings.has_key("ldflags"):
+ self.settings["LDFLAGS"]=list_to_string(self.settings["ldflags"])
+
+def reg(foo):
foo.update({"stage1":stage1_target})
return foo