Skip to content

Commit 5cd84a7

Browse files
committed
* 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.
1 parent c573f27 commit 5cd84a7

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

binutils/ChangeLog

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
2013-10-01 Cory Fields <[email protected]>
2+
3+
* arsup.c (ar_save): Respect the deterministic setting when
4+
reading from an mri script.
5+
* ar.c (main): Set the default deterministic mode when reading
6+
from an mri script.
7+
18
2013-10-01 Jan-Benedict Glaw <[email protected]>
29

310
* dwarf.c (SAFE_BYTE_GET): Fix argument check.

binutils/ar.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,7 @@ main (int argc, char **argv)
737737

738738
if (mri_mode)
739739
{
740+
default_deterministic ();
740741
mri_emul ();
741742
}
742743
else

binutils/arsup.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/* arsup.c - Archive support for MRI compatibility
2-
Copyright 1992, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003,
3-
2004, 2005, 2007, 2008 Free Software Foundation, Inc.
2+
Copyright 1992-2013 2008 Free Software Foundation, Inc.
43
54
This file is part of GNU Binutils.
65
@@ -39,6 +38,7 @@ static void ar_directory_doer (bfd *, bfd *);
3938
static void ar_addlib_doer (bfd *, bfd *);
4039

4140
extern int verbose;
41+
extern int deterministic;
4242

4343
static bfd *obfd;
4444
static char *real_name;
@@ -334,6 +334,9 @@ ar_save (void)
334334
{
335335
char *ofilename = xstrdup (bfd_get_filename (obfd));
336336

337+
if (deterministic > 0)
338+
obfd->flags |= BFD_DETERMINISTIC_OUTPUT;
339+
337340
bfd_close (obfd);
338341

339342
smart_rename (ofilename, real_name, 0);

0 commit comments

Comments
 (0)