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

Link to libdl on non-BSD POSIX systems. #941

Closed
wants to merge 2 commits into from
Closed

Link to libdl on non-BSD POSIX systems. #941

wants to merge 2 commits into from

Conversation

alexrp
Copy link
Member

@alexrp alexrp commented May 11, 2012

Needed for: dlang/druntime#211

@complexmath
Copy link
Member

The alternative would be to put this linker command in dmd.conf for Linux and OSX.

@alexrp
Copy link
Member Author

alexrp commented May 11, 2012

It wouldn't work (I did try that). This has to be passed here or linking will fail (which is the reason those other libraries (libm, libpthread, librt, etc) are also added to the command line in the function I modified).

@@ -384,6 +384,12 @@ int runLINK()
// argv.push((void *)"-ldruntime");
argv.push((char *)"-lpthread");
argv.push((char *)"-lm");

#if !__FreeBSD__ && !__OpenBSD__
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make it a positive list
#if linux || __sun&&__SVR4.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@MartinNowak
Copy link
Member

This is indeed needed when libdl functions are used from druntime/phobos.
So I think we should merge it when the issue is fixed.

@alexrp
Copy link
Member Author

alexrp commented Jun 11, 2012

I'm closing this for now, since it won't be relevant until we have a proper shared runtime.

@alexrp alexrp closed this Jun 11, 2012
@MartinNowak
Copy link
Member

I think we should merge it now. It's a correct change even though the issue only arises with the unfinished Runtime.loadLibrary.

@alexrp
Copy link
Member Author

alexrp commented Aug 19, 2012

Somewhat delayed, but reopening this in case we do want to merge it.

@alexrp alexrp reopened this Aug 19, 2012
@alexrp
Copy link
Member Author

alexrp commented Sep 13, 2012

Poking this to make the auto tester run it on OS X machines.

@andralex
Copy link
Member

ping on this?

@alexrp
Copy link
Member Author

alexrp commented Sep 25, 2012

Up to @dawgfoto if we merge this now or later, I guess.

@llucax
Copy link
Contributor

llucax commented Oct 6, 2012

I think it would be best to fix this issue in a more general way (as being discussed in #497) instead of adding more hardcoded linker options in the compiler sources.

@alexrp alexrp closed this Jan 31, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants