42 lines
964 B
Python
42 lines
964 B
Python
container_runtime = "podman"
|
|
container_image = "local/distro-builder:latest"
|
|
container_dockerfile = "Dockerfile"
|
|
|
|
arch = "x86_64"
|
|
libc = "glibc"
|
|
|
|
if libc == "glibc":
|
|
env = "gnu"
|
|
else:
|
|
env = libc
|
|
|
|
host_cflags = "-O2 -pipe"
|
|
host_cxxflags = host_cflags
|
|
host_ldflags = "-Wl,-O1 -Wl,--sort-common -Wl,--as-needed"
|
|
|
|
target_cflags = host_cflags
|
|
target_cxxflags = host_cxxflags
|
|
target_ldflags = host_ldflags + " -Wl,-z,now"
|
|
|
|
if arch == "x86_64":
|
|
flags = " -march=x86-64-v3 -mtune=generic -fstack-clash-protection -fstack-protector-strong -fcf-protection"
|
|
|
|
target_cflags += flags
|
|
target_cxxflags += flags
|
|
target_ldflags += " -Wl,-z,pack-relative-relocs"
|
|
|
|
options = dict(
|
|
target_arch = arch,
|
|
target_triple = f"{arch}-linux-{env}",
|
|
|
|
host_cflags = host_cflags,
|
|
host_cxxflags = host_cxxflags,
|
|
host_ldflags = host_ldflags,
|
|
|
|
cflags = target_cflags,
|
|
cxxflags = target_cxxflags,
|
|
ldflags = target_ldflags,
|
|
|
|
libc = libc,
|
|
)
|