Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
October 27, 2015 OS X linker warnings | ||||
---|---|---|---|---|
| ||||
On OS X (ldc built from source) I am getting a lot of warnings like this: ld: warning: object file (/usr/local/Cellar/ldc/0.16.0/lib/libphobos2-ldc.a(functional.o)) was built for newer OSX version (15.0) than being linked (10.11) one for every object file. Is there some way of fixing this? |
October 27, 2015 Re: OS X linker warnings | ||||
---|---|---|---|---|
| ||||
Posted in reply to John Colvin | On 27 Oct 2015, at 11:14, John Colvin via digitalmars-d-ldc wrote:
> one for every object file. Is there some way of fixing this?
This only started appearing with Xcode 7. Note that 15.0 is the Darwin version, whereas 10.11 is the "public" OS X release number. Not sure what is going on there.
If you want to give it a try, I'd start comparing the object files with what Clang produces (e.g. using macho-dump).
— David
|
October 27, 2015 Re: OS X linker warnings | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Nadlinger | On Tuesday, 27 October 2015 at 09:19:08 UTC, David Nadlinger wrote:
> On 27 Oct 2015, at 11:14, John Colvin via digitalmars-d-ldc wrote:
>> one for every object file. Is there some way of fixing this?
>
> This only started appearing with Xcode 7. Note that 15.0 is the Darwin version, whereas 10.11 is the "public" OS X release number. Not sure what is going on there.
>
> If you want to give it a try, I'd start comparing the object files with what Clang produces (e.g. using macho-dump).
>
> — David
Xcode 7 ld64 does additional checks to make sure all objects meet min os version. The cause may be that ldc produces a triple of x86_64-apple-darwin whereas clang produces the triple x86_64-apple-macosx. Usually the latest version is appended too. Probably ldc should set OS to macosx like clang.
|
November 11, 2015 Re: OS X linker warnings | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dan Olson | Dan Olson <gorox@concast.net> writes: > On Tuesday, 27 October 2015 at 09:19:08 UTC, David Nadlinger wrote: >> On 27 Oct 2015, at 11:14, John Colvin via digitalmars-d-ldc wrote: >>> one for every object file. Is there some way of fixing this? >> >> This only started appearing with Xcode 7. Note that 15.0 is the Darwin version, whereas 10.11 is the "public" OS X release number. Not sure what is going on there. >> >> If you want to give it a try, I'd start comparing the object files with what Clang produces (e.g. using macho-dump). >> >> — David > > Xcode 7 ld64 does additional checks to make sure all objects meet min > os version. The cause may be that ldc produces a triple of > x86_64-apple-darwin whereas clang produces the triple > x86_64-apple-macosx. Usually the latest version is appended > too. Probably ldc should set OS to macosx like clang. I confirmed that changing triple OS from Triple::Darwin (the default) to Triple::MacOSX gets rid of all these ld warnings. I think we need a PR. Maybe dup the logic clang uses to pick the triple on OS X? -- Dan |
November 12, 2015 Re: OS X linker warnings | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dan Olson | Dan Olson <gorox@comcast.net> writes: > Dan Olson <gorox@concast.net> writes: > >> On Tuesday, 27 October 2015 at 09:19:08 UTC, David Nadlinger wrote: >>> On 27 Oct 2015, at 11:14, John Colvin via digitalmars-d-ldc wrote: >>>> one for every object file. Is there some way of fixing this? >>> >>> This only started appearing with Xcode 7. Note that 15.0 is the Darwin version, whereas 10.11 is the "public" OS X release number. Not sure what is going on there. >>> >>> If you want to give it a try, I'd start comparing the object files with what Clang produces (e.g. using macho-dump). >>> >>> — David >> >> Xcode 7 ld64 does additional checks to make sure all objects meet min >> os version. The cause may be that ldc produces a triple of >> x86_64-apple-darwin whereas clang produces the triple >> x86_64-apple-macosx. Usually the latest version is appended >> too. Probably ldc should set OS to macosx like clang. > > I confirmed that changing triple OS from Triple::Darwin (the default) to Triple::MacOSX gets rid of all these ld warnings. > > I think we need a PR. Maybe dup the logic clang uses to pick the triple on OS X? Just a simple change to macosx for now. https://github.com/ldc-developers/ldc/pull/1209 |
Copyright © 1999-2021 by the D Language Foundation