aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfigure.pl1
-rwxr-xr-xconfigure.py6
2 files changed, 6 insertions, 1 deletions
diff --git a/configure.pl b/configure.pl
index 275f40d09..16a0e15c6 100755
--- a/configure.pl
+++ b/configure.pl
@@ -1275,6 +1275,7 @@ sub load_modules {
if($arch ne $submodel) {
$submodel = uc $submodel;
$submodel =~ tr/-/_/;
+ $submodel =~ tr/.//;
push @macro_list, "#define BOTAN_TARGET_CPU_IS_$submodel";
}
diff --git a/configure.py b/configure.py
index 199b2e0df..548771b5f 100755
--- a/configure.py
+++ b/configure.py
@@ -403,8 +403,12 @@ class ArchInfo(object):
def defines(self, target_submodel, with_endian):
macros = ['TARGET_ARCH_IS_%s' % (self.basename.upper())]
+ def form_cpu_macro(cpu_name):
+ return cpu_name.upper().replace('.', '').replace('-', '_')
+
if self.basename != target_submodel:
- macros.append('TARGET_CPU_IS_%s' % (target_submodel.upper()))
+ macros.append('TARGET_CPU_IS_%s' % (
+ form_cpu_macro(target_submodel)))
if with_endian:
macros.append('TARGET_CPU_IS_%s_ENDIAN' % (with_endian.upper()))