This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problems Making gcc (for sh-elf) under cygwin


ABAZ wrote:
Heh.  Try applying the patch at

http://gcc.gnu.org/ml/gcc-patches/2001-03/msg01388.html

Thanks.  How do you do that? (I'm a bit new to gcc).
Better read up a bit on 'patch' (and diff).
"man patch" will tell you a bit.
http://www.gnu.org/manual/diffutils-2.7/html_chapter/diff_10.html#SEC60
will tell you a bit more.
http://www.tldp.org/LDP/lfs/html/chapter05/gcc.html has one example
of patching gcc.

Basically, you look at the patch, count the number of slashes
in the filenames that you don't care about (let's say it's 2),
then do
  patch -p2 < whatever.patch

Be careful when saving the message as a patch to preserve
whitespace exactly.  Copy-and-paste isn't good enough.
I'm attaching the exact copy of the patch I use;
it's very slightly different from the one I linked to,
but not in a very interesting way (I probably stripped
off a prefix from the pathnames).

--
Dan Kegel
Linux User #78045
http://www.kegel.com
http://gcc.gnu.org/ml/gcc-patches/2001-03/msg01388.html
(slightly tweaked)

Attached is a patch which separates the EXECUTABLE_SUFFIX and
OBJECT_SUFFIX into host and target definitions (yes, I know nobody
needs to know HOST_OBJECT_SUFFIX, but I added it for completeness
anyway).  Since autoconf/configure still require a non-ideal
configuration, the required hack is also added, such that ".exe" is
only appended to executables by default if the target wants it *and*
the host uses it (assuming that the host knows how to delude autoconf
into working right).

This patch sets the stage for doing it the right way once autoconf is
updated (official release of existing sources) and the various
configure files are regenerated, and fixes the problem of exe-hosted
cross compilers adding ".exe" to, say, m68k executables (which in
itself can cause problems configuring target libraries).

Comments?  Potential problems?

Index: collect2.c
===================================================================
RCS file: /cvs/uberbaum/gcc/collect2.c,v
retrieving revision 1.108
diff -p -2 -r1.108  collect2.c
*** collect2.c	2001/03/16 00:58:37	1.108
--- collect2.c	2001/03/20 00:14:21
*************** find_a_file (pprefix, name)
*** 665,670 ****
      fprintf (stderr, "Looking for '%s'\n", name);
    
! #ifdef EXECUTABLE_SUFFIX
!   len += strlen (EXECUTABLE_SUFFIX);
  #endif
  
--- 665,670 ----
      fprintf (stderr, "Looking for '%s'\n", name);
    
! #ifdef HOST_EXECUTABLE_SUFFIX
!   len += strlen (HOST_EXECUTABLE_SUFFIX);
  #endif
  
*************** find_a_file (pprefix, name)
*** 689,697 ****
  	}
  
! #ifdef EXECUTABLE_SUFFIX
  	/* Some systems have a suffix for executable files.
  	   So try appending that.  */
        strcpy (temp, name);
! 	strcat (temp, EXECUTABLE_SUFFIX);
  	
  	if (access (temp, X_OK) == 0)
--- 689,697 ----
  	}
  
! #ifdef HOST_EXECUTABLE_SUFFIX
  	/* Some systems have a suffix for executable files.
  	   So try appending that.  */
        strcpy (temp, name);
! 	strcat (temp, HOST_EXECUTABLE_SUFFIX);
  	
  	if (access (temp, X_OK) == 0)
*************** find_a_file (pprefix, name)
*** 715,722 ****
  	  return temp;
  
! #ifdef EXECUTABLE_SUFFIX
  	/* Some systems have a suffix for executable files.
  	   So try appending that.  */
! 	strcat (temp, EXECUTABLE_SUFFIX);
  	
  	if (stat (temp, &st) >= 0
--- 715,722 ----
  	  return temp;
  
! #ifdef HOST_EXECUTABLE_SUFFIX
  	/* Some systems have a suffix for executable files.
  	   So try appending that.  */
! 	strcat (temp, HOST_EXECUTABLE_SUFFIX);
  	
  	if (stat (temp, &st) >= 0
Index: gcc.c
===================================================================
RCS file: /cvs/uberbaum/gcc/gcc.c,v
retrieving revision 1.216
diff -p -2 -r1.216  gcc.c
*** gcc.c	2001/03/16 00:58:37	1.216
--- gcc.c	2001/03/20 00:14:51
*************** extern int getrusage PARAMS ((int, struc
*** 93,110 ****
  #endif
  
! /* By default there is no special suffix for executables.  */
! #ifdef EXECUTABLE_SUFFIX
! #define HAVE_EXECUTABLE_SUFFIX
  #else
! #define EXECUTABLE_SUFFIX ""
  #endif
  
! /* By default, the suffix for object files is ".o".  */
! #ifdef OBJECT_SUFFIX
! #define HAVE_OBJECT_SUFFIX
  #else
! #define OBJECT_SUFFIX ".o"
  #endif
  
  #ifndef VMS
  /* FIXME: the location independence code for VMS is hairier than this,
--- 93,118 ----
  #endif
  
! /* By default there is no special suffix for target executables.  */
! /* FIXME: when autoconf is fixed, remove the host check - dj */
! #if defined(TARGET_EXECUTABLE_SUFFIX) && defined(HOST_EXECUTABLE_SUFFIX)
! #define HAVE_TARGET_EXECUTABLE_SUFFIX
  #else
! #define TARGET_EXECUTABLE_SUFFIX ""
  #endif
  
! /* By default there is no special suffix for host executables.  */
! #ifdef HOST_EXECUTABLE_SUFFIX
! #define HAVE_HOST_EXECUTABLE_SUFFIX
  #else
! #define HOST_EXECUTABLE_SUFFIX ""
  #endif
  
+ /* By default, the suffix for target object files is ".o".  */
+ #ifdef TARGET_OBJECT_SUFFIX
+ #define HAVE_TARGET_OBJECT_SUFFIX
+ #else
+ #define TARGET_OBJECT_SUFFIX ".o"
+ #endif
+ 
  #ifndef VMS
  /* FIXME: the location independence code for VMS is hairier than this,
*************** static struct user_specs *user_specs_hea
*** 722,726 ****
  #endif
  
! #ifdef HAVE_EXECUTABLE_SUFFIX
  /* This defines which switches stop a full compilation.  */
  #define DEFAULT_SWITCH_CURTAILS_COMPILATION(CHAR) \
--- 730,734 ----
  #endif
  
! #ifdef HAVE_TARGET_EXECUTABLE_SUFFIX
  /* This defines which switches stop a full compilation.  */
  #define DEFAULT_SWITCH_CURTAILS_COMPILATION(CHAR) \
*************** make_relative_prefix (progname, bin_pref
*** 2287,2292 ****
  		  strcat (nstore, progname);
  		  if (! access (nstore, X_OK)
! #ifdef HAVE_EXECUTABLE_SUFFIX
!                       || ! access (strcat (nstore, EXECUTABLE_SUFFIX), X_OK)
  #endif
  		      )
--- 2295,2300 ----
  		  strcat (nstore, progname);
  		  if (! access (nstore, X_OK)
! #ifdef HAVE_HOST_EXECUTABLE_SUFFIX
!                       || ! access (strcat (nstore, HOST_EXECUTABLE_SUFFIX), X_OK)
  #endif
  		      )
*************** find_a_file (pprefix, name, mode)
*** 2407,2411 ****
  {
    char *temp;
!   const char *file_suffix = ((mode & X_OK) != 0 ? EXECUTABLE_SUFFIX : "");
    struct prefix_list *pl;
    int len = pprefix->max_len + strlen (name) + strlen (file_suffix) + 1;
--- 2415,2419 ----
  {
    char *temp;
!   const char *file_suffix = ((mode & X_OK) != 0 ? HOST_EXECUTABLE_SUFFIX : "");
    struct prefix_list *pl;
    int len = pprefix->max_len + strlen (name) + strlen (file_suffix) + 1;
*************** static int warn_std;
*** 2862,2866 ****
  static int *warn_std_ptr = 0;
  
! #if defined(HAVE_OBJECT_SUFFIX) || defined(HAVE_EXECUTABLE_SUFFIX)
  
  /* Convert NAME to a new name if it is the standard suffix.  DO_EXE
--- 2870,2874 ----
  static int *warn_std_ptr = 0;
  
! #if defined(HAVE_TARGET_OBJECT_SUFFIX) || defined(HAVE_TARGET_EXECUTABLE_SUFFIX)
  
  /* Convert NAME to a new name if it is the standard suffix.  DO_EXE
*************** convert_filename (name, do_exe)
*** 2880,2885 ****
    len = strlen (name);
  
! #ifdef HAVE_OBJECT_SUFFIX
!   /* Convert x.o to x.obj if OBJECT_SUFFIX is ".obj".  */
    if (len > 2
        && name[len - 2] == '.'
--- 2888,2893 ----
    len = strlen (name);
  
! #ifdef HAVE_TARGET_OBJECT_SUFFIX
!   /* Convert x.o to x.obj if TARGET_OBJECT_SUFFIX is ".obj".  */
    if (len > 2
        && name[len - 2] == '.'
*************** convert_filename (name, do_exe)
*** 2887,2899 ****
      {
        obstack_grow (&obstack, name, len - 2);
!       obstack_grow0 (&obstack, OBJECT_SUFFIX, strlen (OBJECT_SUFFIX));
        name = obstack_finish (&obstack);
      }
  #endif
  
! #if defined(HAVE_EXECUTABLE_SUFFIX) && !defined(NO_AUTO_EXE_SUFFIX)
    /* If there is no filetype, make it the executable suffix (which includes
       the ".").  But don't get confused if we have just "-o".  */
!   if (! do_exe || EXECUTABLE_SUFFIX[0] == 0 || (len == 2 && name[0] == '-'))
      return name;
  
--- 2895,2907 ----
      {
        obstack_grow (&obstack, name, len - 2);
!       obstack_grow0 (&obstack, TARGET_OBJECT_SUFFIX, strlen (TARGET_OBJECT_SUFFIX));
        name = obstack_finish (&obstack);
      }
  #endif
  
! #if defined(HAVE_TARGET_EXECUTABLE_SUFFIX)
    /* If there is no filetype, make it the executable suffix (which includes
       the ".").  But don't get confused if we have just "-o".  */
!   if (! do_exe || TARGET_EXECUTABLE_SUFFIX[0] == 0 || (len == 2 && name[0] == '-'))
      return name;
  
*************** convert_filename (name, do_exe)
*** 2907,2911 ****
  
    obstack_grow (&obstack, name, len);
!   obstack_grow0 (&obstack, EXECUTABLE_SUFFIX, strlen (EXECUTABLE_SUFFIX));
    name = obstack_finish (&obstack);
  #endif
--- 2915,2919 ----
  
    obstack_grow (&obstack, name, len);
!   obstack_grow0 (&obstack, TARGET_EXECUTABLE_SUFFIX, strlen (TARGET_EXECUTABLE_SUFFIX));
    name = obstack_finish (&obstack);
  #endif
*************** process_command (argc, argv)
*** 3500,3504 ****
  	    case 'o':
  	      have_o = 1;
! #if defined(HAVE_EXECUTABLE_SUFFIX)
  	      if (! have_c)
  		{
--- 3508,3512 ----
  	    case 'o':
  	      have_o = 1;
! #if defined(HAVE_TARGET_EXECUTABLE_SUFFIX)
  	      if (! have_c)
  		{
*************** process_command (argc, argv)
*** 3529,3533 ****
  		}
  #endif
! #if defined(HAVE_EXECUTABLE_SUFFIX) || defined(HAVE_OBJECT_SUFFIX)
  	      if (p[1] == 0)
  		argv[i + 1] = convert_filename (argv[i + 1], ! have_c);
--- 3537,3541 ----
  		}
  #endif
! #if defined(HAVE_TARGET_EXECUTABLE_SUFFIX) || defined(HAVE_TARGET_OBJECT_SUFFIX)
  	      if (p[1] == 0)
  		argv[i + 1] = convert_filename (argv[i + 1], ! have_c);
*************** process_command (argc, argv)
*** 3878,3882 ****
        else
  	{
! #ifdef HAVE_OBJECT_SUFFIX
  	  argv[i] = convert_filename (argv[i], 0);
  #endif
--- 3886,3890 ----
        else
  	{
! #ifdef HAVE_TARGET_OBJECT_SUFFIX
  	  argv[i] = convert_filename (argv[i], 0);
  #endif
*************** do_spec_1 (spec, inswitch, soft_matched_
*** 4301,4315 ****
  		      abort ();
  		    if (suffix_length == 0)
! 		      suffix = OBJECT_SUFFIX;
  		    else
  		      {
  			saved_suffix
  			  = (char *) xmalloc (suffix_length
! 					      + strlen (OBJECT_SUFFIX));
  			strncpy (saved_suffix, suffix, suffix_length);
  			strcpy (saved_suffix + suffix_length,
! 				OBJECT_SUFFIX);
  		      }
! 		    suffix_length += strlen (OBJECT_SUFFIX);
  		  }
  
--- 4309,4323 ----
  		      abort ();
  		    if (suffix_length == 0)
! 		      suffix = TARGET_OBJECT_SUFFIX;
  		    else
  		      {
  			saved_suffix
  			  = (char *) xmalloc (suffix_length
! 					      + strlen (TARGET_OBJECT_SUFFIX));
  			strncpy (saved_suffix, suffix, suffix_length);
  			strcpy (saved_suffix + suffix_length,
! 				TARGET_OBJECT_SUFFIX);
  		      }
! 		    suffix_length += strlen (TARGET_OBJECT_SUFFIX);
  		  }
  
*************** do_spec_1 (spec, inswitch, soft_matched_
*** 4390,4394 ****
  
  	  case 'O':
! 	    obstack_grow (&obstack, OBJECT_SUFFIX, strlen (OBJECT_SUFFIX));
  	    arg_going = 1;
  	    break;
--- 4398,4402 ----
  
  	  case 'O':
! 	    obstack_grow (&obstack, TARGET_OBJECT_SUFFIX, strlen (TARGET_OBJECT_SUFFIX));
  	    arg_going = 1;
  	    break;
Index: mkdeps.c
===================================================================
RCS file: /cvs/uberbaum/gcc/mkdeps.c,v
retrieving revision 1.13
diff -p -2 -r1.13  mkdeps.c
*** mkdeps.c	2001/03/10 10:43:52	1.13
--- mkdeps.c	2001/03/20 00:15:42
*************** deps_add_default_target (d, tgt)
*** 189,197 ****
    else
      {
! #ifndef OBJECT_SUFFIX
! # define OBJECT_SUFFIX ".o"
  #endif
        char *start = lbasename (tgt);
!       char *o = (char *) alloca (strlen (start) + strlen (OBJECT_SUFFIX) + 1);
        char *suffix;
  
--- 189,197 ----
    else
      {
! #ifndef TARGET_OBJECT_SUFFIX
! # define TARGET_OBJECT_SUFFIX ".o"
  #endif
        char *start = lbasename (tgt);
!       char *o = (char *) alloca (strlen (start) + strlen (TARGET_OBJECT_SUFFIX) + 1);
        char *suffix;
  
*************** deps_add_default_target (d, tgt)
*** 201,205 ****
        if (!suffix)
          suffix = o + strlen (o);
!       strcpy (suffix, OBJECT_SUFFIX);
        
        deps_add_target (d, o, 1);
--- 201,205 ----
        if (!suffix)
          suffix = o + strlen (o);
!       strcpy (suffix, TARGET_OBJECT_SUFFIX);
        
        deps_add_target (d, o, 1);
Index: config/alpha/vms.h
===================================================================
RCS file: /cvs/uberbaum/gcc/config/alpha/vms.h,v
retrieving revision 1.31
diff -p -2 -r1.31  config/alpha/vms.h
*** config/alpha/vms.h	2001/02/25 05:23:34	1.31
--- config/alpha/vms.h	2001/03/20 00:15:47
*************** Boston, MA 02111-1307, USA.  */
*** 21,24 ****
--- 21,27 ----
  #define OPEN_VMS 1
  
+ #define TARGET_OBJECT_SUFFIX ".obj"
+ #define TARGET_EXECUTABLE_SUFFIX ".exe"
+ 
  /* This enables certain macros in alpha.h, which will make an indirect
     reference to an external symbol an invalid address.  This needs to be
Index: config/alpha/xm-vms.h
===================================================================
RCS file: /cvs/uberbaum/gcc/config/alpha/xm-vms.h,v
retrieving revision 1.9
diff -p -2 -r1.9  config/alpha/xm-vms.h
*** config/alpha/xm-vms.h	2001/03/14 00:58:25	1.9
--- config/alpha/xm-vms.h	2001/03/20 00:15:47
*************** Boston, MA 02111-1307, USA.  */
*** 77,80 ****
  #define HAVE_STRINGIZE 1
  
! #define OBJECT_SUFFIX ".obj"
! #define EXECUTABLE_SUFFIX ".exe"
--- 77,80 ----
  #define HAVE_STRINGIZE 1
  
! #define HOST_EXECUTABLE_SUFFIX ".exe"
! #define HOST_OBJECT_SUFFIX ".obj"
Index: config/i386/cygwin.h
===================================================================
RCS file: /cvs/uberbaum/gcc/config/i386/cygwin.h,v
retrieving revision 1.39
diff -p -2 -r1.39  config/i386/cygwin.h
*** config/i386/cygwin.h	2001/03/11 01:02:50	1.39
--- config/i386/cygwin.h	2001/03/20 00:15:51
*************** Boston, MA 02111-1307, USA. */
*** 27,30 ****
--- 27,32 ----
  #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
  
+ #define TARGET_EXECUTABLE_SUFFIX ".exe"
+ 
  #include "i386/gas.h"
  #include "dbxcoff.h"
Index: config/i386/mingw32.h
===================================================================
RCS file: /cvs/uberbaum/gcc/config/i386/mingw32.h,v
retrieving revision 1.19
diff -p -2 -r1.19  config/i386/mingw32.h
*** config/i386/mingw32.h	2001/02/25 01:06:13	1.19
--- config/i386/mingw32.h	2001/03/20 00:15:52
***************
*** 1,5 ****
  /* Operating system specific defines to be used when targeting GCC for
     hosting on Windows32, using GNU tools and the Windows32 API Library.
!    Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
--- 1,5 ----
  /* Operating system specific defines to be used when targeting GCC for
     hosting on Windows32, using GNU tools and the Windows32 API Library.
!    Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
*************** Boston, MA 02111-1307, USA. */
*** 24,27 ****
--- 24,29 ----
  
  #include "i386/cygwin.h"
+ 
+ #define TARGET_EXECUTABLE_SUFFIX ".exe"
  
  /* Please keep changes to CPP_PREDEFINES in sync with i386/crtdll. The
Index: config/i386/xm-cygwin.h
===================================================================
RCS file: /cvs/uberbaum/gcc/config/i386/xm-cygwin.h,v
retrieving revision 1.10
diff -p -2 -r1.10  config/i386/xm-cygwin.h
*** config/i386/xm-cygwin.h	2001/03/17 04:59:14	1.10
--- config/i386/xm-cygwin.h	2001/03/20 00:15:53
*** 22,26 ****
  #include <sys/cygwin.h>
  
! #define EXECUTABLE_SUFFIX ".exe"
  
  /* Even though Cygwin tries to hide the DOS based filesystem, it
--- 22,26 ----
  #include <sys/cygwin.h>
  
! #define HOST_EXECUTABLE_SUFFIX ".exe"
  
  /* Even though Cygwin tries to hide the DOS based filesystem, it
Index: config/i386/xm-djgpp.h
===================================================================
RCS file: /cvs/uberbaum/gcc/config/i386/xm-djgpp.h,v
retrieving revision 1.10
diff -p -2 -r1.10  config/i386/xm-djgpp.h
*** config/i386/xm-djgpp.h	2001/03/09 20:53:53	1.10
--- config/i386/xm-djgpp.h	2001/03/20 00:15:54
***************
*** 1,4 ****
  /* Configuration for GNU C-compiler for Intel 80386 running DJGPP.
!    Copyright (C) 1988, 1996, 1998, 1999, 2000 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
--- 1,4 ----
  /* Configuration for GNU C-compiler for Intel 80386 running DJGPP.
!    Copyright (C) 1988, 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
*************** Boston, MA 02111-1307, USA.  */
*** 24,28 ****
  #define PATH_SEPARATOR ';'
  
! #define EXECUTABLE_SUFFIX ".exe"
  
  /* Even though we support "/", allow "\" since everybody tests both.  */
--- 24,28 ----
  #define PATH_SEPARATOR ';'
  
! #define HOST_EXECUTABLE_SUFFIX ".exe"
  
  /* Even though we support "/", allow "\" since everybody tests both.  */
Index: config/i386/xm-mingw32.h
===================================================================
RCS file: /cvs/uberbaum/gcc/config/i386/xm-mingw32.h,v
retrieving revision 1.12
diff -p -2 -r1.12  config/i386/xm-mingw32.h
*** config/i386/xm-mingw32.h	2001/03/12 06:31:40	1.12
--- config/i386/xm-mingw32.h	2001/03/20 00:15:54
*************** Boston, MA 02111-1307, USA. */
*** 30,34 ****
  #define HAVE_DOS_BASED_FILE_SYSTEM
  
! #define EXECUTABLE_SUFFIX ".exe"
  
  #undef PATH_SEPARATOR
--- 30,34 ----
  #define HAVE_DOS_BASED_FILE_SYSTEM
  
! #define HOST_EXECUTABLE_SUFFIX ".exe"
  
  #undef PATH_SEPARATOR
Index: config/vax/vms.h
===================================================================
RCS file: /cvs/uberbaum/gcc/config/vax/vms.h,v
retrieving revision 1.8
diff -p -2 -r1.8  config/vax/vms.h
*** config/vax/vms.h	2000/11/02 23:29:13	1.8
--- config/vax/vms.h	2001/03/20 00:16:01
***************
*** 1,4 ****
  /* Output variables, constants and external declarations, for GNU compiler.
!    Copyright (C) 1988, 1994, 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
--- 1,4 ----
  /* Output variables, constants and external declarations, for GNU compiler.
!    Copyright (C) 1988, 1994, 1995, 1996, 1997, 1999, 2001 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
*************** Boston, MA 02111-1307, USA.  */
*** 20,23 ****
--- 20,26 ----
  
  #define VMS_TARGET
+ 
+ #define TARGET_EXECUTABLE_SUFFIX ".exe"
+ #define TARGET_OBJECT_SUFFIX ".obj"
  
  /* This enables certain macros in vax.h, which will make an indirect
Index: config/vax/xm-vms.h
===================================================================
RCS file: /cvs/uberbaum/gcc/config/vax/xm-vms.h,v
retrieving revision 1.13
diff -p -2 -r1.13  config/vax/xm-vms.h
*** config/vax/xm-vms.h	2001/03/15 00:13:37	1.13
--- config/vax/xm-vms.h	2001/03/20 00:16:04
*************** Boston, MA 02111-1307, USA.  */
*** 163,166 ****
  #endif
  
! #define OBJECT_SUFFIX ".obj"
! #define EXECUTABLE_SUFFIX ".exe"
--- 163,166 ----
  #endif
  
! #define HOST_EXECUTABLE_SUFFIX ".exe"
! #define HOST_OBJECT_SUFFIX ".obj"
Index: java/lang.c
===================================================================
RCS file: /cvs/uberbaum/gcc/java/lang.c,v
retrieving revision 1.60
diff -p -2 -r1.60  java/lang.c
*** java/lang.c	2001/02/24 03:28:39	1.60
--- java/lang.c	2001/03/20 00:16:08
*************** static int process_option_with_no PARAMS
*** 57,62 ****
  					   int));
  
! #ifndef OBJECT_SUFFIX
! # define OBJECT_SUFFIX ".o"
  #endif
  
--- 57,62 ----
  					   int));
  
! #ifndef TARGET_OBJECT_SUFFIX
! # define TARGET_OBJECT_SUFFIX ".o"
  #endif
  
*************** init_parse (filename)
*** 406,410 ****
  		{
  		  char *buf = (char *) xmalloc (dot - filename +
! 						3 + sizeof (OBJECT_SUFFIX));
  		  strncpy (buf, filename, dot - filename);
  
--- 406,410 ----
  		{
  		  char *buf = (char *) xmalloc (dot - filename +
! 						3 + sizeof (TARGET_OBJECT_SUFFIX));
  		  strncpy (buf, filename, dot - filename);
  
*************** init_parse (filename)
*** 419,423 ****
  		  else
  		    {
! 		      strcpy (buf + (dot - filename), OBJECT_SUFFIX);
  		      jcf_dependency_set_target (buf);
  		    }
--- 419,423 ----
  		  else
  		    {
! 		      strcpy (buf + (dot - filename), TARGET_OBJECT_SUFFIX);
  		      jcf_dependency_set_target (buf);
  		    }


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]