导航

    全志在线开发者论坛

    • 注册
    • 登录
    • 搜索
    • 版块
    • 话题
    • 在线文档
    • 社区主页

    测试编译不过

    V Series
    2
    4
    1872
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • chainsx
      woshishabi LV 3 最后由 编辑

      SyterKit 使用 musl 编译不过,报错如下:

      [ 36%] Built target SyterKit
      [ 38%] Building C object lib/fatfs/CMakeFiles/fatfs.dir/diskio.c.o
      [ 40%] Building C object lib/fatfs/CMakeFiles/fatfs.dir/ff.c.o
      [ 42%] Building C object lib/fatfs/CMakeFiles/fatfs.dir/ffsystem.c.o
      [ 44%] Building C object lib/fatfs/CMakeFiles/fatfs.dir/ffunicode.c.o
      [ 46%] Linking C static library libfatfs.a
      [ 46%] Built target fatfs
      [ 48%] Building C object lib/fdt/CMakeFiles/fdt.dir/fdt.c.o
      [ 51%] Linking C static library libfdt.a
      [ 51%] Built target fdt
      [ 53%] Building ASM object app/hello_world/CMakeFiles/helloworld_fel.dir/start.S.o
      [ 55%] Building C object app/hello_world/CMakeFiles/helloworld_fel.dir/main.c.o
      [ 57%] Linking C executable helloworld_fel
      /home/xxxx/OpenWrt/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-12.3.0_musl_eabi/lib/gcc/arm-openwrt-linux-muslgnueabi/12.3.0/../../../../arm-openwrt-linux-muslgnueabi/bin/ld: error: helloworld_fel uses VFP register arguments, /home/xxxx/OpenWrt/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-12.3.0_musl_eabi/lib/gcc/arm-openwrt-linux-muslgnueabi/12.3.0/libgcc.a(_udivmoddi4.o) does not
      /home/xxxx/OpenWrt/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-12.3.0_musl_eabi/lib/gcc/arm-openwrt-linux-muslgnueabi/12.3.0/../../../../arm-openwrt-linux-muslgnueabi/bin/ld: failed to merge target specific data of file /home/xxxx/OpenWrt/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-12.3.0_musl_eabi/lib/gcc/arm-openwrt-linux-muslgnueabi/12.3.0/libgcc.a(_udivmoddi4.o)
      /home/xxxx/OpenWrt/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-12.3.0_musl_eabi/lib/gcc/arm-openwrt-linux-muslgnueabi/12.3.0/../../../../arm-openwrt-linux-muslgnueabi/bin/ld: warning: CMakeFiles/helloworld_fel.dir/start.S.o: missing .note.GNU-stack section implies executable stack
      /home/xxxx/OpenWrt/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-12.3.0_musl_eabi/lib/gcc/arm-openwrt-linux-muslgnueabi/12.3.0/../../../../arm-openwrt-linux-muslgnueabi/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
      /home/xxxx/OpenWrt/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-12.3.0_musl_eabi/lib/gcc/arm-openwrt-linux-muslgnueabi/12.3.0/../../../../arm-openwrt-linux-muslgnueabi/bin/ld: warning: helloworld_fel has a LOAD segment with RWX permissions
      /home/xxxx/OpenWrt/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-12.3.0_musl_eabi/lib/gcc/arm-openwrt-linux-muslgnueabi/12.3.0/../../../../arm-openwrt-linux-muslgnueabi/bin/ld: /home/xxxx/OpenWrt/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-12.3.0_musl_eabi/lib/gcc/arm-openwrt-linux-muslgnueabi/12.3.0/libgcc.a(_dvmd_lnx.o): in function `__aeabi_idiv0':
      /home/xxxx/OpenWrt/build_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-12.3.0_musl_eabi/gcc-12.3.0/libgcc/config/arm/lib1funcs.S:1499: undefined reference to `raise'
      collect2: error: ld returned 1 exit status
      make[2]: *** [app/hello_world/CMakeFiles/helloworld_fel.dir/build.make:116:app/hello_world/helloworld_fel] 错误 1
      make[1]: *** [CMakeFiles/Makefile2:308:app/hello_world/CMakeFiles/helloworld_fel.dir/all] 错误 2
      make: *** [Makefile:91:all] 错误 2
      
      1 条回复 最后回复 回复 引用 分享 0
      • A
        awwwwa LV 8 最后由 编辑

        • helloworld_fel 使用了 VFP 寄存器参数,但是某个库文件(libgcc.a(_udivmoddi4.o))却不支持。

        • 缺少 .note.GNU-stack 段,暗示可执行栈缺失。

        • 对于具有 RWX 权限的 LOAD 段,给出了警告。

        • 在链接时,出现了对 raise 函数的未定义引用。

        1 条回复 最后回复 回复 引用 分享 1
        • A
          awwwwa LV 8 最后由 awwwwa 编辑

          打入这个补丁试一下:de88083d-a6c8-403e-947c-81ccd05dc849-0001-fix-add-ENABLE_HARDFP-options.patch

          0001-feat-Support-e907-core-boot-up.patch

          可能是不同编译器导致的

          1 条回复 最后回复 回复 引用 分享 1
          • chainsx
            woshishabi LV 3 最后由 编辑

            感谢帮助,问题已解决

            1 条回复 最后回复 回复 引用 分享 0
            • 1 / 1
            • First post
              Last post

            Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

            行为准则 | 用户协议 | 隐私权政策