Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Apr 2015 15:39:34 +0000
From:      "emaste (Ed Maste)" <phabric-noreply@FreeBSD.org>
To:        freebsd-toolchain@freebsd.org
Subject:   [Differential] [Updated, 26 lines] D2408: Add ELF Tool Chain's c++filt to the build
Message-ID:  <e0054449863fc0ba6e9256b56bb4b064@localhost.localdomain>
In-Reply-To: <differential-rev-PHID-DREV-p3szawadf7l7266bqfgt-req@FreeBSD.org>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
emaste updated this revision to Diff 5108.
emaste added a comment.

- prefer ELF Tool Chain's c++filt
- exclude from make delete-old
- fix typo


CHANGES SINCE LAST UPDATE
  https://reviews.freebsd.org/D2408?vs=5105&id=5108

REVISION DETAIL
  https://reviews.freebsd.org/D2408

AFFECTED FILES
  gnu/usr.bin/cc/Makefile
  tools/build/mk/OptionalObsoleteFiles.inc
  usr.bin/Makefile
  usr.bin/cxxfilt/Makefile

CHANGE DETAILS
  diff --git a/usr.bin/cxxfilt/Makefile b/usr.bin/cxxfilt/Makefile
  new file mode 100644
  --- /dev/null
  +++ b/usr.bin/cxxfilt/Makefile
  @@ -0,0 +1,17 @@
  +# $FreeBSD$
  +
  +.include <src.opts.mk>
  +
  +ELFTCDIR=	${.CURDIR}/../../contrib/elftoolchain
  +SRCDIR=		${ELFTCDIR}/cxxfilt
  +
  +.PATH: ${SRCDIR}
  +
  +PROG=	c++filt
  +SRCS=	cxxfilt.c
  +
  +LIBADD=	elftc
  +
  +CFLAGS+=-I${ELFTCDIR}/libelftc -I${ELFTCDIR}/common
  +
  +.include <bsd.prog.mk>
  diff --git a/usr.bin/Makefile b/usr.bin/Makefile
  --- a/usr.bin/Makefile
  +++ b/usr.bin/Makefile
  @@ -36,6 +36,7 @@
   	csplit \
   	ctlstat \
   	cut \
  +	${_cxxfilt} \
   	demandoc \
   	dirname \
   	dpv \
  @@ -237,6 +238,7 @@
   
   .if ${MK_ELFTOOLCHAIN_TOOLS} != "no"
   _addr2line=	addr2line
  +_cxxfilt=	cxxfilt
   _elfcopy=	elfcopy
   _nm=		nm
   _readelf=	readelf
  diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc
  --- a/tools/build/mk/OptionalObsoleteFiles.inc
  +++ b/tools/build/mk/OptionalObsoleteFiles.inc
  @@ -1004,7 +1004,9 @@
   .if ${MK_CXX} == no
   OLD_FILES+=usr/bin/CC
   OLD_FILES+=usr/bin/c++
  +.if ${MK_ELFTOOLCHAIN_TOOLS} == no
   OLD_FILES+=usr/bin/c++filt
  +.endif
   OLD_FILES+=usr/bin/g++
   OLD_FILES+=usr/libexec/cc1plus
   .if ${MK_GCC} == no
  diff --git a/gnu/usr.bin/cc/Makefile b/gnu/usr.bin/cc/Makefile
  --- a/gnu/usr.bin/cc/Makefile
  +++ b/gnu/usr.bin/cc/Makefile
  @@ -12,7 +12,10 @@
   .endif
   
   .if ${MK_CXX} != "no"
  -SUBDIR+= cc1plus c++ c++filt
  +SUBDIR+= cc1plus c++
  +.if ${MK_ELFTOOLCHAIN_TOOLS} != "no"
  +SUBDIR+= c++filt
  +.endif
   .endif
   
   .if ${MK_GCOV} != "no"

EMAIL PREFERENCES
  https://reviews.freebsd.org/settings/panel/emailpreferences/

To: emaste, brooks
Cc: freebsd-toolchain

[-- Attachment #2 --]
diff --git a/usr.bin/cxxfilt/Makefile b/usr.bin/cxxfilt/Makefile
new file mode 100644
--- /dev/null
+++ b/usr.bin/cxxfilt/Makefile
@@ -0,0 +1,17 @@
+# $FreeBSD$
+
+.include <src.opts.mk>
+
+ELFTCDIR=	${.CURDIR}/../../contrib/elftoolchain
+SRCDIR=		${ELFTCDIR}/cxxfilt
+
+.PATH: ${SRCDIR}
+
+PROG=	c++filt
+SRCS=	cxxfilt.c
+
+LIBADD=	elftc
+
+CFLAGS+=-I${ELFTCDIR}/libelftc -I${ELFTCDIR}/common
+
+.include <bsd.prog.mk>
diff --git a/usr.bin/Makefile b/usr.bin/Makefile
--- a/usr.bin/Makefile
+++ b/usr.bin/Makefile
@@ -36,6 +36,7 @@
 	csplit \
 	ctlstat \
 	cut \
+	${_cxxfilt} \
 	demandoc \
 	dirname \
 	dpv \
@@ -237,6 +238,7 @@
 
 .if ${MK_ELFTOOLCHAIN_TOOLS} != "no"
 _addr2line=	addr2line
+_cxxfilt=	cxxfilt
 _elfcopy=	elfcopy
 _nm=		nm
 _readelf=	readelf
diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc
--- a/tools/build/mk/OptionalObsoleteFiles.inc
+++ b/tools/build/mk/OptionalObsoleteFiles.inc
@@ -1004,7 +1004,9 @@
 .if ${MK_CXX} == no
 OLD_FILES+=usr/bin/CC
 OLD_FILES+=usr/bin/c++
+.if ${MK_ELFTOOLCHAIN_TOOLS} == no
 OLD_FILES+=usr/bin/c++filt
+.endif
 OLD_FILES+=usr/bin/g++
 OLD_FILES+=usr/libexec/cc1plus
 .if ${MK_GCC} == no
diff --git a/gnu/usr.bin/cc/Makefile b/gnu/usr.bin/cc/Makefile
--- a/gnu/usr.bin/cc/Makefile
+++ b/gnu/usr.bin/cc/Makefile
@@ -12,7 +12,10 @@
 .endif
 
 .if ${MK_CXX} != "no"
-SUBDIR+= cc1plus c++ c++filt
+SUBDIR+= cc1plus c++
+.if ${MK_ELFTOOLCHAIN_TOOLS} != "no"
+SUBDIR+= c++filt
+.endif
 .endif
 
 .if ${MK_GCOV} != "no"

home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e0054449863fc0ba6e9256b56bb4b064>