This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR go/55201: Link libgo against libatomic
On Tue, Dec 18, 2012 at 9:11 AM, Matthias Klose <doko@ubuntu.com> wrote:
> Am 18.12.2012 15:28, schrieb Ian Lance Taylor:
>> On Mon, Dec 17, 2012 at 2:26 PM, Andreas Schwab <schwab@linux-m68k.org> wrote:
>>> Since libgo uses 8-byte atomic operations it needs to link against
>>> libatomic. Tested on m68k-linux and powerpc-linux.
>>>
>>> Andreas.
>>>
>>> PR go/55201
>>> * Makefile.def (all-target-libgo): Depend on all-target-libatomic.
>>> * Makefile.in: Regenerate.
>>>
>>> testsuite/:
>>> * lib/go.exp (go_link_flags): Add libatomic location to flags and
>>> ld_library_path.
>>
>> Thanks.
>>
>> Committed to mainline.
>
> this seems to break make install, at least for a multilib enabled build.
>
> /usr/bin/ld: cannot find -latomic
> collect2: error: ld returned 1 exit status
> libtool: install: error: relink `libgo.la' with the above command before
> installing it
> make[10]: *** [install-toolexeclibLTLIBRARIES] Error 1
> make[10]: Leaving directory
> `/home/packages/gcc/4.8/gcc-4.8-4.8-20121218/build/x86_64-linux-gnu/32/libgo'
This doesn't happen for me, and it's bizarre that libtool would turn a
link against ../libatomic/libatomic.la into a link against -latomic.
But in any case the fix is presumably going to be to add a convenience
library for libatomic, as is done for libffi. I'll prepare a patch
for that.
Ian