summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Watson <jarrah@users.sourceforge.net>2003-07-21 16:51:40 +0000
committerGreg Watson <jarrah@users.sourceforge.net>2003-07-21 16:51:40 +0000
commit634a99110ce8ad99016fed21037b37f93e253a95 (patch)
tree43a075c47d4556d9d8ef4759c0196288b1e68f17
parent9a0989b941dc44d8ccca929a9a9a471529c5fda2 (diff)
fix crt0 includes ordering
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@996 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
-rw-r--r--util/newconfig/config.g13
1 files changed, 8 insertions, 5 deletions
diff --git a/util/newconfig/config.g b/util/newconfig/config.g
index 7cfdc14236..c4987304c1 100644
--- a/util/newconfig/config.g
+++ b/util/newconfig/config.g
@@ -197,6 +197,7 @@ class romimage:
self.ldscripts = []
self.userdefines = []
self.initincludes = {}
+ self.initincludesorder = [] # need to preserve order
self.useinitincludes = 0 # transitional
self.partinstance = 0
self.root = 0
@@ -333,9 +334,10 @@ class romimage:
print "Warning, init include for %s previously defined" % path
o = initinclude(str, path)
setdict(self.initincludes, path, o)
+ self.initincludesorder.append(path)
def getinitincludes(self):
- return self.initincludes
+ return self.initincludesorder
def getinitinclude(self, path):
o = getdict(self.initincludes, path)
@@ -1474,7 +1476,7 @@ def writeimagemakefile(image):
# Print out the dependencies for crt0_includes.h
file.write("\n# Dependencies for crt0_includes.h\n")
file.write("CRT0_INCLUDES:=\n")
- for inc in image.getinitincludes().keys():
+ for inc in image.getinitincludes():
if (local_path.match(inc)):
file.write("CRT0_INCLUDES += %s\n" % inc)
else:
@@ -1587,7 +1589,8 @@ def writeinitincludes(image):
while (line):
p = include_pattern.match(line)
if (p):
- for i, inc in image.getinitincludes().items():
+ for i in image.getinitincludes():
+ inc = image.getinitinclude(i)
if (inc.getstring() == p.group(1)):
outfile.write("#include \"%s\"\n" % inc.getpath())
else:
@@ -1596,7 +1599,7 @@ def writeinitincludes(image):
infile.close()
else:
- for i in image.getinitincludes().keys():
+ for i in image.getinitincludes():
outfile.write("#include <%s>\n" % i)
outfile.close()
@@ -1713,7 +1716,7 @@ if __name__=='__main__':
# crt0 includes
if (debug.level(debug.dump)):
- for i in image.getinitincludes().keys():
+ for i in image.getinitincludes():
debug.info(debug.dump, "crt0include file %s" % i)
for i in image.getdriverrules().keys():
debug.info(debug.dump, "driver file %s" % i)