Skip to content

Commit

Permalink
* arsup.c (ar_save): Respect the deterministic setting when
Browse files Browse the repository at this point in the history
	reading from an mri script.
	* ar.c (main): Set the default deterministic mode when reading
	from an mri script.
  • Loading branch information
nickclifton committed Oct 1, 2013
1 parent c573f27 commit 5cd84a7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
7 changes: 7 additions & 0 deletions binutils/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2013-10-01 Cory Fields <[email protected]>

* arsup.c (ar_save): Respect the deterministic setting when
reading from an mri script.
* ar.c (main): Set the default deterministic mode when reading
from an mri script.

2013-10-01 Jan-Benedict Glaw <[email protected]>

* dwarf.c (SAFE_BYTE_GET): Fix argument check.
Expand Down
1 change: 1 addition & 0 deletions binutils/ar.c
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,7 @@ main (int argc, char **argv)

if (mri_mode)
{
default_deterministic ();
mri_emul ();
}
else
Expand Down
7 changes: 5 additions & 2 deletions binutils/arsup.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* arsup.c - Archive support for MRI compatibility
Copyright 1992, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003,
2004, 2005, 2007, 2008 Free Software Foundation, Inc.
Copyright 1992-2013 2008 Free Software Foundation, Inc.
This file is part of GNU Binutils.
Expand Down Expand Up @@ -39,6 +38,7 @@ static void ar_directory_doer (bfd *, bfd *);
static void ar_addlib_doer (bfd *, bfd *);

extern int verbose;
extern int deterministic;

static bfd *obfd;
static char *real_name;
Expand Down Expand Up @@ -334,6 +334,9 @@ ar_save (void)
{
char *ofilename = xstrdup (bfd_get_filename (obfd));

if (deterministic > 0)
obfd->flags |= BFD_DETERMINISTIC_OUTPUT;

bfd_close (obfd);

smart_rename (ofilename, real_name, 0);
Expand Down

0 comments on commit 5cd84a7

Please sign in to comment.