Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revision 236900 appears to break compilation on Solaris #23856

Closed
llvmbot opened this issue May 11, 2015 · 4 comments
Closed

revision 236900 appears to break compilation on Solaris #23856

llvmbot opened this issue May 11, 2015 · 4 comments
Assignees
Labels
bugzilla Issues migrated from bugzilla

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented May 11, 2015

Bugzilla Link 23482
Resolution FIXED
Resolved on May 12, 2015 05:35
Version trunk
OS Solaris
Attachments patch to workaround naming conflict between sys/time.h and TargetParser.h
Reporter LLVM Bugzilla Contributor
CC @rnk

Extended Description

Changset 2369000 appears to introduce a new enumeration into TargetParser.h

  • // Arch extension modifiers for CPUs.
  • enum ArchExtKind {
  • INVALID_ARCHEXT = 0,
  • CRC,
  • CRYPTO,
  • FP,
  • HWDIV,
  • MP,
  • SEC,
  • VIRT,
  • LAST_ARCHEXT
  • };

sys/time.h on Solaris (and possibly other systems) defines "SEC" as "1" using a cpp macro. The result is that this fails to compile.

A temporary workaround seems to be to #undef SEC in Solaris.h, but a better answer might be to prefix the enumeration values so there were no conflicts.

@llvmbot
Copy link
Collaborator Author

llvmbot commented May 11, 2015

assigned to @rengolin

@rnk
Copy link
Collaborator

rnk commented May 11, 2015

Generally our solution is to undef the macro. The enum is already namespaced inside ARM::, so adding a prefix would be pretty redundant.

@rengolin
Copy link
Member

I'm ok with adding the prefix, if that's preferred. I just kept the same names for consistency with the previous code.

Thinking about macros, conflicts with things like CRC and CRYPTO might be more common than we think...

@rengolin
Copy link
Member

Adding prefixes to the enums in r237112 / r237113.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla
Projects
None yet
Development

No branches or pull requests

3 participants