[oi-dev] Build of gcc-7.3.0 stops with linker errors

Norm Jacobs naj at snapcon.com
Sun May 20 02:10:26 UTC 2018


It looks like 
developer/gcc-7/patches/0008-sol2-enable-full-__cxa_atexit-support.patch 
may need work for SPARC, particularly in libgcc/config.host. Without 
looking too far into it, I would guess that changing the diffs for 
libgcc/config.host in the patch to

    --- gcc-7.3.0/libgcc/config.host.~1~    Mon Jan  8 05:39:11 2018
    +++ gcc-7.3.0/libgcc/config.host        Sat May 19 12:48:01 2018
    @@ -270,7 +270,7 @@
      *-*-solaris2*)
        # Unless linker support and dl_iterate_phdr are present,
        # unwind-dw2-fde-dip.c automatically falls back to unwind-dw2-fde.c.
    -  tmake_file="$tmake_file sol2/t-sol2 t-eh-dw2-dip t-crtstuff-pic t-libgcc-pic t-slibgcc t-slibgcc-elf-ver"
    +  tmake_file="$tmake_file sol2/t-sol2 t-eh-dw2-dip t-crtstuff-pic t-libgcc-pic t-slibgcc t-slibgcc-elf-ver t-crtstuff-pic"
        if test $with_gnu_ld = yes; then
          tmake_file="$tmake_file t-slibgcc-gld"
        else
    @@ -290,10 +290,12 @@
            i?86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*)
              # Solaris 10+/x86 provides crt1.o, crti.o, crtn.o, and gcrt1.o as
              # part of the base system.
    +        extra_parts="$extra_parts crtbeginS.o crtendS.o"
              ;;
            sparc*-*-solaris2.1[0-9]*)
              # Solaris 10+/SPARC lacks crt1.o and gcrt1.o.
              extra_parts="$extra_parts crt1.o gcrt1.o"
    +        extra_parts="$extra_parts crtbeginS.o crtendS.o"
              ;;
          esac
        fi

might resolve the issue, but I don't have a SPARC system setup to verify.

    -Norm


On 05/19/2018 08:08 PM, Richard Lowe wrote:
> I would not be surprised, if enabling crt*S is still an illumos patch, 
> if that patch was not somehow wrong.  I don't have a SPARC to actually 
> check it.
>
> On Sat, May 19, 2018 at 6:22 PM Aurélien Larcher 
> <aurelien.larcher at gmail.com <mailto:aurelien.larcher at gmail.com>> wrote:
>
>     On Sun, May 20, 2018 at 12:19 AM, Gary Mills
>     <gary_mills at fastmail.fm <mailto:gary_mills at fastmail.fm>> wrote:
>
>         On Sat, May 19, 2018 at 10:47:05PM +0200, Aurélien Larcher wrote:
>         >
>         >    Are you sure there is no crtbeginS.o at all in the directory?
>
>         Quite sure:
>
>             $ find build -name 'crt*.o' -ls
>             22700589    2 -rw-r--r--   1 mills    staff 1416 May 19
>         10:40 build/sparcv7/gcc/sparcv9/crt1.o
>             22700587    4 -rw-r--r--   1 mills    staff 3232 May 19
>         10:40 build/sparcv7/gcc/sparcv9/crtbegin.o
>             22700588    2 -rw-r--r--   1 mills    staff  952 May 19
>         10:40 build/sparcv7/gcc/sparcv9/crtend.o
>             22700591    5 -rw-r--r--   1 mills    staff 3928 May 19
>         10:40 build/sparcv7/gcc/sparcv9/crtfastmath.o
>             22700584    5 -rw-r--r--   1 mills    staff 3928 May 19
>         10:40
>         build/sparcv7/sparc-sun-solaris2.11/sparcv9/libgcc/crtfastmath.o
>             22700578    2 -rw-r--r--   1 mills    staff  952 May 19
>         10:40 build/sparcv7/sparc-sun-solaris2.11/sparcv9/libgcc/crtend.o
>             22700576    4 -rw-r--r--   1 mills    staff 3232 May 19
>         10:40
>         build/sparcv7/sparc-sun-solaris2.11/sparcv9/libgcc/crtbegin.o
>             22700580    2 -rw-r--r--   1 mills    staff 1416 May 19
>         10:40 build/sparcv7/sparc-sun-solaris2.11/sparcv9/libgcc/crt1.o
>
>         >    Should they not be created already from stage-1?
>
>         That's what I expected.
>
>         >    You should be able to set the ld path to them using
>         boot-ldflags.
>
>         They don't exist anywhere on the system.
>
>         >    Also I do not remember if multilib is considered as a
>         native build. If
>         >    not, you may need to --enable-bootstrap explicitly.
>
>         Okay, thanks.
>
>
>     Sorry, my memory is a bit shaky on these topics... :S
>
>
>         -- 
>         -Gary Mills-            -refurb- -Winnipeg, Manitoba, Canada-
>
>         _______________________________________________
>         oi-dev mailing list
>         oi-dev at openindiana.org <mailto:oi-dev at openindiana.org>
>         https://openindiana.org/mailman/listinfo/oi-dev
>
>
>     -- 
>     ---
>     Praise the Caffeine embeddings
>     _______________________________________________
>     oi-dev mailing list
>     oi-dev at openindiana.org <mailto:oi-dev at openindiana.org>
>     https://openindiana.org/mailman/listinfo/oi-dev
>
> -- 
>
> -- Rich
>
>
>
> _______________________________________________
> oi-dev mailing list
> oi-dev at openindiana.org
> https://openindiana.org/mailman/listinfo/oi-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openindiana.org/pipermail/oi-dev/attachments/20180519/840a7f33/attachment-0005.html>


More information about the oi-dev mailing list