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)
Feb 13 2024, 12:34 PM
Unknown Object (File)
Dec 22 2023, 11:57 PM
Unknown Object (File)
Sep 3 2023, 3:41 AM
Unknown Object (File)
Sep 3 2023, 3:38 AM
Unknown Object (File)
Sep 3 2023, 3:38 AM
Unknown Object (File)
Aug 28 2023, 7:16 AM
Unknown Object (File)
Jul 20 2023, 10:06 PM
Unknown Object (File)
Jun 25 2023, 10:36 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.