pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/48740 (lang/gcc44 to gcc46 linker fails because of whitespace)



From: venture37 <venture37%geeklan.co.uk@localhost>
Subject: Re: pkg/48740 (lang/gcc44 to gcc46 linker fails because of whitespace)
Date: Wed, 28 May 2014 21:31:13 +0100

> On 16/05/2014 00:10, pho%NetBSD.org@localhost wrote:
>> I fixed them. Sevan, could you please confirm they now build?
>
> On OS X 10.4.11 PPC I managed to build lang/gcc44 & lang/gcc45 without
> issue
>
> PKG_OPTIONS.gcc44=      gcc-c++ gcc-fortran gcc-objc -gcc-java
> PKG_OPTIONS.gcc45=      gcc-c++ gcc-fortran gcc-objc -gcc-java
>
> gcc46 fails
>
> PKG_OPTIONS.gcc46=      gcc-c++ -gcc-fortran -gcc-objc -gcc-java
>
(snip)
>
> /usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: Undefined symbols:
> ___stack_chk_fail
> ___stack_chk_guard
> collect2: ld returned 1 exit status
> Makefile:3979: recipe for target 'build/genhooks' failed

Hmm... These symbols are generated by gcc when -fstack-protector is in
effect. It is usually disabled by default but lang/gcc46 has a patch
to (eventually) enable it by default for some reason.

These ssp symbols usually reside in libc (/usr/lib/libSystem.B.dylib
in this case) but MacOS X < 10.5 doesn't provide them. GCC provides
its own implementation (libssp) for such platforms but it isn't used
in the bootstrap phase.

As I have no boxes with MacOS X 10.4 installed, I want you to try the
following:

  1. bmake clean; bmake patch

  2. Open work/gcc-4.6.4/gcc/common.opt with your favorite editor.

  3. Replace line 1793:

       Common Report Var(flag_stack_protect, 1) Init(-1)

     with:

       Common Report Var(flag_stack_protect, 1)

  4. Run bmake and see what happens.


Thanks,
_______________________________________________________
 - PHO -                         http://cielonegro.org/
OpenPGP public key: 1024D/1A86EF72
Fpr: 5F3E 5B5F 535C CE27 8254  4D1A 14E7 9CA7 1A86 EF72

Attachment: pgpfzE7QGWezU.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index