Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <kettenis@science.uva.nl>
To: gdb-patches <gdb-patches@sources.redhat.com>
Subject: Re: [RFC]: Use `gdb_compile' instead of `target_link' for linking asm-source testcase
Date: Thu, 27 Dec 2001 06:30:00 -0000	[thread overview]
Message-ID: <s3ibsgkn3dp.fsf@soliton.wins.uva.nl> (raw)
In-Reply-To: Corinna Vinschen's message of Thu, 20 Dec 2001 17:08:41 +0100

Corinna Vinschen <vinschen@redhat.com> writes:

> On Thu, Dec 20, 2001 at 08:53:12AM -0500, Fernando Nasser wrote:
> > Corinna Vinschen wrote:
> > > 
> > > On Tue, Dec 18, 2001 at 01:38:20PM -0500, Fernando Nasser wrote:
> > > > This looks reasonable to me.
> > > >
> > > > Fernando
> > > 
> > > Since there's no further discussion or any complaints, does that mean
> > > the patch is ok and approved?
> > > 
> > 
> > Yes.   Thanks.
> 
> Thanks, applied.

Unfortunately this breaks the test on FreeBSD 4.4.

gdb_compile automatically links against libc, and on FreeBSD that
makes the link fail since libc depends on certain symbols in crt0.o,
which we don't link in because of -nostartfiles.  Adding -nostdlib
isn't an option since gdb_compile also adds -lm which depends on
libc.  Removing -nostartfiles isn't an option either since it would
result in confilicting symbols.

Instead of reverting Corrina's patch, we could add "-static" to
ldflags (see the attached patch).

Opinions?

Index: testsuite/ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* gdb.asm/asm-source.exp: Add ldflags=-static for gdb_compile.

Index: testsuite/gdb.asm/asm-source.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.asm/asm-source.exp,v
retrieving revision 1.16
diff -u -p -r1.16 asm-source.exp
--- testsuite/gdb.asm/asm-source.exp 2001/12/20 22:12:20 1.16
+++ testsuite/gdb.asm/asm-source.exp 2001/12/27 14:27:51
@@ -81,7 +81,7 @@ if {[target_assemble ${src2} asmsrc2.o "
      gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
 }
 
-set opts "debug ldflags=-nostartfiles"
+set opts "debug ldflags=-nostartfiles ldflags=-static"
 foreach i ${link-flags} {
     append opts " ldflags=$i"
 }


      reply	other threads:[~2001-12-27 14:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-18  5:59 Corinna Vinschen
2001-12-18 10:38 ` Fernando Nasser
2001-12-20  3:35   ` Corinna Vinschen
2001-12-20  5:54     ` Fernando Nasser
2001-12-20  8:09       ` Corinna Vinschen
2001-12-27  6:30         ` Mark Kettenis [this message]

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=s3ibsgkn3dp.fsf@soliton.wins.uva.nl \
    --to=kettenis@science.uva.nl \
    --cc=gdb-patches@sources.redhat.com \
    /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