Compilation patch for asm_program.cpp "basename()"

280 views
Skip to first unread message

Stephen McCamant

unread,
Sep 8, 2010, 4:50:21 PM9/8/10
to bitblaz...@googlegroups.com
Our recommended platform for building the TEMU and Vine 1.0 release is
Ubuntu 9.04, since that's what we were able to test before the
release. However, it can be possible to use the releases with newer
distributions with some modifications.

For building Vine with newer Ubuntu, a small change is needed to fix
an incompatibility between glibc and the binutils "libiberty" library,
included below.

Hope this helps,

-- Stephen

Index: libasmir/src/disasm/asm_program.cpp
===================================================================
--- libasmir/src/disasm/asm_program.cpp (older version)
+++ libasmir/src/disasm/asm_program.cpp (fixed version)
@@ -7,6 +7,11 @@
#include "debug.h"
#include "asm_program.h"
#include "objdump.h"
+/* Some versions of glibc and the binutils libiberty library give
+ conflicting prototypes for basename(). We don't use that function
+ anyway, but to work around the problem, make libliberty.h think
+ that it has already been declared. */
+#define HAVE_DECL_BASENAME 1
#include "libiberty.h"


Reply all
Reply to author
Forward
0 new messages