Requiring gold linker for Linux targets?


(Saleem Abdulrasool) #1

Hi,

On ARM targets, gold is already required due to a certain bugs in the
handling of relocations for those targets.

For other targets, there was a bug exposed in the BFD linker (which is
believed to have been fixed in a newer release).

Recently, another change seems to have exposed yet another issue with
linking on x86 targets.

Given the frequency with which issues occurring with the BFD linker, is it
reasonable to say that building swift requires the gold linker? To the
previous three issues, I believe that two of them were worked around with
the approach of using gold. So, there is some precedent to that approach.
Furthermore, this idea has been brought up before.

Im hoping that this can spark a thread which can come up to some conclusion
to whether it is reasonable to expect that the linux builds would use gold
for the foreseeable future.

···

--
Saleem Abdulrasool
compnerd (at) compnerd (dot) org


(William Dillon) #2

I'm in favor. The current disparate use of linkers overly complicates the build scripts, and given that BFD seems to be a liability, I think it makes sense to transition. In the interest of full disclosure, I don't fully understand all the implications of this change, especially on x86.

- Will

···

On May 13, 2016, at 6:50 PM, Saleem Abdulrasool via swift-dev <swift-dev@swift.org> wrote:

Hi,

On ARM targets, gold is already required due to a certain bugs in the handling of relocations for those targets.

For other targets, there was a bug exposed in the BFD linker (which is believed to have been fixed in a newer release).

Recently, another change seems to have exposed yet another issue with linking on x86 targets.

Given the frequency with which issues occurring with the BFD linker, is it reasonable to say that building swift requires the gold linker? To the previous three issues, I believe that two of them were worked around with the approach of using gold. So, there is some precedent to that approach. Furthermore, this idea has been brought up before.

Im hoping that this can spark a thread which can come up to some conclusion to whether it is reasonable to expect that the linux builds would use gold for the foreseeable future.

--
Saleem Abdulrasool
compnerd (at) compnerd (dot) org
_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev


(Ryan Lovelett) #3

I'm in favor. The current disparate use of linkers overly complicates
the build scripts, and given that BFD seems to be a liability, I think it
makes sense to transition. In the interest of full disclosure, I don't
fully understand all the implications of this change, especially on x86.

- Will

>
> Hi,
>
> On ARM targets, gold is already required due to a certain bugs in the handling of relocations for those targets.
>
> For other targets, there was a bug exposed in the BFD linker (which is believed to have been fixed in a newer release).
>
> Recently, another change seems to have exposed yet another issue with linking on x86 targets.
>
> Given the frequency with which issues occurring with the BFD linker, is it reasonable to say that building swift requires the gold linker? To the previous three issues, I believe that two of them were worked around with the approach of using gold. So, there is some precedent to that approach. Furthermore, this idea has been brought up before.
>
> Im hoping that this can spark a thread which can come up to some conclusion to whether it is reasonable to expect that the linux builds would use gold for the foreseeable future.

Count me in favor of this as well.

···

On Sat, May 14, 2016, at 12:17 PM, William Dillon via swift-dev wrote:

> On May 13, 2016, at 6:50 PM, Saleem Abdulrasool via swift-dev <swift-dev@swift.org> wrote:

>
> --
> Saleem Abdulrasool
> compnerd (at) compnerd (dot) org
> _______________________________________________
> swift-dev mailing list
> swift-dev@swift.org
> https://lists.swift.org/mailman/listinfo/swift-dev

_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev


(Saleem Abdulrasool) #4

> I'm in favor. The current disparate use of linkers overly complicates
> the build scripts, and given that BFD seems to be a liability, I think it
> makes sense to transition. In the interest of full disclosure, I don't
> fully understand all the implications of this change, especially on x86.
>
> - Will
>
> >
> > Hi,
> >
> > On ARM targets, gold is already required due to a certain bugs in the
handling of relocations for those targets.
> >
> > For other targets, there was a bug exposed in the BFD linker (which is
believed to have been fixed in a newer release).
> >
> > Recently, another change seems to have exposed yet another issue with
linking on x86 targets.
> >
> > Given the frequency with which issues occurring with the BFD linker,
is it reasonable to say that building swift requires the gold linker? To
the previous three issues, I believe that two of them were worked around
with the approach of using gold. So, there is some precedent to that
approach. Furthermore, this idea has been brought up before.
> >
> > Im hoping that this can spark a thread which can come up to some
conclusion to whether it is reasonable to expect that the linux builds
would use gold for the foreseeable future.

Count me in favor of this as well.

Given the overall positive reaction, and no objections, Ive created
https://github.com/apple/swift/pull/2609 to switch Linux over to gold by
default on all the targets.

···

On Mon, May 16, 2016 at 8:03 AM, Ryan Lovelett via swift-dev < swift-dev@swift.org> wrote:

On Sat, May 14, 2016, at 12:17 PM, William Dillon via swift-dev wrote:
> > On May 13, 2016, at 6:50 PM, Saleem Abdulrasool via swift-dev < > swift-dev@swift.org> wrote:

> >
> > --
> > Saleem Abdulrasool
> > compnerd (at) compnerd (dot) org
> > _______________________________________________
> > swift-dev mailing list
> > swift-dev@swift.org
> > https://lists.swift.org/mailman/listinfo/swift-dev
>
> _______________________________________________
> swift-dev mailing list
> swift-dev@swift.org
> https://lists.swift.org/mailman/listinfo/swift-dev
_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

--
Saleem Abdulrasool
compnerd (at) compnerd (dot) org