mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-13 10:42:05 +00:00
6ba6cc42d4
gcc). llvm-svn: 57133
24 lines
435 B
Bash
Executable File
24 lines
435 B
Bash
Executable File
#!/bin/sh
|
|
set -ex
|
|
|
|
if [ -z "$CC" ]; then
|
|
CC="gcc"
|
|
fi
|
|
|
|
SRCLANG=c
|
|
MACROLIST=macro-list.txt
|
|
CCDEFS=cc-definitions.txt
|
|
CLANGDEFS=clang-definitions.txt
|
|
|
|
# Gather list of macros as "NAME" = NAME.
|
|
$CC -dM -E -x $SRCLANG /dev/null -o - | \
|
|
grep "#define" | sort -f | sed -e "s/#define \([^ ]*\) .*/\"\1\" = \1/" > $MACROLIST
|
|
|
|
$CC -E -x $SRCLANG $MACROLIST > $CCDEFS
|
|
|
|
clang -E -x $SRCLANG $MACROLIST > $CLANGDEFS
|
|
|
|
diff $CCDEFS $CLANGDEFS
|
|
|
|
|