美文网首页
解决error: ‘gnu_inline’ attribute

解决error: ‘gnu_inline’ attribute

作者: hades2013 | 来源:发表于2018-05-17 18:10 被阅读0次

    编译gcc是遇到如下报错:

    ../.././gcc/cp/cfns.gperf: error: ‘gnu_inline’ attribute present on ‘libc_name_p’   
    ../.././gcc/cp/cfns.gperf: error: but not here  
    

    修改GGC编译目录下...../gcc/cp/cfns.h文件

    
    --- gcc/cp/cfns.h.orig  2015-02-13 08:27:46.000000000 +0200
    +++ gcc/cp/cfns.h   2015-02-13 10:23:53.000000000 +0200
    @@ -53,6 +53,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 */
    @@ -96,7 +99,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)
         {
    

    参考:

    https://github.com/DragonFlyBSD/DPorts/issues/136

    https://drive.google.com/file/d/0BwWNLQDwiOxtYnJSRm1Dam9XTU0/view

    相关文章

      网友评论

          本文标题:解决error: ‘gnu_inline’ attribute

          本文链接:https://www.haomeiwen.com/subject/walidftx.html