summaryrefslogtreecommitdiff
path: root/usr/src/tools/ctf
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/tools/ctf')
-rw-r--r--usr/src/tools/ctf/Makefile.ctf3
-rw-r--r--usr/src/tools/ctf/common/ctf_headers.h13
-rw-r--r--usr/src/tools/ctf/common/utils.h3
-rw-r--r--usr/src/tools/ctf/cvt/Makefile.com1
-rw-r--r--usr/src/tools/ctf/cvt/ctftools.h13
-rw-r--r--usr/src/tools/ctf/dump/Makefile.com1
6 files changed, 27 insertions, 7 deletions
diff --git a/usr/src/tools/ctf/Makefile.ctf b/usr/src/tools/ctf/Makefile.ctf
index ace863e89b..7c5b041746 100644
--- a/usr/src/tools/ctf/Makefile.ctf
+++ b/usr/src/tools/ctf/Makefile.ctf
@@ -40,7 +40,8 @@ HDRDIRS= \
-I../../common \
-I$(SRC) \
-I/usr/include \
- -I$(SRC)/uts/common
+ -I$(SRC)/uts/common \
+ -I$(NATIVE_ADJUNCT)/include
CPPFLAGS += $(HDRDIRS)
CFLAGS += $(CCVERBOSE)
diff --git a/usr/src/tools/ctf/common/ctf_headers.h b/usr/src/tools/ctf/common/ctf_headers.h
index b00b8fd9a6..268ae79077 100644
--- a/usr/src/tools/ctf/common/ctf_headers.h
+++ b/usr/src/tools/ctf/common/ctf_headers.h
@@ -27,8 +27,6 @@
#ifndef _CTF_HEADERS_H
#define _CTF_HEADERS_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* Because the ON tools are executed on the system where they are built,
* the tools need to include the headers installed on the build system,
@@ -69,4 +67,15 @@
#include <uts/common/sys/ctf_api.h>
#include <lib/libctf/common/libctf.h>
+/*
+ * XXX: This is hack to deal with GCC 4.x removing __builtin_stdarg_start
+ *
+ * We need to build on systems that don't have the fixed va_impl.h on the
+ * system, to achieve that, we stub it out here and in all similar places to
+ * give us a leg up.
+ */
+#if __GNUC__ >= 4
+#define __builtin_stdarg_start(list, name) __builtin_va_start(list, name)
+#endif
+
#endif /* _CTF_HEADERS_H */
diff --git a/usr/src/tools/ctf/common/utils.h b/usr/src/tools/ctf/common/utils.h
index 9b07361a53..4ae2dd0917 100644
--- a/usr/src/tools/ctf/common/utils.h
+++ b/usr/src/tools/ctf/common/utils.h
@@ -27,9 +27,8 @@
#ifndef _UTILS_H
#define _UTILS_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <stdarg.h>
+#include <ctf_headers.h>
#ifdef __cplusplus
extern "C" {
diff --git a/usr/src/tools/ctf/cvt/Makefile.com b/usr/src/tools/ctf/cvt/Makefile.com
index fb35379c3a..5385b3769f 100644
--- a/usr/src/tools/ctf/cvt/Makefile.com
+++ b/usr/src/tools/ctf/cvt/Makefile.com
@@ -73,6 +73,7 @@ DWARFLDFLAGS = \
-ldwarf
DWARFCPPFLAGS = -I../../dwarf/common
+LDFLAGS += -L$(NATIVE_ADJUNCT)/lib
LDLIBS += -lz -lelf
CPPFLAGS += -D_REENTRANT
CFLAGS += $(CTF_FLAGS)
diff --git a/usr/src/tools/ctf/cvt/ctftools.h b/usr/src/tools/ctf/cvt/ctftools.h
index 991f3bc921..f586236ccf 100644
--- a/usr/src/tools/ctf/cvt/ctftools.h
+++ b/usr/src/tools/ctf/cvt/ctftools.h
@@ -26,8 +26,6 @@
#ifndef _CTFTOOLS_H
#define _CTFTOOLS_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* Functions and data structures used in the manipulation of stabs and CTF data
*/
@@ -43,6 +41,17 @@
extern "C" {
#endif
+/*
+ * XXX: This is hack to deal with GCC 4.x removing __builtin_stdarg_start
+ *
+ * We need to build on systems that don't have the fixed va_impl.h on the
+ * system, to achieve that, we stub it out here and in all similar places to
+ * give us a leg up.
+ */
+#if __GNUC__ >= 4
+#define __builtin_stdarg_start(list, name) __builtin_va_start(list, name)
+#endif
+
#include "list.h"
#include "hash.h"
diff --git a/usr/src/tools/ctf/dump/Makefile.com b/usr/src/tools/ctf/dump/Makefile.com
index ca3e925d01..9877fa06a3 100644
--- a/usr/src/tools/ctf/dump/Makefile.com
+++ b/usr/src/tools/ctf/dump/Makefile.com
@@ -31,6 +31,7 @@ SRCS = dump.c utils.c symbol.c
include ../../Makefile.ctf
+LDFLAGS += -L$(NATIVE_ADJUNCT)/lib
LDLIBS += -lelf -lz
OBJS = $(SRCS:%.c=%.o)