New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yasm-wrapper: strip -E (stops ccache trashing source files) #14633

Merged
merged 1 commit into from Apr 21, 2017

Conversation

Projects
None yet
3 participants
@tserong
Contributor

tserong commented Apr 19, 2017

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

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>

@liewegas liewegas merged commit a60e03c into ceph:master Apr 21, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details

@tserong tserong deleted the SUSE:wip-yasm-wrapper-strip-E-flag branch Apr 21, 2017

bassam added a commit to bassam/ceph that referenced this pull request May 17, 2017

cmake: use yasm-wrapper everywhere
Related to ceph#14633 use the yasm-wrapper to avoid compilation
issues when using ccache.

Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>

bassam added a commit to bassam/ceph that referenced this pull request May 18, 2017

cmake: workaound ccache issue with .S assembly files
when building with -DWITH_CCACHE=ON recent versions of ccache
(for example 3.3.3) seem to mangle object files from the cache
for source files that have a .S extension. This seems similar
but unrelated to PR ceph#14633. The workaround here is to rename .S
files to .s (lower case).

Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>

bassam added a commit to bassam/ceph that referenced this pull request May 18, 2017

cmake: workaound ccache issue with .S assembly files
when building with -DWITH_CCACHE=ON recent versions of ccache
(for example 3.3.3) seem to mangle object files from the cache
for source files that have a .S extension. This seems similar
but unrelated to PR ceph#14633. The workaround here is to rename .S
files to .s (lower case).

Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>

bassam added a commit to bassam/ceph that referenced this pull request May 18, 2017

cmake: workaound ccache issue with .S assembly files
when building with -DWITH_CCACHE=ON recent versions of ccache
(for example 3.3.3) seem to mangle object files from the cache
for source files that have a .S extension. This seems similar
but unrelated to PR ceph#14633. The workaround here is to rename .S
files to .s (lower case).

Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>

bassam added a commit to bassam/ceph that referenced this pull request May 18, 2017

cmake: workaound ccache issue with .S assembly files
when building with -DWITH_CCACHE=ON recent versions of ccache
(for example 3.3.3) seem to mangle object files from the cache
for source files that have a .S extension. This seems similar
but unrelated to PR ceph#14633. The workaround here is to rename .S
files to .s (lower case).

Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment