[oe-commits] org.oe.packaged-staging gcc: Sync with .dev

rpurdie commit openembedded-commits at lists.openembedded.org
Sun Oct 1 13:25:43 UTC 2006


gcc: Sync with .dev

Author: rpurdie at openembedded.org
Branch: org.openembedded.packaged-staging
Revision: ce39bd28bd3b560789a3bac214b6a55fdaebf15c
ViewMTN: http://monotone.openembedded.org/revision.psp?id=ce39bd28bd3b560789a3bac214b6a55fdaebf15c
Files:
1
packages/gcc/gcc-4.1.1/armeb-fix.patch
packages/gcc/gcc-4.0.2/GCOV_PREFIX_STRIP-cross-profile_4.1.patch
packages/gcc/gcc-4.0.2/zecke-xgcc-cpp.patch
packages/gcc/gcc-4.1.1/100-uclibc-conf.patch
packages/gcc/gcc-4.1.1/110-arm-eabi.patch
packages/gcc/gcc-4.1.1/200-uclibc-locale.patch
packages/gcc/gcc-4.1.1/300-libstdc++-pic.patch
packages/gcc/gcc-4.1.1/301-missing-execinfo_h.patch
packages/gcc/gcc-4.1.1/302-c99-snprintf.patch
packages/gcc/gcc-4.1.1/303-c99-complex-ugly-hack.patch
packages/gcc/gcc-4.1.1/304-index_macro.patch
packages/gcc/gcc-4.1.1/602-sdk-libstdc++-includes.patch
packages/gcc/gcc-4.1.1/740-sh-pr24836.patch
packages/gcc/gcc-4.1.1/800-arm-bigendian.patch
packages/gcc/gcc-4.1.1/README
packages/gcc/gcc-4.1.1/arm-thumb-cache.patch
packages/gcc/gcc-4.1.1/arm-thumb.patch
packages/gcc/gcc-4.1.1/cse.patch
packages/gcc/gcc-4.1.1/gcc41-configure.in.patch
packages/gcc/gcc-4.1.1/zecke-xgcc-cpp.patch
packages/gcc/gcc-package.inc
packages/gcc/gcc3-build.inc
packages/gcc/gcc_4.0.2.bb
packages/gcc/gcc_4.1.0.bb
packages/gcc/gcc_4.1.1.bb
packages/gcc/gcc_4.2-20060513.bb
Diffs:

#
# mt diff -r83f0a41f071f02d48fd74893a96fedabdd4f7fa3 -rce39bd28bd3b560789a3bac214b6a55fdaebf15c
#
# 
# 
# delete "packages/gcc/gcc-4.1.1/armeb-fix.patch"
# 
# add_file "packages/gcc/gcc-4.0.2/GCOV_PREFIX_STRIP-cross-profile_4.1.patch"
#  content [0fd9a4feb56114ff6d37ce8bcf30d5ecaa91afea]
# 
# add_file "packages/gcc/gcc-4.0.2/zecke-xgcc-cpp.patch"
#  content [3e9beaf5a1b697fb60408fa6515cb4f6f14a5088]
# 
# add_file "packages/gcc/gcc-4.1.1/100-uclibc-conf.patch"
#  content [bea24a3907b7687ed584da8e1e6e4e5829e34927]
# 
# add_file "packages/gcc/gcc-4.1.1/110-arm-eabi.patch"
#  content [d948eed1dd804417ae062af1e38e7d55f8f47ae1]
# 
# add_file "packages/gcc/gcc-4.1.1/200-uclibc-locale.patch"
#  content [52df81f0459092bfef16ca05c6106092b5a1d3b3]
# 
# add_file "packages/gcc/gcc-4.1.1/300-libstdc++-pic.patch"
#  content [aa362fbe2354d64dc46bf042a84093fd4308db2a]
# 
# add_file "packages/gcc/gcc-4.1.1/301-missing-execinfo_h.patch"
#  content [6500043e6f4e77464f8f277903e0f8c16b29f7d8]
# 
# add_file "packages/gcc/gcc-4.1.1/302-c99-snprintf.patch"
#  content [5837922659dae60d1753d6257befc3472b9180df]
# 
# add_file "packages/gcc/gcc-4.1.1/303-c99-complex-ugly-hack.patch"
#  content [3e656fffeed3399240557279dae21981db135fe9]
# 
# add_file "packages/gcc/gcc-4.1.1/304-index_macro.patch"
#  content [072e0b40f526701af4254ce63c54d98a27db6f19]
# 
# add_file "packages/gcc/gcc-4.1.1/602-sdk-libstdc++-includes.patch"
#  content [e6765af92cbc18a1e910def377a8816bcd460df7]
# 
# add_file "packages/gcc/gcc-4.1.1/740-sh-pr24836.patch"
#  content [fe889fc46b34d5f56e38e156dd622208800960ad]
# 
# add_file "packages/gcc/gcc-4.1.1/800-arm-bigendian.patch"
#  content [903d4846c84e17aae8d8d51696deb9ce1c7fbc66]
# 
# add_file "packages/gcc/gcc-4.1.1/README"
#  content [d3da08995423ef301b1feac948fc2f5310bd4ea1]
# 
# add_file "packages/gcc/gcc-4.1.1/arm-thumb-cache.patch"
#  content [43c66e2b218e047519dfcb193d3e8221c5bcb099]
# 
# add_file "packages/gcc/gcc-4.1.1/arm-thumb.patch"
#  content [c1ab94e8925134bf5b5cae5a2689f0c7127eb008]
# 
# add_file "packages/gcc/gcc-4.1.1/cse.patch"
#  content [6baa5568d1ba46f21ca0641872c208bbc331e57a]
# 
# add_file "packages/gcc/gcc-4.1.1/gcc41-configure.in.patch"
#  content [baa3cf740d1ea329fcdef9bc110461df8952fc02]
# 
# add_file "packages/gcc/gcc-4.1.1/zecke-xgcc-cpp.patch"
#  content [6148ea439041ba0af321d2298fea9a6d602f585e]
# 
# patch "packages/gcc/gcc-package.inc"
#  from [15e08afece3eb2cb67eed6896894e8e9e814ae92]
#    to [55dc8cfc317dbcbdafa33f91bb7fd64840d0c258]
# 
# patch "packages/gcc/gcc3-build.inc"
#  from [0a4eeb3611c5558269cf35e9c4ff2ad1d5a34b63]
#    to [38e2345ac5099910e8c537a7e4c8d4b3b5e9bae7]
# 
# patch "packages/gcc/gcc_4.0.2.bb"
#  from [ad52066aa2a0bcaf67a619ec608a3f3b30519d4b]
#    to [71f5b9de7a96ec48acb8c5c64d75abd2c9373953]
# 
# patch "packages/gcc/gcc_4.1.0.bb"
#  from [ade8f25ea6baf09fb1a3fb08d8a5383c91f259d9]
#    to [a1749b62962fcf13f04c170ed503ec2bd8559b79]
# 
# patch "packages/gcc/gcc_4.1.1.bb"
#  from [f62161c1508592352905c08473edc664cf80fac9]
#    to [30ac1bd0daf29b64bc91545eb6103b9c13e7d2f8]
# 
# patch "packages/gcc/gcc_4.2-20060513.bb"
#  from [0efa26aedbb2c4fb5b51f2113b56b16649c10c19]
#    to [7a82e21f8fe60d9ee6a45ceb4515acfa21d57c3c]
# 
============================================================
--- packages/gcc/gcc-4.0.2/GCOV_PREFIX_STRIP-cross-profile_4.1.patch	0fd9a4feb56114ff6d37ce8bcf30d5ecaa91afea
+++ packages/gcc/gcc-4.0.2/GCOV_PREFIX_STRIP-cross-profile_4.1.patch	0fd9a4feb56114ff6d37ce8bcf30d5ecaa91afea
@@ -0,0 +1,371 @@
+2005-05-04  Grigory Zagorodnev  <grigory.zagorodnev at intel.com>
+	    H.J. Lu  <hongjiu.lu at intel.com>
+
+	* gcov-io.c (gcov_open): When in libgcov library
+	use given data file relocation prefix to build file name.
+	* gcov-io.h (gcov_open): Updated proto to accept
+	data file relocation prefix.
+	* libgcov.c (create_file_directory): New function.
+	(gcov_prefix): New static variable to hold data file
+	relocation prefix.
+	(gcov_version): Use relocation prefix.
+	(gcov_exit): Always try to create directory for output
+	file. Relocate filename at each use.
+	(__gcov_init): Initialize directory relocation prefix
+	if required. Strip off leading directories from
+	the initial filename.
+	* tsystem.h: include filenames.h
+	(DIR_SEPARATOR): Macro copied from system.h.
+	(DIR_SEPARATOR_2): Likewise.
+	* doc/gcov.texi (Cross-profiling): New node documenting
+	cross-profiling management.
+	* doc/invoke.texi (-fprofile-arcs): xref to cross-profiling.
+
+--- gcc-4/gcc/doc/gcov.texi.prefix	2005-03-28 11:56:34.000000000 -0800
++++ gcc-4/gcc/doc/gcov.texi	2005-05-04 15:07:44.000000000 -0700
+@@ -42,6 +42,7 @@ test code coverage in your programs.
+ * Invoking Gcov::       	How to use gcov.
+ * Gcov and Optimization::       Using gcov with GCC optimization.
+ * Gcov Data Files::             The files used by gcov.
++* Cross-profiling::             Data files relocation.
+ @end menu
+ 
+ @node Gcov Intro
+@@ -531,3 +532,36 @@ information.
+ The full details of the file format is specified in @file{gcov-io.h},
+ and functions provided in that header file should be used to access the
+ coverage files.
++
++ at node Cross-profiling
++ at section Data files relocation to support cross-profiling
++
++Running the program will cause profile output to be generated.  For each 
++source file compiled with @option{-fprofile-arcs}, an accompanying @file{.gcda} 
++file will be placed in the object file directory. That implicitly requires 
++running the program at the same system as it was build or having same 
++absolute directory structure on the target system (program will try 
++to create needed directory structure).
++
++To support cross-profiling, program compiled with @option{-fprofile-arcs}
++performs data file relocation basing on two environment variables:
++
++ at itemize @bullet
++ at item
++GCOV_PREFIX contains the prefix to add to the absolute paths 
++in the object file.
++
++ at item
++GCOV_PREFIX_STRIP indicates the how many initial directory names to strip off 
++the hardwired absolute paths. Default value is 0.
++ at end itemize
++
++For example, if object file @file{/user/build/foo.o} was build with 
++ at option{-fprofile-arcs}, the final executable will try to create data file 
++ at file{/user/build/foo.gcda} when running at the target system and will 
++fail if corresponding directory does not exists and is not allowed to create. 
++
++In this case, manipulating environment variables you can relocate data file 
++to the suitable local directory. For our example, setting @samp{GCOV_PREFIX=/target/run} 
++and @samp{GCOV_PREFIX_STRIP=1} values will force use of @file{/target/run/build/foo.gcda} 
++file name.
+--- gcc-4/gcc/doc/invoke.texi.prefix	2005-05-04 11:21:00.000000000 -0700
++++ gcc-4/gcc/doc/invoke.texi	2005-05-04 15:07:44.000000000 -0700
+@@ -3420,6 +3420,7 @@ explicitly specified and it is not the f
+ the basename of the source file.  In both cases any suffix is removed
+ (e.g.@: @file{foo.gcda} for input file @file{dir/foo.c}, or
+ @file{dir/foo.gcda} for output file specified as @option{-o dir/foo.o}).
++ at xref{Cross-profiling}.
+ 
+ @cindex @command{gcov}
+ @item --coverage
+--- gcc-4/gcc/gcov-io.c.prefix	2005-04-28 16:11:30.000000000 -0700
++++ gcc-4/gcc/gcov-io.c	2005-05-04 20:02:35.000000000 -0700
+@@ -55,13 +55,14 @@ static inline gcov_unsigned_t from_file 
+ 
+ GCOV_LINKAGE int
+ #if IN_LIBGCOV
+-gcov_open (const char *name)
++gcov_open (const char *prefix, const char *name)
+ #else
+ gcov_open (const char *name, int mode)
+ #endif
+ {
+ #if IN_LIBGCOV
+   const int mode = 0;
++  char *tmp;
+ #endif
+ #if GCOV_LOCKED
+   struct flock s_flock;
+@@ -82,6 +83,13 @@ gcov_open (const char *name, int mode)
+ #if !IN_LIBGCOV
+   gcov_var.endian = 0;
+ #endif
++
++#if IN_LIBGCOV
++  /* Build complete filename with prefix */
++  tmp = alloca (strlen (prefix) + strlen (name) + 1);
++  name = strcat (strcpy (tmp, prefix), name);
++#endif
++
+ #if GCOV_LOCKED
+   if (mode > 0)
+     fd = open (name, O_RDWR);
+--- gcc-4/gcc/gcov-io.h.prefix	2005-05-02 17:43:08.000000000 -0700
++++ gcc-4/gcc/gcov-io.h	2005-05-04 15:07:44.000000000 -0700
+@@ -515,7 +515,7 @@ GCOV_LINKAGE struct gcov_var
+    functions for writing.  Your file may become corrupted if you break
+    these invariants.  */
+ #if IN_LIBGCOV
+-GCOV_LINKAGE int gcov_open (const char */*name*/) ATTRIBUTE_HIDDEN;
++GCOV_LINKAGE int gcov_open (const char */*prefix*/, const char */*name*/) ATTRIBUTE_HIDDEN;
+ #else
+ GCOV_LINKAGE int gcov_open (const char */*name*/, int /*direction*/);
+ GCOV_LINKAGE int gcov_magic (gcov_unsigned_t, gcov_unsigned_t);
+--- gcc-4/gcc/libgcov.c.prefix	2005-04-28 16:11:30.000000000 -0700
++++ gcc-4/gcc/libgcov.c	2005-05-04 15:07:44.000000000 -0700
+@@ -92,6 +92,70 @@ static struct gcov_info *gcov_list;
+    object file included in multiple programs.  */
+ static gcov_unsigned_t gcov_crc32;
+ 
++/* Directory prefix to relocate coverage data file names */
++static char *gcov_prefix = 0;
++
++/* Level of dirs to strip off the initial filename to relocate */
++static int gcov_prefix_strip = 0;
++
++static int
++create_file_directory (const char *prefix, const char *filename)
++{
++  char *dname;
++  char sep, *r, *s;
++  size_t plen, flen;
++  
++  /* Detect directory separator */
++  s = strrchr (prefix, DIR_SEPARATOR);
++#ifdef DIR_SEPARATOR_2
++  if (! s)
++    s = strrchr (prefix, DIR_SEPARATOR_2);
++#endif
++  if (s)
++    sep = *s;
++  else
++    sep = DIR_SEPARATOR;
++
++  /* join prefix and filename, split path */
++  plen  = strlen(prefix);
++  flen  = strlen(filename);
++  r     = alloca(plen + flen + 1);
++  strncpy(r, prefix, plen);
++  strncpy(r + plen, filename, flen);
++  r[plen + flen] = '\0';
++  s = strrchr(r, sep);
++  if (s)
++    *(s + 1) = '\0';
++
++  if (access (r, F_OK) == 0)
++    return 0;
++
++  /* Skip consecutive separators.  */
++  for (dname = r; *dname && *dname == sep; ++dname);
++  while (1)
++    {
++      char *s = strchr (dname, sep);
++      if (s == 0)
++        break;
++      *s = '\0';
++      /* Try to make directory if it doesn't already exist.  */
++      if (access (r, F_OK) == -1
++          && mkdir (r, 0755) == -1
++          /* The directory might have been made by another process.  */
++	  && errno != EEXIST)
++	{
++          *s = sep;
++          fprintf (stderr, "profiling:%s:Cannot create directory\n", r);
++	  return -1;
++	};
++      *s = sep;
++      /* Skip consecutive separators.  */
++      for (dname = s + 1; *dname && *dname == sep; ++dname)
++        ;
++    }
++  return 0;
++}
++
+ static int
+ gcov_version (struct gcov_info *ptr, gcov_unsigned_t version)
+ {
+@@ -103,8 +167,8 @@ gcov_version (struct gcov_info *ptr, gco
+       GCOV_UNSIGNED2STRING (e, GCOV_VERSION);
+       
+       fprintf (stderr,
+-	       "profiling:%s:Version mismatch - expected %.4s got %.4s\n",
+-	       ptr->filename, e, v);
++	       "profiling:%s%s:Version mismatch - expected %.4s got %.4s\n",
++	       gcov_prefix, ptr->filename, e, v);
+       return 0;
+     }
+   return 1;
+@@ -205,9 +269,16 @@ gcov_exit (void)
+ 	  fi_stride &= ~(__alignof__ (struct gcov_fn_info) - 1);
+ 	}
+       
+-      if (!gcov_open (gi_ptr->filename))
++      if (create_file_directory (gcov_prefix, gi_ptr->filename))
++	{
++	  fprintf (stderr, "profiling:%s%s:Skip\n", gcov_prefix,
++		   gi_ptr->filename);
++	  continue;
++	}
++      else if (!gcov_open (gcov_prefix, gi_ptr->filename))
+ 	{
+-	  fprintf (stderr, "profiling:%s:Cannot open\n", gi_ptr->filename);
++	  fprintf (stderr, "profiling:%s%s:Cannot open\n", gcov_prefix,
++		   gi_ptr->filename);
+ 	  continue;
+ 	}
+ 
+@@ -217,8 +288,8 @@ gcov_exit (void)
+ 	  /* Merge data from file.  */
+ 	  if (tag != GCOV_DATA_MAGIC)
+ 	    {
+-	      fprintf (stderr, "profiling:%s:Not a gcov data file\n",
+-		       gi_ptr->filename);
++	      fprintf (stderr, "profiling:%s%s:Not a gcov data file\n",
++		       gcov_prefix, gi_ptr->filename);
+ 	      goto read_fatal;
+ 	    }
+ 	  length = gcov_read_unsigned ();
+@@ -245,8 +316,8 @@ gcov_exit (void)
+ 		  || gcov_read_unsigned () != fi_ptr->checksum)
+ 		{
+ 		read_mismatch:;
+-		  fprintf (stderr, "profiling:%s:Merge mismatch for %s\n",
+-			   gi_ptr->filename,
++		  fprintf (stderr, "profiling:%s%s:Merge mismatch for %s\n",
++			   gcov_prefix, gi_ptr->filename,
+ 			   f_ix + 1 ? "function" : "summaries");
+ 		  goto read_fatal;
+ 		}
+@@ -305,7 +376,8 @@ gcov_exit (void)
+       
+     read_error:;
+       fprintf (stderr, error < 0 ? "profiling:%s:Overflow merging\n"
+-	       : "profiling:%s:Error merging\n", gi_ptr->filename);
++	       : "profiling:%s%s:Error merging\n", gcov_prefix,
++	       gi_ptr->filename);
+ 	      
+     read_fatal:;
+       gcov_close ();
+@@ -355,8 +427,8 @@ gcov_exit (void)
+ 		   && (!GCOV_LOCKED || cs_all->runs == cs_prg->runs)
+ 		   && memcmp (cs_all, cs_prg, sizeof (*cs_all)))
+ 	    {
+-	      fprintf (stderr, "profiling:%s:Invocation mismatch - some data files may have been removed%s",
+-		       gi_ptr->filename, GCOV_LOCKED
++	      fprintf (stderr, "profiling:%s%s:Invocation mismatch - some data files may have been removed%s",
++		       gcov_prefix, gi_ptr->filename, GCOV_LOCKED
+ 		       ? "" : " or concurrent update without locking support");
+ 	      all.checksum = ~0u;
+ 	    }
+@@ -419,9 +491,9 @@ gcov_exit (void)
+ 	gcov_write_unsigned (0);
+       if ((error = gcov_close ()))
+ 	  fprintf (stderr, error  < 0 ?
+-		   "profiling:%s:Overflow writing\n" :
+-		   "profiling:%s:Error writing\n",
+-		   gi_ptr->filename);
++		   "profiling:%s%s:Overflow writing\n" :
++		   "profiling:%s%s:Error writing\n",
++		   gcov_prefix, gi_ptr->filename);
+     }
+ }
+ 
+@@ -431,11 +503,69 @@ gcov_exit (void)
+ void
+ __gcov_init (struct gcov_info *info)
+ {
++  /* Save initial filename pointer to calculate CRC. */
++  const char *ptr = info->filename;
++  
+   if (!info->version)
+     return;
++
++  /* Initialize directory prefix if requred */
++  if (gcov_prefix == 0)
++    {
++      if ((gcov_prefix = getenv("GCOV_PREFIX")))
++        {
++          char *tmp;
++	
++          /* Normalize prefix: take off trailing separator. */
++	  tmp = gcov_prefix + strlen(gcov_prefix) - 1;
++          if (IS_DIR_SEPARATOR(*tmp))
++            *tmp = '\0';
++
++          /* Check if the level of dirs to strip off specified */
++          if ((tmp = getenv("GCOV_PREFIX_STRIP")))
++            {
++	      gcov_prefix_strip = atoi (tmp);
++	      /* Do not consider negative values. */
++	      if (gcov_prefix_strip < 0)
++	        gcov_prefix_strip = 0;
++	    };
++        }
++      else 
++          gcov_prefix = (char *) "";
++    };
++    
++  /* Strip off leading directories from the initial filename */
++  if (gcov_prefix_strip > 0)
++    {
++      char sep, *s;
++      int level;
++      const char *fname = info->filename;
++      
++      /* Detect directory separator */
++      s = strrchr (fname, DIR_SEPARATOR);
++#ifdef DIR_SEPARATOR_2
++      if (! s)
++        s = strrchr (fname, DIR_SEPARATOR_2);
++#endif
++      if (s)
++        sep = *s;
++      else
++        sep = DIR_SEPARATOR;
++
++      /* Skip selected directory levels */
++      for ( level = gcov_prefix_strip; level > 0; level--)
++        if ((s = strchr(fname + 1, sep)))
++	  fname = s;
++	else
++	  break;
++	  
++      /* From this point info block refers stripped file name and 
++         further operations must add prefix to get complete name.*/
++      info->filename = fname;
++    };
++
+   if (gcov_version (info, info->version))
+     {
+-      const char *ptr = info->filename;
+       gcov_unsigned_t crc32 = gcov_crc32;
+   
+       do
+--- gcc-4/gcc/tsystem.h.prefix	2005-03-29 16:06:26.000000000 -0800
++++ gcc-4/gcc/tsystem.h	2005-05-04 15:07:44.000000000 -0700
+@@ -131,4 +131,15 @@ extern int errno;
+    unreachable default case of a switch.  Do not use gcc_assert(0).  */
+ #define gcc_unreachable() (abort ())
+ 
++/* Filename handling macros.  */
++#include "filenames.h"
++
++/* These should be phased out in favor of IS_DIR_SEPARATOR, where possible.  */
++#ifndef DIR_SEPARATOR
++# define DIR_SEPARATOR '/'
++# ifdef HAVE_DOS_BASED_FILE_SYSTEM
++#  define DIR_SEPARATOR_2 '\\'
++# endif
++#endif
++
+ #endif /* ! GCC_TSYSTEM_H */
============================================================
--- packages/gcc/gcc-4.0.2/zecke-xgcc-cpp.patch	3e9beaf5a1b697fb60408fa6515cb4f6f14a5088
+++ packages/gcc/gcc-4.0.2/zecke-xgcc-cpp.patch	3e9beaf5a1b697fb60408f%s
>>> DIFF TRUNCATED @ 16K






More information about the Openembedded-commits mailing list