diff options
Diffstat (limited to 'meta-linaro/recipes-extra/dwarfutils')
9 files changed, 174 insertions, 0 deletions
diff --git a/meta-linaro/recipes-extra/dwarfutils/README b/meta-linaro/recipes-extra/dwarfutils/README new file mode 100644 index 0000000..5edf841 --- /dev/null +++ b/meta-linaro/recipes-extra/dwarfutils/README | |||
@@ -0,0 +1,18 @@ | |||
1 | Patches were submitted upstream and the answer was: | ||
2 | |||
3 | --------- | ||
4 | Yes, I assume host == build in all releases to date. AFAIK you are the | ||
5 | first to try a canadian-cross build. | ||
6 | |||
7 | Another issue is that the build is not set up to do the build anywhere | ||
8 | but inside the source tree. It is true that make-clean/CLEANUP fixes up | ||
9 | the mess pretty well, but a separate build directory would be a nice | ||
10 | (and traditional) thing to allow. | ||
11 | |||
12 | I cannot use your submission for anything (Linaro and I have no | ||
13 | agreement in place) but I think these are interesting and worthwhile | ||
14 | small issues that libdwarf/dwarfdump should be able to deal with. | ||
15 | |||
16 | Thanks for the suggestion. I made a note and should be able to take a | ||
17 | look at this issue in the near future. | ||
18 | --------- | ||
diff --git a/meta-linaro/recipes-extra/dwarfutils/dwarf.inc b/meta-linaro/recipes-extra/dwarfutils/dwarf.inc new file mode 100644 index 0000000..6839f49 --- /dev/null +++ b/meta-linaro/recipes-extra/dwarfutils/dwarf.inc | |||
@@ -0,0 +1,12 @@ | |||
1 | DEPENDS = "elfutils" | ||
2 | LICENSE = "GPLv2" | ||
3 | LIC_FILES_CHKSUM = "file://COPYING;md5=db2a565b9d860834e0f2c9cf569fb4e5" | ||
4 | |||
5 | SRC_URI = "http://www.prevanders.net/libdwarf-${PV}.tar.gz" | ||
6 | |||
7 | SRC_URI[md5sum] = "83ab49c58439254729f543be6977692b" | ||
8 | SRC_URI[sha256sum] = "c0aede3a7368c27572ae1cc403c4cbdbf6eeb91a05adbb6f41c40ed78b75cdd9" | ||
9 | |||
10 | S = "${WORKDIR}/dwarf-${PV}/${BPN}" | ||
11 | |||
12 | inherit autotools | ||
diff --git a/meta-linaro/recipes-extra/dwarfutils/dwarfdump/fix-dump.patch b/meta-linaro/recipes-extra/dwarfutils/dwarfdump/fix-dump.patch new file mode 100644 index 0000000..45ca7a8 --- /dev/null +++ b/meta-linaro/recipes-extra/dwarfutils/dwarfdump/fix-dump.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | --- | ||
2 | Makefile.in | 4 ++++ | ||
3 | 1 file changed, 4 insertions(+) | ||
4 | |||
5 | --- dwarfdump.orig/Makefile.in | ||
6 | +++ dwarfdump/Makefile.in | ||
7 | @@ -104,14 +104,18 @@ naming.o: $(srcdir)/naming.c $(srcdir)/ | ||
8 | # in the tree builds. | ||
9 | trivial_naming.o: $(srcdir)/naming.c | ||
10 | $(CC) $(CFLAGS) -DTRIVIAL_NAMING -c $(srcdir)/naming.c -o trivial_naming.o | ||
11 | |||
12 | tag_tree_build: $(srcdir)/tag_tree.c $(DIRINC)/dwarf.h $(HEADERS) tag_common.o makename.o common.o trivial_naming.o | ||
13 | +ifeq ($(NATIVE),1) | ||
14 | $(CC) $(CFLAGS) $(srcdir)/tag_tree.c tag_common.o common.o makename.o trivial_naming.o $(LDFLAGS) -o tag_tree_build | ||
15 | +endif | ||
16 | |||
17 | tag_attr_build: $(srcdir)/tag_attr.c $(DIRINC)/dwarf.h $(HEADERS) tag_common.o makename.o common.o trivial_naming.o | ||
18 | +ifeq ($(NATIVE),1) | ||
19 | $(CC) $(CFLAGS) $(srcdir)/tag_attr.c tag_common.o common.o makename.o trivial_naming.o $(LDFLAGS) -o tag_attr_build | ||
20 | +endif | ||
21 | |||
22 | tmp-tt-table.c tmp-tt-ext-table.c: $(srcdir)/tag_tree_ext.list $(srcdir)/tag_tree.list tag_tree_build | ||
23 | # gcc -E tag_tree.list does not work, so use a .c name | ||
24 | -rm -f tmp-t1.c | ||
25 | cp $(srcdir)/tag_tree.list tmp-t1.c | ||
diff --git a/meta-linaro/recipes-extra/dwarfutils/dwarfdump2/fix-dump.patch b/meta-linaro/recipes-extra/dwarfutils/dwarfdump2/fix-dump.patch new file mode 100644 index 0000000..18ffe81 --- /dev/null +++ b/meta-linaro/recipes-extra/dwarfutils/dwarfdump2/fix-dump.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | --- | ||
2 | Makefile.in | 11 +++++++---- | ||
3 | 1 file changed, 7 insertions(+), 4 deletions(-) | ||
4 | |||
5 | --- dwarfdump2.orig/Makefile.in | ||
6 | +++ dwarfdump2/Makefile.in | ||
7 | @@ -100,14 +100,17 @@ common.o: $(srcdir)/common.cc $(srcdir) | ||
8 | # in the tree builds. | ||
9 | trivial_naming.o: $(srcdir)/naming.cc | ||
10 | $(CXX) $(CXXFLAGS) -DTRIVIAL_NAMING -c $(srcdir)/naming.cc -o trivial_naming.o | ||
11 | |||
12 | tag_tree_build: $(srcdir)/tag_tree.cc $(DIRINC)/dwarf.h $(HEADERS) tag_common.o trivial_naming.o common.o | ||
13 | - $(CXX) $(CXXFLAGS) $(srcdir)/tag_tree.cc trivial_naming.o tag_common.o common.o $(LDFLAGS) -o tag_tree_build | ||
14 | - | ||
15 | +ifeq ($(NATIVE),1) | ||
16 | + $(CXX) $(CXXFLAGS) $(srcdir)/tag_tree.cc trivial_naming.o tag_common.o common.o $(LDFLAGS) -o tag_tree_build | ||
17 | +endif | ||
18 | tag_attr_build: $(srcdir)/tag_attr.cc $(DIRINC)/dwarf.h $(HEADERS) trivial_naming.o tag_common.o naming.o common.o | ||
19 | - $(CXX) $(CXXFLAGS) $(srcdir)/tag_attr.cc trivial_naming.o tag_common.o common.o $(LDFLAGS) -o tag_attr_build | ||
20 | +ifeq ($(NATIVE),1) | ||
21 | + $(CXX) $(CXXFLAGS) $(srcdir)/tag_attr.cc trivial_naming.o tag_common.o common.o $(LDFLAGS) -o tag_attr_build | ||
22 | +endif | ||
23 | |||
24 | tmp-tt-table.cc tmp-tt-ext-table.cc: $(srcdir)/tag_tree_ext.list $(srcdir)/tag_tree.list tag_tree_build | ||
25 | # gcc -E tag_tree.list does not work, so use a .cc name | ||
26 | -rm -f tmp-t1.cc | ||
27 | cp $(srcdir)/tag_tree.list tmp-t1.cc | ||
diff --git a/meta-linaro/recipes-extra/dwarfutils/dwarfdump2_20121130.bb b/meta-linaro/recipes-extra/dwarfutils/dwarfdump2_20121130.bb new file mode 100644 index 0000000..10999d6 --- /dev/null +++ b/meta-linaro/recipes-extra/dwarfutils/dwarfdump2_20121130.bb | |||
@@ -0,0 +1,22 @@ | |||
1 | require dwarf.inc | ||
2 | |||
3 | DEPENDS = "libdwarf libdwarf-native" | ||
4 | |||
5 | LIC_FILES_CHKSUM = "file://GPL.txt;md5=751419260aa954499f7abaabaa882bbe" | ||
6 | |||
7 | SRC_URI += "file://fix-dump.patch" | ||
8 | |||
9 | do_compile_prepend() { | ||
10 | oe_runmake CXX="${BUILD_CXX}" \ | ||
11 | CXXFLAGS="${BUILD_CXXFLAGS} -I${S}/../libdwarf/ -I." \ | ||
12 | LDFLAGS="${BUILD_LDFLAGS} -ldwarf -lelf" NATIVE=1 | ||
13 | rm *.o dwarfdump | ||
14 | } | ||
15 | |||
16 | do_install() { | ||
17 | install -d ${D}${bindir} ${D}${mandir}/man1 | ||
18 | install -m 0755 dwarfdump ${D}${bindir} | ||
19 | install -m 0644 dwarfdump.1 ${D}${mandir}/man1 | ||
20 | } | ||
21 | |||
22 | PARALLEL_MAKE = "" | ||
diff --git a/meta-linaro/recipes-extra/dwarfutils/dwarfdump_20121130.bb b/meta-linaro/recipes-extra/dwarfutils/dwarfdump_20121130.bb new file mode 100644 index 0000000..1befb31 --- /dev/null +++ b/meta-linaro/recipes-extra/dwarfutils/dwarfdump_20121130.bb | |||
@@ -0,0 +1,22 @@ | |||
1 | require dwarf.inc | ||
2 | |||
3 | DEPENDS = "libdwarf libdwarf-native" | ||
4 | |||
5 | LIC_FILES_CHKSUM = "file://GPL.txt;md5=751419260aa954499f7abaabaa882bbe" | ||
6 | |||
7 | SRC_URI += "file://fix-dump.patch" | ||
8 | |||
9 | do_compile_prepend() { | ||
10 | oe_runmake CC="${BUILD_CC}" \ | ||
11 | CFLAGS="${BUILD_CFLAGS} -I${S}/../libdwarf/ -I." \ | ||
12 | LDFLAGS="${BUILD_LDFLAGS} -ldwarf -lelf" NATIVE=1 | ||
13 | rm *.o dwarfdump | ||
14 | } | ||
15 | |||
16 | do_install() { | ||
17 | install -d ${D}${bindir} ${D}${mandir}/man1 | ||
18 | install -m 0755 dwarfdump ${D}${bindir} | ||
19 | install -m 0644 dwarfdump.1 ${D}${mandir}/man1 | ||
20 | } | ||
21 | |||
22 | PARALLEL_MAKE = "" | ||
diff --git a/meta-linaro/recipes-extra/dwarfutils/dwarfgen_20121130.bb b/meta-linaro/recipes-extra/dwarfutils/dwarfgen_20121130.bb new file mode 100644 index 0000000..97d3b2f --- /dev/null +++ b/meta-linaro/recipes-extra/dwarfutils/dwarfgen_20121130.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | require dwarf.inc | ||
2 | |||
3 | DEPENDS = "libdwarf libdwarf-native" | ||
4 | |||
5 | LIC_FILES_CHKSUM = "file://GPL.txt;md5=751419260aa954499f7abaabaa882bbe" | ||
6 | |||
7 | do_install() { | ||
8 | install -d ${D}${bindir} ${D}${mandir}/man1 | ||
9 | install -m 0755 ${BPN} ${D}${bindir} | ||
10 | install -m 0644 ${BPN}.1 ${D}${mandir}/man1 | ||
11 | } | ||
12 | |||
13 | PARALLEL_MAKE = "" | ||
diff --git a/meta-linaro/recipes-extra/dwarfutils/libdwarf/fix-gennames.patch b/meta-linaro/recipes-extra/dwarfutils/libdwarf/fix-gennames.patch new file mode 100644 index 0000000..901409d --- /dev/null +++ b/meta-linaro/recipes-extra/dwarfutils/libdwarf/fix-gennames.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | --- | ||
2 | Makefile.in | 4 ++-- | ||
3 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
4 | |||
5 | --- libdwarf.orig/Makefile.in | ||
6 | +++ libdwarf/Makefile.in | ||
7 | @@ -135,13 +135,13 @@ libdwarf.so: dwarf_names.h dwarf_names.c | ||
8 | $(CC) $(CFLAGS) -shared $(OBJS) dwarf_names.o -o $@ | ||
9 | |||
10 | none: | ||
11 | echo "do nothing" | ||
12 | common.o: $(srcdir)/common.c $(srcdir)/common.h | ||
13 | - $(CC) $(CFLAGS) -c $(srcdir)/common.c | ||
14 | + $(BUILD_CC) $(BUILD_CFLAGS) -c $(srcdir)/common.c | ||
15 | gennames: $(srcdir)/gennames.c $(srcdir)/dwarf.h common.o | ||
16 | - $(CC) $(CFLAGS) $(srcdir)/gennames.c common.o $(LDFLAGS) -o gennames | ||
17 | + $(BUILD_CC) $(BUILD_CFLAGS) $(srcdir)/gennames.c common.o $(BUILD_LDFLAGS) -o gennames | ||
18 | dwarf_names.c dwarf_names.h: gennames $(srcdir)/dwarf.h | ||
19 | rm -f dwarf_names.h dwarf_names.c | ||
20 | ./gennames @dwarf_namestable@ -i $(srcdir) -o . | ||
21 | |||
22 | |||
diff --git a/meta-linaro/recipes-extra/dwarfutils/libdwarf_20121130.bb b/meta-linaro/recipes-extra/dwarfutils/libdwarf_20121130.bb new file mode 100644 index 0000000..828e0d0 --- /dev/null +++ b/meta-linaro/recipes-extra/dwarfutils/libdwarf_20121130.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | require dwarf.inc | ||
2 | |||
3 | SRC_URI += "file://fix-gennames.patch" | ||
4 | |||
5 | do_install() { | ||
6 | install -d ${D}${libdir} ${D}${includedir}/libdwarf | ||
7 | install -m 0755 libdwarf.a ${D}${libdir} | ||
8 | install -m 0644 ${S}/dwarf.h ${S}/libdwarf.h ${D}${includedir}/libdwarf | ||
9 | } | ||
10 | |||
11 | ALLOW_EMPTY_${PN} = "1" | ||
12 | |||
13 | BBCLASSEXTEND = "native" | ||