On Wed, Feb 08, 2012 at 11:32:10AM +0100, Christoph Egger wrote:
> On 02/08/12 02:18, Kevin O'Connor wrote:
> >We can change the seabios makefile to call these scripts with an
> >explicit $(PYTHON).
> 
> Awesome!

See the attached patch.

> >That's quite odd.  This looks data related instead of python related.
> >Try running a "make clean" and then "make" in just the seabios
> >directory.  If you still see an issue, tar up the seabios "out/"
> >directory and mail it to me.
> 
> It failed the same way.
> I sent you the tarball offlist due its size.

Looks like your version of gcc is defining sections with
.rodata.__PRETTY_FUNCTION__ - which is odd as that macro isn't used in
the code.  Does the second attached patch fix it for you?

-Kevin
>From 97f1ffcfac4ca382b5008a7aabfc2c300131f978 Mon Sep 17 00:00:00 2001
From: Kevin O'Connor <[email protected]>
Date: Wed, 8 Feb 2012 20:21:29 -0500
Subject: [PATCH 1/2] Add PYTHON definition to Makefile.

Add PYTHON definition to Makefile so users can override it.  This
allows users to specify an exact python executable name to use during
the build.

Signed-off-by: Kevin O'Connor <[email protected]>
---
 Makefile |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index 0343ce5..513e8f1 100644
--- a/Makefile
+++ b/Makefile
@@ -63,6 +63,7 @@ export KCONFIG_CONFIG     := $(CURDIR)/.config
 OBJCOPY=objcopy
 OBJDUMP=objdump
 STRIP=strip
+PYTHON=python
 
 # Default targets
 -include $(KCONFIG_CONFIG)
@@ -152,7 +153,7 @@ $(OUT)romlayout16.lds: $(OUT)ccode32flat.o 
$(OUT)code32seg.o $(OUT)code16.o tool
        $(Q)$(OBJDUMP) -thr $(OUT)code32flat.o > $(OUT)code32flat.o.objdump
        $(Q)$(OBJDUMP) -thr $(OUT)code32seg.o > $(OUT)code32seg.o.objdump
        $(Q)$(OBJDUMP) -thr $(OUT)code16.o > $(OUT)code16.o.objdump
-       $(Q)./tools/layoutrom.py $(OUT)code16.o.objdump 
$(OUT)code32seg.o.objdump $(OUT)code32flat.o.objdump $(OUT)romlayout16.lds 
$(OUT)romlayout32seg.lds $(OUT)romlayout32flat.lds
+       $(Q)$(PYTHON) ./tools/layoutrom.py $(OUT)code16.o.objdump 
$(OUT)code32seg.o.objdump $(OUT)code32flat.o.objdump $(OUT)romlayout16.lds 
$(OUT)romlayout32seg.lds $(OUT)romlayout32flat.lds
 
 # These are actually built by tools/layoutrom.py above, but by pulling them
 # into an extra rule we prevent make -j from spawning layoutrom.py 4 times.
@@ -174,7 +175,7 @@ $(OUT)bios.bin.elf $(OUT)bios.bin: $(OUT)rom.o 
tools/checkrom.py
        @echo "  Prepping $@"
        $(Q)$(OBJDUMP) -thr $< > $<.objdump
        $(Q)$(OBJCOPY) -O binary $< $(OUT)bios.bin.raw
-       $(Q)./tools/checkrom.py $<.objdump $(OUT)bios.bin.raw $(OUT)bios.bin
+       $(Q)$(PYTHON) ./tools/checkrom.py $<.objdump $(OUT)bios.bin.raw 
$(OUT)bios.bin
        $(Q)$(STRIP) -R .comment $< -o $(OUT)bios.bin.elf
 
 
@@ -204,15 +205,15 @@ $(OUT)vgabios.bin.raw: $(OUT)vgarom.o
 
 $(OUT)vgabios.bin: $(OUT)vgabios.bin.raw tools/buildrom.py
        @echo "  Finalizing rom $@"
-       $(Q)./tools/buildrom.py $< $@
+       $(Q)$(PYTHON) ./tools/buildrom.py $< $@
 
 ####### dsdt build rules
 src/%.hex: src/%.dsl ./tools/acpi_extract_preprocess.py ./tools/acpi_extract.py
        @echo "Compiling DSDT"
        $(Q)cpp -P $< > $(OUT)$*.dsl.i.orig
-       $(Q)./tools/acpi_extract_preprocess.py $(OUT)$*.dsl.i.orig > 
$(OUT)$*.dsl.i
+       $(Q)$(PYTHON) ./tools/acpi_extract_preprocess.py $(OUT)$*.dsl.i.orig > 
$(OUT)$*.dsl.i
        $(Q)iasl -l -tc -p $(OUT)$* $(OUT)$*.dsl.i
-       $(Q)./tools/acpi_extract.py $(OUT)$*.lst > $(OUT)$*.off
+       $(Q)$(PYTHON) ./tools/acpi_extract.py $(OUT)$*.lst > $(OUT)$*.off
        $(Q)cat $(OUT)$*.off > $@
 
 $(OUT)ccode32flat.o: src/acpi-dsdt.hex src/ssdt-proc.hex src/ssdt-pcihp.hex
-- 
1.7.6.5

>From 805ede2bd35243a4298bc64bd81be6db7cf57f58 Mon Sep 17 00:00:00 2001
From: Kevin O'Connor <[email protected]>
Date: Wed, 8 Feb 2012 20:23:36 -0500
Subject: [PATCH 2/2] Permit .rodata.__PRETTY_FUNCTION__. sections in roms.

Some versions of gcc appear to define these sections even though they
aren't used in the code.

Signed-off-by: Kevin O'Connor <[email protected]>
---
 tools/layoutrom.py |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/tools/layoutrom.py b/tools/layoutrom.py
index 45738a3..86e1f33 100755
--- a/tools/layoutrom.py
+++ b/tools/layoutrom.py
@@ -147,8 +147,10 @@ def getSectionsPrefix(sections, category, prefix):
 def doLayout(sections):
     # Determine 16bit positions
     textsections = getSectionsPrefix(sections, '16', '.text.')
-    rodatasections = (getSectionsPrefix(sections, '16', '.rodata.str1.1')
-                      + getSectionsPrefix(sections, '16', '.rodata.__func__.'))
+    rodatasections = (
+        getSectionsPrefix(sections, '16', '.rodata.str1.1')
+        + getSectionsPrefix(sections, '16', '.rodata.__func__.')
+        + getSectionsPrefix(sections, '16', '.rodata.__PRETTY_FUNCTION__.'))
     datasections = getSectionsPrefix(sections, '16', '.data16.')
     fixedsections = getSectionsPrefix(sections, '16', '.fixedaddr.')
 
@@ -159,8 +161,10 @@ def doLayout(sections):
 
     # Determine 32seg positions
     textsections = getSectionsPrefix(sections, '32seg', '.text.')
-    rodatasections = (getSectionsPrefix(sections, '32seg', '.rodata.str1.1')
-                      +getSectionsPrefix(sections, '32seg', 
'.rodata.__func__.'))
+    rodatasections = (
+        getSectionsPrefix(sections, '32seg', '.rodata.str1.1')
+        + getSectionsPrefix(sections, '32seg', '.rodata.__func__.')
+        + getSectionsPrefix(sections, '32seg', '.rodata.__PRETTY_FUNCTION__.'))
     datasections = getSectionsPrefix(sections, '32seg', '.data32seg.')
 
     code32seg_start = setSectionsStart(
-- 
1.7.6.5

_______________________________________________
SeaBIOS mailing list
[email protected]
http://www.seabios.org/mailman/listinfo/seabios

Reply via email to