Commit f259e71d authored by Bruce Momjian's avatar Bruce Momjian

tools/ccsym: update for modern versions of gcc

This dumps the predefined preprocessor macros
parent f32a1fa4
#!/bin/sh
# src/tools/ccsym
trap "rm -f /tmp/$$.*" 0 1 2 3 15
cd /tmp
cat >$$.c <<EOF
extern int foo;
EOF
for i in `cc -v -c $$.c 2>&1`
do
case "$i" in
-D*) echo "$i" | sed 's/^-D//';;
-A*) echo "$i" | sed 's/^-A\(.*\)(\(.*\))/\1=\2/';;
esac
done
# display gcc predefined preprocessor macros
gcc -dM -E - < /dev/null
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment