zoukankan      html  css  js  c++  java
  • rtems编译问题

    1. 执行bootstrap时大量warning: but option 'subdir-objects' is disabled
      据说是autoconf版本问题,把下面的代码保存到rtems源码根目录并执行即可
      感谢作者bh_binghu,转自https://blog.csdn.net/bh_binghu/article/details/80132632
    # !/usr/bin/env python
    # -*- coding: utf-8 -*-
    """ This Script add "subdir-objects" option for configure.ac file """
    
    import os
    import os.path
    
    def add_subdir_objects(filename):
        """ find AM_INIT_AUTOMAKE line and add option
        arg: configure.ac full path
        """
        fd = open(filename, 'r')
        lines = fd.readlines()
        fd.close()
        find = False
        dst_index = 0
        dst_line = ''
        for index, line in enumerate(lines):
            if line.find("AM_INIT_AUTOMAKE") >= 0:
                find = True
                dst_index = index
                dst_line = line
                break
        if find:
            add_option = "subdir-objects"
            options_start = dst_line.find('[')
            options_end = dst_line.find(']')
            if options_end > options_start > 0:
                options = dst_line[options_start+1:options_end].split(' ')
                add_count = options.count(add_option)
                if add_count == 0:
                    options.append(add_option)
                elif add_count == 1:
                    return False
                elif add_count > 1:
                    while add_count > 1:
                        options.remove(add_option)
                        add_count -= 1
                new_line = "AM_INIT_AUTOMAKE([%s])
    " % ' '.join(options)
                print new_line
                lines[dst_index] = new_line
                fd = open(filename, 'w')
                fd.writelines(lines)
                fd.close()
    
        return True
    
    
    def main():
        """ main function, no arg
        """
        dst_dir = './'
        for root, dirs, files in os.walk(dst_dir):
            if "configure.ac" in files:
                fullname = os.path.join(root, "configure.ac")
                if add_subdir_objects(fullname):
                    print fullname
        pass
    
    
    if __name__ == '__main__':
        main()
    
    
    1. autoconf automake aclocal的版本问题
      刚开始因为一些问题,我的makefile显示是由automake 1.15版本生成的,而不是rtems官方的1.12版本
      导致最终编译的时候提示start.o有问题编译失败。
      说明rtems编译依赖auto系列的版本
  • 相关阅读:
    SQL 查询当前时间
    request,reponse对象中的方法
    如何在JSP中获得Cookie对象
    JSP的执行原理
    ModelState查看错误字段的信息
    sql privot 实现行转列
    设计模式
    mvc未登录跳转到登录界面
    log4net
    IoC, DI,Spring.net
  • 原文地址:https://www.cnblogs.com/zl-yang/p/10423045.html
Copyright © 2011-2022 走看看