/* dllwrap.c -- wrapper for DLLTOOL and GCC to generate PE style DLLs
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007
- Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009,
+ 2011, 2012 Free Software Foundation, Inc.
Contributed by Mumit Khan (khan@xraylith.wisc.edu).
This file is part of GNU Binutils.
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
-/* AIX requires this to be the first thing in the file. */
-#ifndef __GNUC__
-# ifdef _AIX
- #pragma alloca
-#endif
-#endif
-
#include "sysdep.h"
#include "bfd.h"
#include "libiberty.h"
#include "bucomm.h"
#include <time.h>
-#include <sys/stat.h>
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
appropriate. */
static char *
-look_for_prog (const char *prog_name, const char *prefix, int end_prefix)
+look_for_prog (const char *progname, const char *prefix, int end_prefix)
{
struct stat s;
char *cmd;
cmd = xmalloc (strlen (prefix)
- + strlen (prog_name)
+ + strlen (progname)
#ifdef HAVE_EXECUTABLE_SUFFIX
+ strlen (EXECUTABLE_SUFFIX)
#endif
+ 10);
strcpy (cmd, prefix);
- sprintf (cmd + end_prefix, "%s", prog_name);
+ sprintf (cmd + end_prefix, "%s", progname);
if (strchr (cmd, '/') != NULL)
{
pid = pwait (pid, &wait_status, 0);
if (pid == -1)
{
- warn ("wait: %s", strerror (errno));
+ warn (_("pwait returns: %s"), strerror (errno));
retcode = 1;
}
else if (WIFSIGNALED (wait_status))
else
which_cpu = UNKNOWN_CPU;
+ if (is_leading_underscore == -1)
+ is_leading_underscore = (which_cpu != X64_CPU && which_cpu != ARM_CPU);
+
/* Re-create the command lines as a string, taking care to quote stuff. */
dlltool_cmdline = dyn_string_new (cmdline_len);
if (verbose)
if (! def_file_seen)
{
- int i;
dyn_string_t step_pre1;
step_pre1 = dyn_string_new (1024);