mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-08 01:28:14 -07:00
This patch allows users to switch the CPU flags. It saves distutils-probing time and avoids build errors when distutils figures out a wrong CPU-feature set. I do not have a good understanding of the CPU flags in the new dev-python/meson-python build system. Therefore 1.25.0 is not touched. Signed-off-by: Benda Xu <heroxbd@gentoo.org>
15 lines
405 B
Awk
15 lines
405 B
Awk
#!/usr/bin/awk -f
|
|
|
|
{
|
|
GENTOO_ENABLE=1;
|
|
if (match($0, /flags="([^"=]*)"/, cflags)) {
|
|
split(cflags[1], fields);
|
|
for (i in fields) {
|
|
if (match(fields[i], /-m([[:graph:]]*)/, inst)) {
|
|
if (!index(enabled_flags, inst[1])) {
|
|
GENTOO_ENABLE=0;
|
|
}}}}
|
|
if (!GENTOO_ENABLE) { sub(cflags[1], "-mGENTOO_DISABLE"); }
|
|
print;
|
|
}
|