public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Indu Bhagat <indu.bhagat@oracle.com>
To: binutils@sourceware.org
Cc: Indu Bhagat <indu.bhagat@oracle.com>
Subject: [PATCH,V3 10/15] gdb: sim: buildsystem changes to accommodate libsframe
Date: Sun, 30 Oct 2022 00:44:45 -0700	[thread overview]
Message-ID: <20221030074450.1956074-11-indu.bhagat@oracle.com> (raw)
In-Reply-To: <20221030074450.1956074-1-indu.bhagat@oracle.com>

[Changes in V3]
  - Additional diff in sim/ppc/Makefile.in to accommodate libsframe.
    This is needed to ensure --enable-targets=all continues to build.
  - Addressed review comments by Mike Frysinger.
[End of changes in V3]

[No changes in V2]

Both gdb and sim need buildsystem fixes to now include libsframe for a
successful build.
---
 gdb/Makefile.in           | 7 +++++--
 gdb/acinclude.m4          | 4 ++--
 gdb/configure             | 8 ++++----
 sim/common/Make-common.in | 7 +++++--
 sim/ppc/Makefile.in       | 5 +++--
 5 files changed, 19 insertions(+), 12 deletions(-)
 mode change 100755 => 100644 gdb/configure

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index c528ee5aa80..98157498fdb 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -161,6 +161,9 @@ LIBIBERTY = ../libiberty/libiberty.a
 LIBCTF = @LIBCTF@
 CTF_DEPS = @CTF_DEPS@
 
+# Where is the SFrame library?  Typically in ../libsframe.
+LIBSFRAME = ../libsframe/.libs/libsframe.a
+
 # Where is the BFD library?  Typically in ../bfd.
 BFD_DIR = ../bfd
 BFD = $(BFD_DIR)/libbfd.a
@@ -650,7 +653,7 @@ INTERNAL_LDFLAGS = \
 # Libraries and corresponding dependencies for compiling gdb.
 # XM_CLIBS, defined in *config files, have host-dependent libs.
 # LIBIBERTY appears twice on purpose.
-CLIBS = $(SIM) $(READLINE) $(OPCODES) $(LIBCTF) $(BFD) $(ZLIB) $(ZSTD_LIBS) \
+CLIBS = $(SIM) $(READLINE) $(OPCODES) $(LIBCTF) $(BFD) $(LIBSFRAME) $(ZLIB) $(ZSTD_LIBS) \
         $(LIBSUPPORT) $(INTL) $(LIBIBERTY) $(LIBDECNUMBER) \
 	$(XM_CLIBS) $(GDBTKLIBS)  $(LIBBACKTRACE_LIB) \
 	@LIBS@ @GUILE_LIBS@ @PYTHON_LIBS@ \
@@ -658,7 +661,7 @@ CLIBS = $(SIM) $(READLINE) $(OPCODES) $(LIBCTF) $(BFD) $(ZLIB) $(ZSTD_LIBS) \
 	$(WIN32LIBS) $(LIBGNU) $(LIBGNU_EXTRA_LIBS) $(LIBICONV) \
 	$(LIBMPFR) $(LIBGMP) $(SRCHIGH_LIBS) $(LIBXXHASH) $(PTHREAD_LIBS) \
 	$(DEBUGINFOD_LIBS) $(LIBBABELTRACE_LIB)
-CDEPS = $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE_DEPS) $(CTF_DEPS) \
+CDEPS = $(NAT_CDEPS) $(SIM) $(BFD) $(LIBSFRAME) $(READLINE_DEPS) $(CTF_DEPS) \
 	$(OPCODES) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS) $(LIBGNU) \
 	$(LIBSUPPORT)
 
diff --git a/gdb/acinclude.m4 b/gdb/acinclude.m4
index 62fa66c7af3..8bbc5f0739e 100644
--- a/gdb/acinclude.m4
+++ b/gdb/acinclude.m4
@@ -234,9 +234,9 @@ AC_DEFUN([GDB_AC_CHECK_BFD], [
   # always want our bfd.
   CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
   ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
-  LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
+  LDFLAGS="-L../bfd -L../libiberty -L../libsframe/.libs/ $ZLIBDIR $LDFLAGS"
   intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
-  LIBS="-lbfd -liberty -lz $ZSTD_LIBS $intl $LIBS"
+  LIBS="-lbfd -liberty -lz -lsframe $ZSTD_LIBS $intl $LIBS"
   AC_CACHE_CHECK(
     [$1],
     [$2],
diff --git a/gdb/configure b/gdb/configure
old mode 100755
new mode 100644
index 33677262783..71288533efd
--- a/gdb/configure
+++ b/gdb/configure
@@ -17412,9 +17412,9 @@ WIN32LIBS="$WIN32LIBS $WIN32APILIBS"
   # always want our bfd.
   CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
   ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
-  LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
+  LDFLAGS="-L../bfd -L../libiberty -L../libsframe/.libs/ $ZLIBDIR $LDFLAGS"
   intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
-  LIBS="-lbfd -liberty -lz $ZSTD_LIBS $intl $LIBS"
+  LIBS="-lbfd -liberty -lz -lsframe $ZSTD_LIBS $intl $LIBS"
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
 $as_echo_n "checking for ELF support in BFD... " >&6; }
 if ${gdb_cv_var_elf+:} false; then :
@@ -17527,9 +17527,9 @@ fi
   # always want our bfd.
   CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
   ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
-  LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
+  LDFLAGS="-L../bfd -L../libiberty -L../libsframe/.libs/ $ZLIBDIR $LDFLAGS"
   intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
-  LIBS="-lbfd -liberty -lz $ZSTD_LIBS $intl $LIBS"
+  LIBS="-lbfd -liberty -lz -lsframe $ZSTD_LIBS $intl $LIBS"
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
 $as_echo_n "checking for Mach-O support in BFD... " >&6; }
 if ${gdb_cv_var_macho+:} false; then :
diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in
index b07ec96e147..8a49e0b4ef2 100644
--- a/sim/common/Make-common.in
+++ b/sim/common/Make-common.in
@@ -222,11 +222,14 @@ SIM_HW_DEVICES = cfi core pal glue $(SIM_EXTRA_HW_DEVICES)
 ZLIB = $(zlibdir) -lz
 LIBIBERTY_LIB = ../../libiberty/libiberty.a
 BFD_LIB = ../../bfd/libbfd.a
+LIBSFRAME_LIB = ../../libsframe/.libs/libsframe.a
 OPCODES_LIB = ../../opcodes/libopcodes.a
 CONFIG_LIBS = $(COMMON_LIBS) @LIBS@ $(ZLIB) $(ZSTD_LIBS)
-LIBDEPS = $(BFD_LIB) $(OPCODES_LIB) $(LIBINTL_DEP) $(LIBIBERTY_LIB)
+LIBDEPS = $(BFD_LIB) $(OPCODES_LIB) $(LIBINTL_DEP) $(LIBIBERTY_LIB) \
+	  $(LIBSFRAME_LIB)
 EXTRA_LIBS = $(BFD_LIB) $(OPCODES_LIB) $(LIBINTL) $(LIBIBERTY_LIB) \
-	$(CONFIG_LIBS) $(SIM_EXTRA_LIBS) $(LIBDL) $(LIBGNU) $(LIBGNU_EXTRA_LIBS)
+	     $(LIBSFRAME_LIB) $(CONFIG_LIBS) $(SIM_EXTRA_LIBS) \
+	     $(LIBDL) $(LIBGNU) $(LIBGNU_EXTRA_LIBS)
 
 COMMON_OBJS_NAMES = \
 	callback.o \
diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in
index b0c073b8867..12123d36a66 100644
--- a/sim/ppc/Makefile.in
+++ b/sim/ppc/Makefile.in
@@ -133,6 +133,7 @@ INCLUDES	= -I. -I$(srcdir) $(LIB_INCLUDES) $(BFD_INCLUDES) $(GDB_INCLUDES) -I../
 
 LIBIBERTY_LIB	= ../../libiberty/libiberty.a
 BFD_LIB		= ../../bfd/libbfd.a
+SFRAME_LIB	= ../../libsframe/.libs/libsframe.a
 ZLIB		= $(zlibdir) -lz
 
 
@@ -521,8 +522,8 @@ PACKAGE_SRC = @sim_pk_src@
 PACKAGE_OBJ = @sim_pk_obj@
 
 
-psim$(EXEEXT): $(TARGETLIB) main.o $(LIBIBERTY_LIB) $(BFD_LIB) $(LIBINTL_DEP)
-	$(ECHO_CCLD) $(CC) $(CFLAGS) $(LDFLAGS) -o psim$(EXEEXT) main.o $(TARGETLIB) $(BFD_LIB) $(ZLIB) $(ZSTD_LIBS) $(LIBINTL) $(LIBIBERTY_LIB) $(LIBS)
+psim$(EXEEXT): $(TARGETLIB) main.o $(LIBIBERTY_LIB) $(BFD_LIB) $(SFRAME_LIB) $(LIBINTL_DEP)
+	$(ECHO_CCLD) $(CC) $(CFLAGS) $(LDFLAGS) -o psim$(EXEEXT) main.o $(TARGETLIB) $(BFD_LIB) $(SFRAME_LIB) $(ZLIB) $(ZSTD_LIBS) $(LIBINTL) $(LIBIBERTY_LIB) $(LIBS)
 
 run$(EXEEXT): psim$(EXEEXT)
 	$(SILENCE) rm -f $@
-- 
2.37.2


  parent reply	other threads:[~2022-10-30  7:45 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-30  7:44 [PATCH,V3 00/15] Definition and support for SFrame unwind format Indu Bhagat
2022-10-30  7:44 ` [PATCH,V3 01/15] sframe.h: Add SFrame format definition Indu Bhagat
2022-10-30  7:44 ` [PATCH,V3 02/15] gas: add new command line option --gsframe Indu Bhagat
2022-10-30  7:44 ` [PATCH,V3 03/15] gas: generate .sframe from CFI directives Indu Bhagat
2022-10-30  8:03   ` Mike Frysinger
2022-11-06  5:30     ` Indu Bhagat
2022-11-06  5:36     ` [PATCH,V3.1 " Indu Bhagat
2022-10-30  7:44 ` [PATCH,V3 04/15] gas: testsuite: add new tests for SFrame unwind info Indu Bhagat
2022-10-30  7:44 ` [PATCH,V3 05/15] libsframe: add the SFrame library Indu Bhagat
2022-10-30  7:44 ` [PATCH,V3 06/15] bfd: linker: merge .sframe sections Indu Bhagat
2022-10-30 13:33   ` Mike Frysinger
2022-10-30  7:44 ` [PATCH,V3 07/15] readelf/objdump: support for SFrame section Indu Bhagat
2022-10-30  7:44 ` [PATCH,V3 08/15] unwinder: generate backtrace using SFrame format Indu Bhagat
2022-10-30 14:03   ` Mike Frysinger
2022-11-01 22:36     ` [PATCH, V3 " Weimin Pan
2022-11-02 15:00       ` Mike Frysinger
2022-11-02  6:23     ` [PATCH,V3 " Indu Bhagat
2022-10-30  7:44 ` [PATCH,V3 09/15] unwinder: Add SFrame unwinder tests Indu Bhagat
2022-10-30 14:14   ` Mike Frysinger
2022-10-30  7:44 ` Indu Bhagat [this message]
2022-10-30 14:15   ` [PATCH, V3 10/15] gdb: sim: buildsystem changes to accommodate libsframe Mike Frysinger
2022-10-31 20:39     ` Indu Bhagat
2022-11-02 15:02       ` Mike Frysinger
2022-11-02 19:11         ` Jose E. Marchesi
2022-11-03 15:27           ` Mike Frysinger
2022-11-04 12:14             ` Jose E. Marchesi
2022-10-30  7:44 ` [PATCH,V3 11/15] libctf: add libsframe to LDFLAGS and LIBS Indu Bhagat
2022-10-30 13:27   ` Mike Frysinger
2022-10-31 20:06     ` Indu Bhagat
2022-11-01 18:57       ` Nick Alcock
2022-11-01 21:42         ` Andreas Schwab
2022-11-02 13:16           ` Nick Alcock
2022-11-04 19:02             ` [PATCH,V3.1,11/15] " Indu Bhagat
2022-11-04 21:01             ` [PATCH,V3.2,11/15] " Indu Bhagat
2022-11-05  9:21               ` Andreas Schwab
2022-11-07 22:28                 ` [PATCH,V3.3 11/15] " Indu Bhagat
2022-11-08  3:26                   ` Mike Frysinger
2022-11-08 19:26                     ` Indu Bhagat
2022-10-30  7:44 ` [PATCH,V3 12/15] src-release.sh: Add libsframe Indu Bhagat
2022-10-30  7:44 ` [PATCH,V3 13/15] binutils/NEWS: add text for SFrame support Indu Bhagat
2022-10-30  7:44 ` [PATCH,V3 14/15] gas/NEWS: add text about new command line option and " Indu Bhagat
2022-10-30  8:05   ` [PATCH, V3 " Mike Frysinger
2022-10-31 23:17     ` Indu Bhagat
2022-10-30  7:44 ` [PATCH,V3 15/15] doc: add SFrame spec file Indu Bhagat

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221030074450.1956074-11-indu.bhagat@oracle.com \
    --to=indu.bhagat@oracle.com \
    --cc=binutils@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).