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)
Sat, Jan 18, 1:42 AM
Unknown Object (File)
Fri, Jan 10, 12:19 PM
Unknown Object (File)
Nov 22 2024, 10:28 PM
Unknown Object (File)
Oct 1 2024, 8:12 PM
Unknown Object (File)
Sep 18 2024, 7:06 PM
Unknown Object (File)
Sep 16 2024, 9:18 AM
Unknown Object (File)
Sep 15 2024, 8:54 PM
Unknown Object (File)
Sep 12 2024, 1:04 AM
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.