apenwarr-redo/redoconf/_compile.od
Avery Pennarun 1574b11598 Precompiled headers: supply "-x c-header" or "-x c++-header" if available.
Some older versions of gcc give "all.hpp: linker input file unused
because linking not done" otherwise, because they don't realize files
named *.hpp are headers.

Reported-by: Wayne Scott <wsc9tt@gmail.com>
2019-02-25 13:09:11 +00:00

15 lines
353 B
Text

# See compile.od for more explanation.
cat >$3 <<-EOF
#!/bin/sh -e
# Run the C/C++ compiler.
# Assumes config variables (CFLAGS, etc) are already set.
t="\$1" d="\$2" i="\$3"
IFS="$NL"
set -f
\$CC -o "\$t" \\
-MMD -MF "\$d" \\
\$CPPFLAGS \$CFLAGS \$CXXFLAGS \$FLAGS_PCH \$xCFLAGS \$OPTFLAGS \\
-c "\$i"
EOF
chmod a+x "$3"
redo-stamp <$3