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

llvm-gcc4 compiled code lacks static ctors & dtors #1345

Closed
asl opened this issue Oct 29, 2006 · 6 comments
Closed

llvm-gcc4 compiled code lacks static ctors & dtors #1345

asl opened this issue Oct 29, 2006 · 6 comments
Labels
bugzilla Issues migrated from bugzilla llvm:codegen miscompilation

Comments

@asl
Copy link
Collaborator

asl commented Oct 29, 2006

Bugzilla Link 973
Resolution FIXED
Resolved on Feb 22, 2010 12:53
Version trunk
OS Linux

Extended Description

llvm-gcc4 code lacks static ctors & dtors at least on Linux (mingw has its own
technique to handle this and everything is ok there). This breaks many apps,
e.q. Qt.

The problem will solved (I hope), when crtstuff.c will be properly compiled with
llvm-gcc4.

@asl
Copy link
Collaborator Author

asl commented Oct 29, 2006

Well, It seems, that LLVM is mature enough to compile crtstuff.c properly with
just few minor glitches. Please find attached 2 patches: one for LLVM itself,
one for llvm-gcc4 which enables static ctors & dtors at least on linux platform.

Test .cpp file is also attached.

@asl
Copy link
Collaborator Author

asl commented Oct 29, 2006

Patch for llvm-gcc4

@asl
Copy link
Collaborator Author

asl commented Oct 29, 2006

Patch for LLVM

@asl
Copy link
Collaborator Author

asl commented Oct 29, 2006

Testcase

@lattner
Copy link
Collaborator

lattner commented Oct 29, 2006

"Patch for llvm-gcc4" applies, thanks Anton!

@llvmbot
Copy link
Collaborator

llvmbot commented Oct 31, 2006

"Patch for LLVM" applied. Thanks!

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 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 llvm:codegen miscompilation
Projects
None yet
Development

No branches or pull requests

3 participants