在x86-64的Linux上編譯64 bits的newlib要注意一點

來源:互聯網
上載者:User

在x86-64的Linux上編譯64 bits的newlib要注意一點, 要在configure的時候加上“–disable-multilib“, 否則會有以下error, 因為newlib會連32 bits的newlib一同編譯, 會編所有檔案時加上-m32

x86_64-peter-elf-cc -B/root/workspace2/newlib-1.19.0build/x86_64-peter-elf/32/newlib/ -isystem /root/workspace2/newlib-1.19.0build/x86_64-peter-elf/32/newlib/targ-include
-isystem /root/workspace2/newlib-1.19.0/newlib/libc/include -B/root/workspace2/newlib-1.19.0build/x86_64-peter-elf/32/libgloss/x86_64 -L/root/workspace2/newlib-1.19.0build/x86_64-peter-elf/32/libgloss/libnosys
-L/root/workspace2/newlib-1.19.0/libgloss/x86_64  -m32 -DPACKAGE_NAME=\”newlib\” -DPACKAGE_TARNAME=\”newlib\” -DPACKAGE_VERSION=\”1.19.0\” -DPACKAGE_STRING=\”newlib\ 1.19.0\” -DPACKAGE_BUGREPORT=\”\” -DPACKAGE_URL=\”\” -I.
-I../../../../../../../newlib-1.19.0/newlib/libc/machine/x86_64 -DMISSING_SYSCALL_NAMES -fno-builtin     -DMISSING_SYSCALL_NAMES -fno-builtin   -O2 -g  -m32 -c -o lib_a-setjmp.o `test
-f ‘setjmp.S’ || echo ‘../../../../../../../newlib-1.19.0/newlib/libc/machine/x86_64/’`setjmp.S

../../../../../../../newlib-1.19.0/newlib/libc/machine/x86_64/setjmp.S: Assembler messages:

../../../../../../../newlib-1.19.0/newlib/libc/machine/x86_64/setjmp.S:25: Error: bad register name `%rbx’

../../../../../../../newlib-1.19.0/newlib/libc/machine/x86_64/setjmp.S:26: Error: bad register name `%rbp’

../../../../../../../newlib-1.19.0/newlib/libc/machine/x86_64/setjmp.S:27: Error: bad register name `%r12′

../../../../../../../newlib-1.19.0/newlib/libc/machine/x86_64/setjmp.S:28: Error: bad register name `%r13′

../../../../../../../newlib-1.19.0/newlib/libc/machine/x86_64/setjmp.S:29: Error: bad register name `%r14′

../../../../../../../newlib-1.19.0/newlib/libc/machine/x86_64/setjmp.S:30: Error: bad register name `%r15′

../../../../../../../newlib-1.19.0/newlib/libc/machine/x86_64/setjmp.S:31: Error: bad register name `%rsp)’

../../../../../../../newlib-1.19.0/newlib/libc/machine/x86_64/setjmp.S:32: Error: bad register name `%rax’

../../../../../../../newlib-1.19.0/newlib/libc/machine/x86_64/setjmp.S:33: Error: bad register name `%rsp)’

../../../../../../../newlib-1.19.0/newlib/libc/machine/x86_64/setjmp.S:34: Error: bad register name `%rax’ 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.