On Wed, 7 May 2014, Janne Grunau wrote:

On 2014-05-07 16:29:54 +0300, Martin Storsjö wrote:
On Wed, 7 May 2014, Janne Grunau wrote:

On 2014-05-07 14:00:11 +0300, Martin Storsjö wrote:
the normal compiler. If specified manually (with --as="gaspp armasm"
or so), configure tries to detect the dependency generation
mechanism for this (and often ends up with something that doesn't
produce proper dependencies).

Does it need more passthrough options (-v|--version|-dumpversion) to detect
assembler type correctly? That change made it work with gcc and clang.

Right, yes, this seems to help there.

For the armasm case, I end up with a '-.d' generated while I run
configure, but other than that it manages to detect a working way to
create the deps which work while building. I'll look into what part
of it creates the -.d file during configure.

Are you sure -.d is only used during configure?

Sorry no, I was mistaken, it does get generated all the time when building as well.

Sounds a lot like 9e057f53aa8549e94b7f52a67f69ce94d607da0a for clang. The dependency information is generated during the preprocess phase and -MMD without -MF derives the dependency file name from the output name which is '-'.

In this case it's something completely different actually; configure chooses a separate dependency generation step when building, and that step works fine. When building an object file, make does the following (unrelated parameters stripped for brevity):

gas-preprocessor-git.pl -as-type armasm -- armasm -MM libavcodec/arm/int_neon.S | sed -e 
"/^#.*/d" -e "s,^[[:space:]]*int_neon\\.o,libavcodec/arm/int_neon.o," > 
libavcodec/arm/int_neon.d
gas-preprocessor-git.pl -as-type armasm -- armasm -MD -march=armv7-a -c -o 
libavcodec/arm/int_neon.o libavcodec/arm/int_neon.S

The key here is the -MD option when compiling; it's actually the MSVC flag for choosing a dynamically linked crt (that I've set in --extra-cflags) which gets passed on here. This gets included in the preprocessing step in gas-preprocessor, where cpp writes the bogus -.d file.

What's the least ugly way of handling this? Stripping out /^-M(D|T)d?$/ from the preprocessor commands when using armasm mode?

// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to