日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 综合教程 >内容正文

综合教程

rtems编译问题

發(fā)布時(shí)間:2023/12/19 综合教程 27 生活家
生活随笔 收集整理的這篇文章主要介紹了 rtems编译问题 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

執(zhí)行bootstrap時(shí)大量warning: but option 'subdir-objects' is disabled
據(jù)說(shuō)是autoconf版本問(wèn)題,把下面的代碼保存到rtems源碼根目錄并執(zhí)行即可
感謝作者bh_binghu,轉(zhuǎn)自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()

autoconf automake aclocal的版本問(wèn)題
剛開(kāi)始因?yàn)橐恍﹩?wèn)題,我的makefile顯示是由automake 1.15版本生成的,而不是rtems官方的1.12版本
導(dǎo)致最終編譯的時(shí)候提示start.o有問(wèn)題編譯失敗。
說(shuō)明rtems編譯依賴auto系列的版本

總結(jié)

以上是生活随笔為你收集整理的rtems编译问题的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。