aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/machchk.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/machchk.sh b/tools/machchk.sh
new file mode 100644
index 0000000..fc8952e
--- /dev/null
+++ b/tools/machchk.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+getdefs() {
+ gcc -dM -E - </dev/null | grep -E \
+ "(__x86_64__|__amd64__|__i386__|__arm__|\
+ __aarch64__|__linux__|__WIN32__|__APPLE__)"
+}
+
+echo "Dumping GCC machdep defines..."
+echo "****************************************************"
+getdefs
+echo "****************************************************"