mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-28 15:18:37 +08:00
* configure.in: Call AC_HEADER_DIRENT.
* configure, config.in: Rebuild. * emultempl/sunos.em: Use autoconf recommend mechanism to define DIR and struct dirent.
This commit is contained in:
@ -1,5 +1,10 @@
|
|||||||
Fri Sep 8 16:32:43 1995 Ian Lance Taylor <ian@cygnus.com>
|
Fri Sep 8 16:32:43 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
|
* configure.in: Call AC_HEADER_DIRENT.
|
||||||
|
* configure, config.in: Rebuild.
|
||||||
|
* emultempl/sunos.em: Use autoconf recommend mechanism to define
|
||||||
|
DIR and struct dirent.
|
||||||
|
|
||||||
* configure.tgt (mips*-*-bsd*): New case.
|
* configure.tgt (mips*-*-bsd*): New case.
|
||||||
|
|
||||||
* configure.host (i[345]86-sequent-ptx* | i[345]86-sequent-sysv*)
|
* configure.host (i[345]86-sequent-ptx* | i[345]86-sequent-sysv*)
|
||||||
|
@ -29,18 +29,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
/* FIXME: On some hosts we will need to include a different file.
|
|
||||||
This is correct for SunOS, which is the only place this file will
|
|
||||||
typically be compiled. However, if somebody configures the linker
|
|
||||||
for all targets, they will run into trouble here. */
|
|
||||||
#include <dirent.h>
|
|
||||||
|
|
||||||
#include "bfd.h"
|
#include "bfd.h"
|
||||||
#include "sysdep.h"
|
#include "sysdep.h"
|
||||||
#include "bfdlink.h"
|
#include "bfdlink.h"
|
||||||
|
|
||||||
#include "ld.h"
|
#include "ld.h"
|
||||||
#include "config.h"
|
|
||||||
#include "ldmain.h"
|
#include "ldmain.h"
|
||||||
#include "ldemul.h"
|
#include "ldemul.h"
|
||||||
#include "ldfile.h"
|
#include "ldfile.h"
|
||||||
@ -48,6 +41,21 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|||||||
#include "ldexp.h"
|
#include "ldexp.h"
|
||||||
#include "ldlang.h"
|
#include "ldlang.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_DIRENT_H
|
||||||
|
# include <dirent.h>
|
||||||
|
#else
|
||||||
|
# define dirent direct
|
||||||
|
# ifdef HAVE_SYS_NDIR_H
|
||||||
|
# include <sys/ndir.h>
|
||||||
|
# endif
|
||||||
|
# ifdef HAVE_SYS_DIR_H
|
||||||
|
# include <sys/dir.h>
|
||||||
|
# endif
|
||||||
|
# ifdef HAVE_NDIR_H
|
||||||
|
# include <ndir.h>
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
static void gld${EMULATION_NAME}_before_parse PARAMS ((void));
|
static void gld${EMULATION_NAME}_before_parse PARAMS ((void));
|
||||||
static void gld${EMULATION_NAME}_create_output_section_statements
|
static void gld${EMULATION_NAME}_create_output_section_statements
|
||||||
PARAMS ((void));
|
PARAMS ((void));
|
||||||
@ -82,8 +90,7 @@ gld${EMULATION_NAME}_before_parse()
|
|||||||
static void
|
static void
|
||||||
gld${EMULATION_NAME}_create_output_section_statements ()
|
gld${EMULATION_NAME}_create_output_section_statements ()
|
||||||
{
|
{
|
||||||
if (config.dynamic_link)
|
lang_for_each_input_file (gld${EMULATION_NAME}_find_so);
|
||||||
lang_for_each_input_file (gld${EMULATION_NAME}_find_so);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Search the directory for a .so file for each library search. */
|
/* Search the directory for a .so file for each library search. */
|
||||||
@ -104,7 +111,8 @@ gld${EMULATION_NAME}_find_so (inp)
|
|||||||
struct stat st;
|
struct stat st;
|
||||||
|
|
||||||
if (! inp->search_dirs_flag
|
if (! inp->search_dirs_flag
|
||||||
|| ! inp->is_archive)
|
|| ! inp->is_archive
|
||||||
|
|| ! inp->dynamic)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ASSERT (strncmp (inp->local_sym_name, "-l", 2) == 0);
|
ASSERT (strncmp (inp->local_sym_name, "-l", 2) == 0);
|
||||||
@ -118,7 +126,7 @@ gld${EMULATION_NAME}_find_so (inp)
|
|||||||
{
|
{
|
||||||
force_maj = atoi (dot + 1);
|
force_maj = atoi (dot + 1);
|
||||||
len = dot - filename;
|
len = dot - filename;
|
||||||
alc = (char *) alloca (len + 1);
|
alc = (char *) xmalloc (len + 1);
|
||||||
strncpy (alc, filename, len);
|
strncpy (alc, filename, len);
|
||||||
alc[len] = '\0';
|
alc[len] = '\0';
|
||||||
filename = alc;
|
filename = alc;
|
||||||
@ -213,7 +221,7 @@ gld${EMULATION_NAME}_find_so (inp)
|
|||||||
|
|
||||||
/* Now look for the same file name, but with .sa instead of .so. If
|
/* Now look for the same file name, but with .sa instead of .so. If
|
||||||
found, add it to the list of input files. */
|
found, add it to the list of input files. */
|
||||||
alc = (char *) alloca (strlen (inp->filename) + 1);
|
alc = (char *) xmalloc (strlen (inp->filename) + 1);
|
||||||
strcpy (alc, inp->filename);
|
strcpy (alc, inp->filename);
|
||||||
strstr (alc, ".so.")[2] = 'a';
|
strstr (alc, ".so.")[2] = 'a';
|
||||||
if (stat (alc, &st) == 0)
|
if (stat (alc, &st) == 0)
|
||||||
|
Reference in New Issue
Block a user