--- SConstruct.orig 2021-03-23 15:33:12 UTC +++ SConstruct @@ -1261,9 +1261,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.") @@ -2419,7 +2419,7 @@ 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'], ) @@ -2433,7 +2433,7 @@ if env.TargetOSIs('posix'): "-Wno-unknown-pragmas", "-Winvalid-pch"] ) # env.Append( " -Wconversion" ) TODO: this doesn't really work yet - if env.TargetOSIs('linux', 'darwin', 'solaris'): + if env.TargetOSIs('linux', 'darwin', 'solaris', 'freebsd'): if not has_option("disable-warnings-as-errors"): env.Append( CCFLAGS=["-Werror"] ) @@ -2528,8 +2528,12 @@ if not env.TargetOSIs('windows') and (env.ToolchainIs( # 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" },