mirror of
https://github.com/postgres/postgres.git
synced 2025-04-27 22:56:53 +03:00
tools/ccsym: update for modern versions of gcc
This dumps the predefined preprocessor macros
This commit is contained in:
parent
f32a1fa462
commit
f259e71dbe
@ -1,16 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# src/tools/ccsym
|
# display gcc predefined preprocessor macros
|
||||||
|
gcc -dM -E - < /dev/null
|
||||||
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
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user