Page MenuHomeFreeBSD

skein_block_asm.s: use #ifdef not .ifdef, for Clang IAS
ClosedPublic

Authored by emaste on Jun 5 2020, 5:44 PM.
Tags
None
Referenced Files
F167916617: D25154.diff
Tue, Aug 25, 10:19 AM
F167882448: D25154.id.diff
Tue, Aug 25, 5:50 AM
Unknown Object (File)
Fri, Aug 21, 4:17 PM
Unknown Object (File)
Fri, Aug 21, 4:00 PM
Unknown Object (File)
Thu, Aug 20, 8:53 PM
Unknown Object (File)
Wed, Aug 19, 4:53 PM
Unknown Object (File)
Sun, Aug 9, 9:55 PM
Unknown Object (File)
Sun, Aug 9, 3:08 PM
Subscribers

Details

Summary

Clang IAS does not support the --defsym argument, and
.ifndef SKEIN_USE_ASM
gets turned into
.ifndef 1792
by the preprocessor, which results in an error

error: expected identifier after '.ifdef'
    .ifndef 1792
            ^

GNU as works with both #ifdef and .ifdef.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

emaste requested review of this revision.Jun 5 2020, 5:44 PM
emaste created this revision.
This revision is now accepted and ready to land.Jun 5 2020, 5:56 PM

The other option would have been to change the build system to pass -Wa,-defsym, SKEIN_USE_ASM=XXX (that's what I did for my godbolt testing.
But either solution seems fine.

The other option would have been to change the build system to pass -Wa,-defsym, SKEIN_USE_ASM=XXX (that's what I did for my godbolt testing.
But either solution seems fine.

Oh hmm, I tried that and had an error, but now I see I tried --defsym with two dashes.

The other option would have been to change the build system to pass -Wa,-defsym, SKEIN_USE_ASM=XXX (that's what I did for my godbolt testing.
But either solution seems fine.

Oh hmm, I tried that and had an error, but now I see I tried --defsym with two dashes.

I haven't checked if there's an open LLVM bug, but clang should probably accept the -- version for compatibility.