Files
haikuports/dev-libs/libdwarf/patches/libdwarf-20130729.patch
Ed Robbins abdf62993a libdwarf:
pass directories to make instead of modifying makefile
	fix build for gcc4
	other small fixes (description, unneed REQUIRES)
2014-01-06 13:26:56 +00:00

169 lines
6.8 KiB
Diff

diff -Naur dwarf-20130729/dwarfdump/Makefile.in dwarf-20130729-c89/dwarfdump/Makefile.in
--- dwarf-20130729/dwarfdump/Makefile.in 2013-02-02 19:13:55.031981568 +0000
+++ dwarf-20130729-c89/dwarfdump/Makefile.in 2014-01-06 11:16:30.116916224 +0000
@@ -154,9 +154,11 @@
# will work and leave sensible permissions on the resulting files.
# Some adjustment might be required, see README.
install: all
- $(INSTALL) dwarfdump $(bindir)/dwarfdump
- $(INSTALL) $(srcdir)/dwarfdump.conf $(libdir)/dwarfdump.conf
- $(INSTALL) $(srcdir)/dwarfdump.1 $(man1dir)/dwarfdump.1
+ install -m 0755 -d $(bindir)
+ install -m 0755 -d $(man1dir)
+ install -m 0755 dwarfdump $(bindir)
+ install -m 0755 dwarfdump.conf $(libdir)
+ install -m 0755 dwarfdump.1 $(man1dir)
uninstall:
-rm -f $(bindir)/dwarfdump
diff -Naur dwarf-20130729/dwarfdump/print_die.c dwarf-20130729-c89/dwarfdump/print_die.c
--- dwarf-20130729/dwarfdump/print_die.c 2013-02-06 20:48:07.024903680 +0000
+++ dwarf-20130729-c89/dwarfdump/print_die.c 2014-01-06 11:16:30.131596288 +0000
@@ -3380,6 +3380,7 @@
we have a serious botch. this FORM
defines the value as a .debug_info
global offset. */
+ int res = 0;
Dwarf_Off cuoff = 0;
Dwarf_Off culen = 0;
Dwarf_Off die_overall_offset = 0;
@@ -3399,7 +3400,7 @@
print_error(dbg,small_buf,DW_DLV_OK,0);
}
- int res = dwarf_die_CU_offset_range(die,&cuoff,
+ res = dwarf_die_CU_offset_range(die,&cuoff,
&culen,&err);
DWARF_CHECK_COUNT(tag_tree_result,1);
if (res != DW_DLV_OK) {
diff -Naur dwarf-20130729/dwarfdump2/dwarfdump.cc dwarf-20130729-c89/dwarfdump2/dwarfdump.cc
--- dwarf-20130729/dwarfdump2/dwarfdump.cc 2013-07-30 16:12:36.033292288 +0000
+++ dwarf-20130729-c89/dwarfdump2/dwarfdump.cc 2014-01-06 11:19:43.419168256 +0000
@@ -47,6 +47,9 @@
#include <vector>
#include <algorithm> // for sort
#include <iomanip>
+#if __GNUC__ == 2
+#include <streambuf.h>
+#endif
/* for 'open' */
#include <sys/types.h>
@@ -2413,7 +2416,11 @@
Compiler *pCompiler, Dwarf_Check_Categories category)
{
Dwarf_Check_Result result = pCompiler->results_[category];
+#if __GNUC__ == 2
+ cerr << std::setw(24) << ios::left << str <<
+#else
cerr << std::setw(24) << std::left << str <<
+#endif
IToDec(result.checks_,10) <<
" " <<
IToDec(result.errors_,10) << endl;
diff -Naur dwarf-20130729/dwarfdump2/Makefile.in dwarf-20130729-c89/dwarfdump2/Makefile.in
--- dwarf-20130729/dwarfdump2/Makefile.in 2013-02-02 19:16:44.038797312 +0000
+++ dwarf-20130729-c89/dwarfdump2/Makefile.in 2014-01-06 12:53:29.018350080 +0000
@@ -133,9 +133,11 @@
# will work and leave sensible permissions on the resulting files.
# Some adjustment might be required, see README.
install: all
- $(INSTALL) dwarfdump $(bindir)/dwarfdump
- $(INSTALL) $(srcdir)/dwarfdump.1 $(man1dir)/dwarfdump.1
- $(INSTALL) $(srcdir)/dwarfdump.conf $(libdir)/dwarfdump.conf
+ install -m 0755 -d $(bindir)
+ install -m 0755 -d $(man1dir)
+ install -m 0755 dwarfdump $(bindir)
+ install -m 0755 dwarfdump.conf $(libdir)
+ install -m 0755 dwarfdump.1 $(man1dir)
uninstall:
-rm -f $(bindir)/dwarfdump
diff -Naur dwarf-20130729/dwarfgen/createirepformfrombinary.cc dwarf-20130729-c89/dwarfgen/createirepformfrombinary.cc
--- dwarf-20130729/dwarfgen/createirepformfrombinary.cc 2013-02-01 16:20:06.020971520 +0000
+++ dwarf-20130729-c89/dwarfgen/createirepformfrombinary.cc 2014-01-06 11:16:30.163577856 +0000
@@ -28,7 +28,6 @@
#include <string.h> // For memset etc
#include <sys/stat.h> //open
#include <fcntl.h> //open
-#include "elf.h"
#include "gelf.h"
#include "strtabdata.h"
#include "dwarf.h"
diff -Naur dwarf-20130729/dwarfgen/createirepfrombinary.cc dwarf-20130729-c89/dwarfgen/createirepfrombinary.cc
--- dwarf-20130729/dwarfgen/createirepfrombinary.cc 2013-02-01 16:20:11.022282240 +0000
+++ dwarf-20130729-c89/dwarfgen/createirepfrombinary.cc 2014-01-06 11:16:30.171442176 +0000
@@ -30,7 +30,6 @@
#include <string.h> // For memset etc
#include <sys/stat.h> //open
#include <fcntl.h> //open
-#include "elf.h"
#include "gelf.h"
#include "strtabdata.h"
#include "dwarf.h"
diff -Naur dwarf-20130729/dwarfgen/dwarfgen.cc dwarf-20130729-c89/dwarfgen/dwarfgen.cc
--- dwarf-20130729/dwarfgen/dwarfgen.cc 2013-02-01 16:20:17.023330816 +0000
+++ dwarf-20130729-c89/dwarfgen/dwarfgen.cc 2014-01-06 11:16:30.179830784 +0000
@@ -56,8 +56,8 @@
#include <string.h> // For memset etc
#include <sys/stat.h> //open
#include <fcntl.h> //open
+#include <stdint.h>
#include "general.h"
-#include "elf.h"
#include "gelf.h"
#include "strtabdata.h"
#include "dwarf.h"
diff -Naur dwarf-20130729/dwarfgen/irepattrtodbg.cc dwarf-20130729-c89/dwarfgen/irepattrtodbg.cc
--- dwarf-20130729/dwarfgen/irepattrtodbg.cc 2013-02-01 16:20:21.021495808 +0000
+++ dwarf-20130729-c89/dwarfgen/irepattrtodbg.cc 2014-01-06 11:16:30.192937984 +0000
@@ -30,7 +30,6 @@
#include <sys/stat.h> //open
#include <fcntl.h> //open
#include "general.h"
-#include "elf.h"
#include "gelf.h"
#include "strtabdata.h"
#include "dwarf.h"
diff -Naur dwarf-20130729/dwarfgen/ireptodbg.cc dwarf-20130729-c89/dwarfgen/ireptodbg.cc
--- dwarf-20130729/dwarfgen/ireptodbg.cc 2013-02-01 16:20:26.022544384 +0000
+++ dwarf-20130729-c89/dwarfgen/ireptodbg.cc 2014-01-06 11:16:30.201064448 +0000
@@ -28,7 +28,6 @@
#include <string.h> // For memset etc
#include <sys/stat.h> //open
#include <fcntl.h> //open
-#include "elf.h"
#include "gelf.h"
#include "strtabdata.h"
#include "dwarf.h"
diff -Naur dwarf-20130729/libdwarf/gennames.c dwarf-20130729-c89/libdwarf/gennames.c
--- dwarf-20130729/libdwarf/gennames.c 2013-01-25 19:09:11.056885248 +0000
+++ dwarf-20130729-c89/libdwarf/gennames.c 2014-01-06 11:16:30.209715200 +0000
@@ -486,8 +486,8 @@
/* Process each line from 'dwarf.h' */
while (!feof(f_dwarf_in)) {
- errno = 0;
char *fgbad = fgets(line_in,sizeof(line_in),f_dwarf_in);
+ errno = 0;
if(!fgbad) {
if(feof(f_dwarf_in)) {
break;
diff -Naur dwarf-20130729/libdwarf/Makefile.in dwarf-20130729-c89/libdwarf/Makefile.in
--- dwarf-20130729/libdwarf/Makefile.in 2013-07-28 17:58:54.056885248 +0000
+++ dwarf-20130729-c89/libdwarf/Makefile.in 2014-01-06 11:16:30.217055232 +0000
@@ -213,8 +214,11 @@
rm -f dwarf_names_enum.h dwarf_names_new.h dwarf_names.c dwarf_names.h
install: all
- echo "No install provided, see comments in the README"
-
+ install -m 0755 -d $(incdir)
+ install -m 0755 -d $(libdir)
+ install -m 0755 libdwarf.h $(incdir)
+ install -m 0755 dwarf.h $(incdir)
+ install -m 0755 libdwarf.so $(libdir)
distclean: clean
rm -f config.status config.log config.cache config.h
rm -rf autom4te.cache