cross compile with LLVM and sysroots#1129
Open
jjhelmus wants to merge 1 commit into
Open
Conversation
wojiushixiaobai
referenced
this pull request
in loong64/python-build-standalone
May 13, 2026
(cherry picked from commit 04e2962) Signed-off-by: 吴小白 <296015668@qq.com>
Contributor
# ldd ./python_lto/install/bin/python
linux-vdso.so.1 (0x00007f522190b000)
libm.so.6 => /lib/loongarch64-linux-gnu/libm.so.6 (0x00007f5216a80000)
libc.so.6 => /lib/loongarch64-linux-gnu/libc.so.6 (0x00007f52168b0000)
/lib64/ld-linux-loongarch-lp64d.so.1 (0x00007f52218c0000)
# ./python_lto/install/bin/python -V
Python 3.11.15
# file ./python_lto/install/bin/python3.11
./python_lto/install/bin/python3.11: ELF 64-bit LSB pie executable, LoongArch, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-loongarch-lp64d.so.1, for GNU/Linux 5.19.0, with debug_info, not stripped
# readelf -l python_lto/install/bin/python
Elf file type is DYN (Position-Independent Executable file)
Entry point 0x1f0f98
There are 11 program headers, starting at offset 64
Program Headers:
Type Offset VirtAddr PhysAddr
FileSiz MemSiz Flags Align
PHDR 0x0000000000000040 0x0000000000000040 0x0000000000000040
0x0000000000000268 0x0000000000000268 R 0x8
LOAD 0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000e66b50 0x0000000000e66b50 R E 0x10000
GNU_STACK 0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 RW 0x10
GNU_EH_FRAME 0x0000000000e664a4 0x0000000000e664a4 0x0000000000e664a4
0x0000000000000174 0x0000000000000174 R 0x4
LOAD 0x0000000000e6f650 0x0000000000e7f650 0x0000000000e7f650
0x0000000000219650 0x0000000000266270 RW 0x10000
GNU_RELRO 0x0000000000e6f650 0x0000000000e7f650 0x0000000000e7f650
0x00000000000d09b0 0x00000000000d09b0 R 0x1
DYNAMIC 0x00000000024b0000 0x00000000024b0000 0x00000000024b0000
0x00000000000001e0 0x00000000000001e0 RW 0x8
LOAD 0x00000000024b0000 0x00000000024b0000 0x00000000024b0000
0x0000000000009e68 0x0000000000009e68 RW 0x10000
INTERP 0x00000000024b9da8 0x00000000024b9da8 0x00000000024b9da8
0x0000000000000025 0x0000000000000025 R 0x1
[Requesting program interpreter: /lib64/ld-linux-loongarch-lp64d.so.1]
NOTE 0x00000000024b9dd0 0x00000000024b9dd0 0x00000000024b9dd0
0x0000000000000020 0x0000000000000020 R 0x4
NOTE 0x00000000024b9df0 0x00000000024b9df0 0x00000000024b9df0
0x0000000000000078 0x0000000000000078 R 0x4
Section to Segment mapping:
Segment Sections...
00
01 .gnu.hash .dynsym .gnu.version .gnu.version_r .rela.dyn .rela.plt .plt .text .rodata .eh_frame_hdr .eh_frame
02
03 .eh_frame_hdr
04 .init_array .fini_array .data.rel.ro .got .got.plt .data .PyRuntime .sdata .bss
05 .init_array .fini_array .data.rel.ro .got
06 .dynamic
07 .dynamic .dynstr .interp .note.ABI-tag .note.package
08 .interp
09 .note.ABI-tag
10 .note.package |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cross compiler with LLVM and a sysroot in all cases
Follow up to #1101 to expand to all architectures