aboutsummaryrefslogtreecommitdiff
path: root/tools/machchk.sh
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-04-10 00:58:00 -0400
committerIan Moffett <ian@osmora.org>2025-04-10 01:24:20 -0400
commit0feda1d4af308f7bcba435e313fcc06ef2c59132 (patch)
treeaaad0af53d33f50ecb91a630b759ef1c55c5b448 /tools/machchk.sh
parentd869a6b0c3315de350799f4f1fdd4bc3538b0855 (diff)
tools/tests: Add tools and tests
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'tools/machchk.sh')
-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 "****************************************************"