-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0fd6fa5
commit ca39e77
Showing
2 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
readme/x86_64-w64-mingw32-host-i686-linux-gnu-target-gcc.md
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# GCC14工具链 | ||
|
||
## 平台 | ||
|
||
| build | host | target | | ||
| :--------------- | :----------------- | :------------- | | ||
| x86_64-linux-gnu | x86_64-w64-mingw32 | i686-linux-gnu | | ||
|
||
## 版本 | ||
|
||
- GCC:14.0.1 | ||
- Binutils:2.42.50 | ||
|
||
## 组件 | ||
|
||
- gcc | ||
- g++ | ||
- binutils |
43 changes: 43 additions & 0 deletions
43
script/x86_64_w64_mingw32_host_i686_linux_gnu_target_gcc.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/usr/bin/python3 | ||
# -*- coding: utf-8 -*- | ||
import gcc_environment as gcc | ||
|
||
env = gcc.environment("14", host="x86_64-w64-mingw32", target="i686-linux-gnu") | ||
|
||
|
||
def build() -> None: | ||
# 更新源代码 | ||
# env.update() | ||
|
||
basic_option = f"--disable-werror --prefix={env.prefix} --host={env.host} --target={env.target}" | ||
gcc_option = "--disable-multilib --enable-languages=c,c++" | ||
|
||
# 编译安装完整gcc | ||
env.enter_build_dir("gcc") | ||
env.configure(basic_option, gcc_option) | ||
env.make() | ||
env.install("install-strip") | ||
|
||
# 编译安装binutils | ||
env.enter_build_dir("binutils") | ||
env.configure(basic_option, "--disable-gdb") | ||
env.make() | ||
env.install() | ||
|
||
# 安装Linux头文件 | ||
env.enter_build_dir("linux") | ||
env.make(f"ARCH=x86 INSTALL_HDR_PATH={env.lib_prefix} headers_install") | ||
|
||
# 安装glibc | ||
env.enter_build_dir("glibc") | ||
env.configure(f"--disable-werror --host={env.target} --prefix={env.lib_prefix} --build={env.build}") | ||
env.make() | ||
env.install("install") | ||
env.adjust_glibc() | ||
|
||
# 打包工具链 | ||
env.package(False) | ||
|
||
|
||
if __name__ == "__main__": | ||
build() |