]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
yasm-wrapper: strip -E (stops ccache trashing source files)
authorTim Serong <tserong@suse.com>
Wed, 19 Apr 2017 09:05:32 +0000 (19:05 +1000)
committerTim Serong <tserong@suse.com>
Wed, 19 Apr 2017 09:05:32 +0000 (19:05 +1000)
commit4fe7a87076e1d92fb1444137fecd5b336274e396
treece74b31750d53c8ffca51074142e9d005ac3a596
parent9d5fa6129db20572854f692a6c4d129ce42d4dd6
yasm-wrapper: strip -E (stops ccache trashing source files)

When building with ccache (`./do_cmake.sh -DWITH_CCACHE=ON`), it seems
ccache invokes `yast-wrapper` more than once per source file, the first
time with '-E' immediately before the source file in the argument list.
'-E' is an option for gcc which tells it to stop after the preprocessing
stage.  With yasm however, -E means "redirect error messages to file",
which makes yasm thinks there's no input files, and writes "yasm: No input
files specified" *over* the source file.  Then, the second run of
`yast-wrapper` (attempting to actually compile) fails with:

~/src/common/crc32c_intel_fast_asm.S:1: error: instruction expected after label

Curiously, this doesn't seem to affect all asm files; for me it
trashes crc32c_intel_fast_asm.S, but various other asm files build fine
without being clobbered.  I'm uncertain whether this is an issue
peculiar to openSUSE Tumbleweed, to ccache 3.3.3, or something else,
but in any case, having `yast-wrapper` strip '-E' fixes it.

Signed-off-by: Tim Serong <tserong@suse.com>
src/yasm-wrapper