[RTEMS Project] #2779: building rtems-4.10 using rsb 4.12 (git upstream) fails due to several erros

RTEMS trac trac at rtems.org
Tue Aug 23 08:51:20 UTC 2016


#2779: building rtems-4.10 using rsb 4.12 (git upstream) fails due to several
erros
---------------------+-----------------------------
 Reporter:  spindel  |      Owner:
     Type:  defect   |     Status:  new
 Priority:  normal   |  Milestone:
Component:  RSB      |    Version:  4.10
 Severity:  major    |   Keywords:  RSB, 4.10, GCC5
---------------------+-----------------------------
 Building rtems-4.10 using the rtems-source-builder upstream version from
 git fails due to several bugs in the rsb script:

 * including rtems-version.bset in config/rtems-base.bset overwrites
 rtems_version variable set in rtems-4.10-base.bset
   * fix: remove remove config/version.bset and add "%define rtems_version
 4.12" to config/4.12/rtems-default.bset

 * rsb tries to download the rtems kernel from repository instead from ftp
 server
   * fix: add "%define rsb_version 4.10.2" to config/tools/rtems-
 kernel-4.10.2.cfg

 * building gcc-4.4.7 using gcc-5.x fails (tested gcc-5.4 on ubuntu 16.04
 x64)
   * fix: add attached gcc-4.4.7 patch gcc-core-4.4.7-rtems4.10-gcc5.diff
 to config/tools/rtems-gcc-4.4.7-newlib-1.18.0-1

 * changing the scripts to use the Github mirror "https://github.com/RTEMS"
 instead of "git://git.rtems.org" would allow people behind restrictive
 firewalls to use the rtems-source-builder

 gcc-core-4.4.7-rtems4.10-gcc5.diff
 {{{
 --- gcc-4.4.7-orig/gcc/cp/cfns.h.orig
 +++ gcc-4.4.7/gcc/cp/cfns.h
 @@ -36,6 +36,9 @@
  static unsigned int hash (const char *, unsigned int);
  #ifdef __GNUC__
  __inline
 +#ifdef __GNUC_STDC_INLINE__
 +__attribute__ ((__gnu_inline__))
 +#endif
  #endif
  const char * libc_name_p (const char *, unsigned int);
  /* maximum key range = 391, duplicates = 0 */
 @@ -79,7 +82,7 @@
        400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
        400, 400, 400, 400, 400, 400, 400
      };
 -  register int hval = len;
 +  register int hval = (int)len;

    switch (hval)
      {

 --- gcc-4.4.7-orig/gcc/toplev.c
 +++ gcc-4.4.7/gcc/toplev.c
 @@ -527,7 +527,7 @@
     for floor_log2 and exact_log2; see toplev.h.  That construct, however,
     conflicts with the ISO C++ One Definition Rule.   */

 -#if ((GCC_VERSION < 3004) || defined(__clang__)) || !defined
 (__cplusplus)
 +#if (GCC_VERSION < 3004)

  /* Given X, an unsigned number, return the largest int Y such that 2**Y
 <= X.
     If X is 0, return -1.  */
 @@ -579,7 +579,7 @@
  #endif
  }

 -#endif /*  GCC_VERSION < 3004 || !defined (__cplusplus)  */
 +#endif /*  GCC_VERSION < 3004 */

  /* Handler for fatal signals, such as SIGSEGV.  These are transformed
     into ICE messages, which is much more user friendly.  In case the


 --- gcc-4.4.7-orig/gcc/toplev.h
 +++ gcc-4.4.7/gcc/toplev.h
 @@ -167,6 +167,7 @@
  extern bool fast_math_flags_set_p      (void);
  extern bool fast_math_flags_struct_set_p (struct cl_optimization *);

 +#if (GCC_VERSION < 3004)
  /* Return log2, or -1 if not exact.  */
  extern int exact_log2                  (unsigned HOST_WIDE_INT);

 @@ -174,7 +175,7 @@
  extern int floor_log2                  (unsigned HOST_WIDE_INT);

  /* Inline versions of the above for speed.  */
 -#if (GCC_VERSION >= 3004) && !defined(__clang__)
 +#else /* (GCC_VERSION >= 3004) */
  # if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
  #  define CLZ_HWI __builtin_clzl
  #  define CTZ_HWI __builtin_ctzl
 @@ -186,13 +187,13 @@
  #  define CTZ_HWI __builtin_ctz
  # endif

 -extern inline int
 +static inline int
  floor_log2 (unsigned HOST_WIDE_INT x)
  {
    return x ? HOST_BITS_PER_WIDE_INT - 1 - (int) CLZ_HWI (x) : -1;
  }

 -extern inline int
 +static inline int
  exact_log2 (unsigned HOST_WIDE_INT x)
  {
    return x == (x & -x) && x ? (int) CTZ_HWI (x) : -1;

 }}}

--
Ticket URL: <http://devel.rtems.org/ticket/2779>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list