profile changes
This commit is contained in:
+16
-33
@@ -1,34 +1,17 @@
|
||||
def profile():
|
||||
def profile(base):
|
||||
arch = "x86_64"
|
||||
libc = "glibc"
|
||||
triple = f"{arch}-orchid-linux-gnu"
|
||||
|
||||
host_cflags = "-O2 -pipe"
|
||||
host_cxxflags = host_cflags
|
||||
host_ldflags = "-Wl,-O1 -Wl,--sort-common -Wl,--as-needed"
|
||||
|
||||
target_flags = " -march=x86-64-v3 -mtune=generic -fstack-clash-protection -fstack-protector-strong -fcf-protection"
|
||||
cflags = host_cflags + target_flags
|
||||
cxxflags = cflags
|
||||
ldflags = host_ldflags + " -Wl,-z,now -Wl,-z,pack-relative-relocs"
|
||||
|
||||
return {
|
||||
"arch": arch,
|
||||
"libc": libc,
|
||||
"triple": triple,
|
||||
"container_image": "localhost/orchid-builder:latest",
|
||||
"host_cflags": host_cflags,
|
||||
"host_cxxflags": host_cxxflags,
|
||||
"host_ldflags": host_ldflags,
|
||||
"cflags": cflags,
|
||||
"cxxflags": cxxflags,
|
||||
"ldflags": ldflags,
|
||||
"prefix": "/usr",
|
||||
"bindir": "/usr/bin",
|
||||
"sbindir": "/usr/bin",
|
||||
"libdir": "/usr/lib",
|
||||
"libexecdir": "/usr/libexec",
|
||||
"includedir": "/usr/include",
|
||||
"sysconfdir": "/etc",
|
||||
"localstatedir": "/var",
|
||||
}
|
||||
target_flags = (
|
||||
"-march=x86-64-v3 -mtune=generic -fstack-clash-protection "
|
||||
"-fstack-protector-strong -fcf-protection"
|
||||
)
|
||||
return Profile(
|
||||
arch=arch,
|
||||
triple=f"{arch}-orchid-linux-gnu",
|
||||
options={
|
||||
"libc": "glibc",
|
||||
# Target flags build on the base host flags.
|
||||
"cflags": f"{base['host_cflags']} {target_flags}",
|
||||
"cxxflags": f"{base['host_cflags']} {target_flags}",
|
||||
"ldflags": f"{base['host_ldflags']} -Wl,-z,now -Wl,-z,pack-relative-relocs",
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user