Skip to content
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

Ignore .s files (assembly) in compilation database #530

Merged
merged 1 commit into from
Jan 13, 2022

Conversation

michael-schwarz
Copy link
Member

cpp does not generate .i files from them, but Goblint later goes looking for them, failing because it can't find them.
Needed for goblint/bench#7

@sim642
Copy link
Member

sim642 commented Jan 13, 2022

Do you have a complete command object from a compilation database for such assembly file?

I understand that nothing meaningful for us would come out of assembly code, but I'm just surprised that whatever binary (gcc or something else?) is used to compile them accepts all the preprocessing and output arguments but doesn't actually output anything. Would've expected it to just fail at that point.

@michael-schwarz
Copy link
Member Author

 {
  "directory": "/home/michael/Documents/goblint-cil/bench-ideas/openssl",
  "arguments": [
   "gcc",
   "-fPIC",
   "-pthread",
   "-m64",
   "-Wa,--noexecstack",
   "-Wall",
   "-O3",
   "-DOPENSSL_USE_NODELETE",
   "-DL_ENDIAN",
   "-DOPENSSL_PIC",
   "-DOPENSSLDIR=\"/usr/local/ssl\"",
   "-DENGINESDIR=\"/usr/local/lib64/engines-3\"",
   "-DMODULESDIR=\"/usr/local/lib64/ossl-modules\"",
   "-DOPENSSL_BUILDING_OPENSSL",
   "-DNDEBUG",
   "-c",
   "-o",
   "crypto/ec/libcrypto-shlib-ecp_nistz256-x86_64.o",
   "crypto/ec/ecp_nistz256-x86_64.s"
  ],
  "file": "crypto/ec/ecp_nistz256-x86_64.s"
 }

@sim642
Copy link
Member

sim642 commented Jan 13, 2022

Apparently GCC does produce preprocessing output for capitalized .S, which is supposed to be preprocessed. Although being assembly we wouldn't be able to parse it anyway.

Oddly for .s with -E everything is just ignored:

Input files that don’t require compilation are ignored.

(https://gcc.gnu.org/onlinedocs/gcc/Overall-Options.html#index-E)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants