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
Unknown Object (File)
Fri, May 15, 11:48 PM
Unknown Object (File)
Fri, May 15, 11:47 PM
Unknown Object (File)
Mon, Apr 27, 12:08 PM
Unknown Object (File)
Apr 19 2026, 4:18 PM
Unknown Object (File)
Apr 14 2026, 7:47 AM
Unknown Object (File)
Apr 12 2026, 12:39 PM
Unknown Object (File)
Apr 11 2026, 10:53 PM
Unknown Object (File)
Apr 9 2026, 9:38 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.