--- SConstruct.orig 2022-05-17 13:56:34 UTC +++ SConstruct @@ -1301,9 +1301,9 @@ if has_option('variables-help'): print(env_vars.GenerateHelpText(env)) Exit(0) -unknown_vars = env_vars.UnknownVariables() -if unknown_vars: - env.FatalError("Unknown variables specified: {0}", ", ".join(list(unknown_vars.keys()))) +#unknown_vars = env_vars.UnknownVariables() +#if unknown_vars: +# env.FatalError("Unknown variables specified: {0}", ", ".join(list(unknown_vars.keys()))) if get_option('install-action') != 'default' and get_option('ninja') != "disabled": env.FatalError("Cannot use non-default install actions when generating Ninja.") @@ -2370,13 +2370,13 @@ if env.TargetOSIs('posix'): # If runtime hardening is requested, then build anything # destined for an executable with the necessary flags for PIE. env.AppendUnique( - PROGCCFLAGS=['-fPIE'], + PROGCCFLAGS=['-fpic'], PROGLINKFLAGS=['-pie'], ) # -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used. env.Append( CCFLAGS=["-fasynchronous-unwind-tables", - "-ggdb" if not env.TargetOSIs('emscripten') else "-g", + # "-ggdb" if not env.TargetOSIs('emscripten') else "-g", "-Wall", "-Wsign-compare", "-Wno-unknown-pragmas", @@ -2541,8 +2541,12 @@ if not env.TargetOSIs('windows', 'macOS') and (env.Too # setting it for both C and C++ by setting both of CFLAGS and # CXXFLAGS. + arm_march_flag = "armv8-a" + if get_option('use-hardware-crc32') == "on": + arm_march_flag += "+crc" + default_targeting_flags_for_architecture = { - "aarch64" : { "-march=" : "armv8.2-a", "-mtune=" : "generic" }, + "aarch64" : { "-march=" : arm_march_flag, "-mtune=" : "generic" }, "i386" : { "-march=" : "nocona", "-mtune=" : "generic" }, "ppc64le" : { "-mcpu=" : "power8", "-mtune=" : "power8", "-mcmodel=" : "medium" }, "s390x" : { "-march=" : "z196", "-mtune=" : "zEC12" }, @@ -2554,7 +2558,7 @@ if not env.TargetOSIs('windows', 'macOS') and (env.Too if "sandybridge" in selected_experimental_optimizations: default_targeting_flags_for_architecture["x86_64"] = { "-march=" : "sandybridge", - "-mtune=" : "generic", + # "-mtune=" : "generic", "-mprefer-vector-width=" : "128", }