mirror of
https://gitlab.com/kupfer/kupferbootstrap.git
synced 2025-02-23 13:45:45 -05:00
constants.py: add armv7h support
This commit is contained in:
parent
d03cb39358
commit
1837069981
1 changed files with 33 additions and 14 deletions
47
constants.py
47
constants.py
|
@ -91,11 +91,20 @@ Arch: TypeAlias = str
|
||||||
ARCHES = [
|
ARCHES = [
|
||||||
'x86_64',
|
'x86_64',
|
||||||
'aarch64',
|
'aarch64',
|
||||||
|
'armv7h',
|
||||||
]
|
]
|
||||||
|
|
||||||
DistroArch: TypeAlias = Arch
|
DistroArch: TypeAlias = Arch
|
||||||
TargetArch: TypeAlias = Arch
|
TargetArch: TypeAlias = Arch
|
||||||
|
|
||||||
|
ALARM_REPOS = {
|
||||||
|
'core': 'http://mirror.archlinuxarm.org/$arch/$repo',
|
||||||
|
'extra': 'http://mirror.archlinuxarm.org/$arch/$repo',
|
||||||
|
'community': 'http://mirror.archlinuxarm.org/$arch/$repo',
|
||||||
|
'alarm': 'http://mirror.archlinuxarm.org/$arch/$repo',
|
||||||
|
'aur': 'http://mirror.archlinuxarm.org/$arch/$repo',
|
||||||
|
}
|
||||||
|
|
||||||
BASE_DISTROS: dict[DistroArch, dict[str, dict[str, str]]] = {
|
BASE_DISTROS: dict[DistroArch, dict[str, dict[str, str]]] = {
|
||||||
'x86_64': {
|
'x86_64': {
|
||||||
'repos': {
|
'repos': {
|
||||||
|
@ -105,42 +114,52 @@ BASE_DISTROS: dict[DistroArch, dict[str, dict[str, str]]] = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'aarch64': {
|
'aarch64': {
|
||||||
'repos': {
|
'repos': ALARM_REPOS,
|
||||||
'core': 'http://mirror.archlinuxarm.org/$arch/$repo',
|
},
|
||||||
'extra': 'http://mirror.archlinuxarm.org/$arch/$repo',
|
'armv7h': {
|
||||||
'community': 'http://mirror.archlinuxarm.org/$arch/$repo',
|
'repos': ALARM_REPOS,
|
||||||
'alarm': 'http://mirror.archlinuxarm.org/$arch/$repo',
|
|
||||||
'aur': 'http://mirror.archlinuxarm.org/$arch/$repo',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
COMPILE_ARCHES: dict[Arch, str] = {
|
COMPILE_ARCHES: dict[Arch, str] = {
|
||||||
'x86_64': 'amd64',
|
'x86_64': 'amd64',
|
||||||
'aarch64': 'arm64',
|
'aarch64': 'arm64',
|
||||||
|
'armv7h': 'arm',
|
||||||
}
|
}
|
||||||
|
|
||||||
GCC_HOSTSPECS: dict[DistroArch, dict[TargetArch, str]] = {
|
GCC_HOSTSPECS: dict[DistroArch, dict[TargetArch, str]] = {
|
||||||
'x86_64': {
|
'x86_64': {
|
||||||
'x86_64': 'x86_64-pc-linux-gnu',
|
'x86_64': 'x86_64-pc-linux-gnu',
|
||||||
'aarch64': 'aarch64-linux-gnu',
|
'aarch64': 'aarch64-linux-gnu',
|
||||||
|
'armv7h': 'arm-unknown-linux-gnueabihf'
|
||||||
},
|
},
|
||||||
'aarch64': {
|
'aarch64': {
|
||||||
'aarch64': 'aarch64-unknown-linux-gnu',
|
'aarch64': 'aarch64-unknown-linux-gnu',
|
||||||
}
|
},
|
||||||
|
'armv7h': {
|
||||||
|
'armv7h': 'armv7l-unknown-linux-gnueabihf'
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
CFLAGS_GENERAL = ['-O2', '-pipe', '-fstack-protector-strong']
|
CFLAGS_GENERAL = ['-O2', '-pipe', '-fstack-protector-strong']
|
||||||
|
CFLAGS_ALARM = [
|
||||||
|
' -fno-plt',
|
||||||
|
'-fexceptions',
|
||||||
|
'-Wp,-D_FORTIFY_SOURCE=2',
|
||||||
|
'-Wformat',
|
||||||
|
'-Werror=format-security',
|
||||||
|
'-fstack-clash-protection',
|
||||||
|
]
|
||||||
CFLAGS_ARCHES: dict[Arch, list[str]] = {
|
CFLAGS_ARCHES: dict[Arch, list[str]] = {
|
||||||
'x86_64': ['-march=x86-64', '-mtune=generic'],
|
'x86_64': ['-march=x86-64', '-mtune=generic'],
|
||||||
'aarch64': [
|
'aarch64': [
|
||||||
'-march=armv8-a',
|
'-march=armv8-a',
|
||||||
'-fexceptions',
|
] + CFLAGS_ALARM,
|
||||||
'-Wp,-D_FORTIFY_SOURCE=2',
|
'armv7h': [
|
||||||
'-Wformat',
|
'-march=armv7-a',
|
||||||
'-Werror=format-security',
|
'-mfloat-abi=hard',
|
||||||
'-fstack-clash-protection',
|
'-mfpu=neon',
|
||||||
]
|
] + CFLAGS_ALARM,
|
||||||
}
|
}
|
||||||
|
|
||||||
QEMU_BINFMT_PKGS = ['qemu-user-static-bin', 'binfmt-qemu-static']
|
QEMU_BINFMT_PKGS = ['qemu-user-static-bin', 'binfmt-qemu-static']
|
||||||
|
|
Loading…
Add table
Reference in a new issue