public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] doc: Document Solaris D bootstrap requirements [PR 103528]
@ 2022-03-16 13:28 Rainer Orth
  2022-03-16 15:45 ` Iain Sandoe
  2022-03-30 10:37 ` Rainer Orth
  0 siblings, 2 replies; 6+ messages in thread
From: Rainer Orth @ 2022-03-16 13:28 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 797 bytes --]

This patch documents the Solaris-specific D bootstrap requirements.

Tested by building and inspecting gccinstall.{pdf,info}.

Ok for trunk?

I've omitted the Darwin-specific stuff so far documented in PRs d/103577
and d/103578:

* needs --enable-libphobos
* top of gcc-11 branch only
* backport of -static-libphobos patch
* Darwin/i386 doesn't work at all

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


2022-03-16  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	gcc:
	PR d/103528
	* doc/install.texi (Tools/packages necessary for building GCC)
	(GDC): Document libphobos requirement.
	(Host/target specific installation notes for GCC, *-*-solaris2*):
	Document libphobos and GDC specifics.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: sol2-d-bootstrap-doc.patch --]
[-- Type: text/x-patch, Size: 2131 bytes --]

# HG changeset patch
# Parent  33de4c9d886299fd8cc97e20c0f761c2f28a3eef
doc: Document Solaris D bootstrap requirements [PR 103528]

diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -287,7 +287,8 @@ section.
 @item @anchor{GDC-prerequisite}GDC
 
 In order to build GDC, the D compiler, you need a working GDC
-compiler (GCC version 9.1 or later), as the D front end is written in D.
+compiler (GCC version 9.1 or later) and D runtime library,
+@samp{libphobos}, as the D front end is written in D.
 
 Versions of GDC prior to 12 can be built with an ISO C++11 compiler, which can
 then be installed and used to bootstrap newer versions of the D front end.
@@ -303,6 +304,10 @@ front end does not make use of any GDC-s
 of the D language, if too old a GDC version is installed and
 @option{--enable-languages=d} is used, the build will fail.
 
+On some targets, @samp{libphobos} isn't enabled by default, but compiles
+and works if @option{--enable-libphobos} is used.  Specifics are
+documented for affected targets.
+
 @item A ``working'' POSIX compatible shell, or GNU bash
 
 Necessary when running @command{configure} because some
@@ -4851,6 +4856,12 @@ GNU binutils.  @samp{libstdc++} symbol v
 appropriate version is found.  Solaris @command{c++filt} from the Solaris
 Studio compilers does @emph{not} work.
 
+In order to build the GNU D compiler, GDC, a working @samp{libphobos} is
+needed.  That library wasn't built by default in GCC 9--11 on SPARC, or
+on x86 when the Solaris assembler is used, but can be enabled by
+configuring with @option{--enable-libphobos}.  Also, GDC 9.4.0 is
+required on x86, while GDC 9.3.0 is known to work on SPARC.
+
 The versions of the GNU Multiple Precision Library (GMP), the MPFR
 library and the MPC library bundled with Solaris 11.3 and later are
 usually recent enough to match GCC's requirements.  There are two
@@ -4864,6 +4875,7 @@ need to configure with @option{--with-gm
 @item
 The version of the MPFR libary included in Solaris 11.3 is too old; you
 need to provide a more recent one.
+
 @end itemize
 
 @html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] doc: Document Solaris D bootstrap requirements [PR 103528]
  2022-03-16 13:28 [PATCH] doc: Document Solaris D bootstrap requirements [PR 103528] Rainer Orth
@ 2022-03-16 15:45 ` Iain Sandoe
  2022-03-16 15:55   ` Rainer Orth
  2022-03-30 10:37 ` Rainer Orth
  1 sibling, 1 reply; 6+ messages in thread
From: Iain Sandoe @ 2022-03-16 15:45 UTC (permalink / raw)
  To: Rainer Orth; +Cc: GCC Patches, Iain Buclaw



> On 16 Mar 2022, at 13:28, Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> wrote:
> 
> This patch documents the Solaris-specific D bootstrap requirements.
> 
> Tested by building and inspecting gccinstall.{pdf,info}.
> 
> Ok for trunk?
> 
> I've omitted the Darwin-specific stuff so far documented in PRs d/103577
> and d/103578:
> 
> * needs --enable-libphobos
> * top of gcc-11 branch only
> * backport of -static-libphobos patch
> * Darwin/i386 doesn't work at all

— hopefully we will not need to add that  —

The actual problem is known (FWIW there is also some wrong code generated for
x86_64, we just happen to link it to something harmless instead of failing to link).

- I remain hopeful that a solution for 11.x can be found before gcc-12 branches,
since without m32 support it is hard for me to fit D into regular Darwin testing (at
present D is effectively untested on Darwin since the change to require a D bootstrap)
 .. at one stage, D did work on m32 Darwin.

Iain

> 
> 	Rainer
> 
> -- 
> -----------------------------------------------------------------------------
> Rainer Orth, Center for Biotechnology, Bielefeld University
> 
> 
> 2022-03-16  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
> 
> 	gcc:
> 	PR d/103528
> 	* doc/install.texi (Tools/packages necessary for building GCC)
> 	(GDC): Document libphobos requirement.
> 	(Host/target specific installation notes for GCC, *-*-solaris2*):
> 	Document libphobos and GDC specifics.
> 
> # HG changeset patch
> # Parent  33de4c9d886299fd8cc97e20c0f761c2f28a3eef
> doc: Document Solaris D bootstrap requirements [PR 103528]
> 
> diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
> --- a/gcc/doc/install.texi
> +++ b/gcc/doc/install.texi
> @@ -287,7 +287,8 @@ section.
> @item @anchor{GDC-prerequisite}GDC
> 
> In order to build GDC, the D compiler, you need a working GDC
> -compiler (GCC version 9.1 or later), as the D front end is written in D.
> +compiler (GCC version 9.1 or later) and D runtime library,
> +@samp{libphobos}, as the D front end is written in D.
> 
> Versions of GDC prior to 12 can be built with an ISO C++11 compiler, which can
> then be installed and used to bootstrap newer versions of the D front end.
> @@ -303,6 +304,10 @@ front end does not make use of any GDC-s
> of the D language, if too old a GDC version is installed and
> @option{--enable-languages=d} is used, the build will fail.
> 
> +On some targets, @samp{libphobos} isn't enabled by default, but compiles
> +and works if @option{--enable-libphobos} is used.  Specifics are
> +documented for affected targets.
> +
> @item A ``working'' POSIX compatible shell, or GNU bash
> 
> Necessary when running @command{configure} because some
> @@ -4851,6 +4856,12 @@ GNU binutils.  @samp{libstdc++} symbol v
> appropriate version is found.  Solaris @command{c++filt} from the Solaris
> Studio compilers does @emph{not} work.
> 
> +In order to build the GNU D compiler, GDC, a working @samp{libphobos} is
> +needed.  That library wasn't built by default in GCC 9--11 on SPARC, or
> +on x86 when the Solaris assembler is used, but can be enabled by
> +configuring with @option{--enable-libphobos}.  Also, GDC 9.4.0 is
> +required on x86, while GDC 9.3.0 is known to work on SPARC.
> +
> The versions of the GNU Multiple Precision Library (GMP), the MPFR
> library and the MPC library bundled with Solaris 11.3 and later are
> usually recent enough to match GCC's requirements.  There are two
> @@ -4864,6 +4875,7 @@ need to configure with @option{--with-gm
> @item
> The version of the MPFR libary included in Solaris 11.3 is too old; you
> need to provide a more recent one.
> +
> @end itemize
> 
> @html


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] doc: Document Solaris D bootstrap requirements [PR 103528]
  2022-03-16 15:45 ` Iain Sandoe
@ 2022-03-16 15:55   ` Rainer Orth
  2022-03-16 16:08     ` Iain Sandoe
  0 siblings, 1 reply; 6+ messages in thread
From: Rainer Orth @ 2022-03-16 15:55 UTC (permalink / raw)
  To: Iain Sandoe; +Cc: GCC Patches, Iain Buclaw

Hi Iain,

>> I've omitted the Darwin-specific stuff so far documented in PRs d/103577
>> and d/103578:
>> 
>> * needs --enable-libphobos
>> * top of gcc-11 branch only
>> * backport of -static-libphobos patch
>> * Darwin/i386 doesn't work at all
>
> — hopefully we will not need to add that  —
>
> The actual problem is known (FWIW there is also some wrong code generated for
> x86_64, we just happen to link it to something harmless instead of failing
> to link).

I see.  One issue I see during x86_64-darwin testing (10.7 only?) is
that the forkgc2 test hangs and has to be killed manually.

> - I remain hopeful that a solution for 11.x can be found before gcc-12 branches,
> since without m32 support it is hard for me to fit D into regular Darwin
> testing (at
> present D is effectively untested on Darwin since the change to require a D
> bootstrap)
>  .. at one stage, D did work on m32 Darwin.

I suspected that the 32-bit issue might be due to several stdint types
being wrong, which was just fixed on master.  At least the issue seemed
similar to PR d/104738.  I'm building a 64-bit trunk gdc as we speak in
order to try that as a bootstrap compiler for a 32-bit build.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] doc: Document Solaris D bootstrap requirements [PR 103528]
  2022-03-16 15:55   ` Rainer Orth
@ 2022-03-16 16:08     ` Iain Sandoe
  2022-03-17  9:00       ` Rainer Orth
  0 siblings, 1 reply; 6+ messages in thread
From: Iain Sandoe @ 2022-03-16 16:08 UTC (permalink / raw)
  To: Rainer Orth; +Cc: GCC Patches

Hi Rainer,

> On 16 Mar 2022, at 15:55, Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> wrote:
> 
>>> I've omitted the Darwin-specific stuff so far documented in PRs d/103577
>>> and d/103578:
>>> 
>>> * needs --enable-libphobos
>>> * top of gcc-11 branch only
>>> * backport of -static-libphobos patch
>>> * Darwin/i386 doesn't work at all
>> 
>> — hopefully we will not need to add that  —
>> 
>> The actual problem is known (FWIW there is also some wrong code generated for
>> x86_64, we just happen to link it to something harmless instead of failing
>> to link).
> 
> I see.  One issue I see during x86_64-darwin testing (10.7 only?) is
> that the forkgc2 test hangs and has to be killed manually.

yes, there are  known issues with GC and threading - but those do not break bootstrap
since the compiler is single-threaded.

>> - I remain hopeful that a solution for 11.x can be found before gcc-12 branches,
>> since without m32 support it is hard for me to fit D into regular Darwin
>> testing (at
>> present D is effectively untested on Darwin since the change to require a D
>> bootstrap)
>> .. at one stage, D did work on m32 Darwin.
> 
> I suspected that the 32-bit issue might be due to several stdint types
> being wrong, which was just fixed on master.  At least the issue seemed
> similar to PR d/104738.  I'm building a 64-bit trunk gdc as we speak in
> order to try that as a bootstrap compiler for a 32-bit build.

The issue on 11.x is related to code that tries to synthesize section-start
symbols, it causes a link fail on m32 - which is a bootstrap breaker.

..  if that has been fixed for m32 codegenon master then, yes - presumably we
could build an x86_64 compiler and use that “-m32” to make an i686 bootstrap.

Iain.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] doc: Document Solaris D bootstrap requirements [PR 103528]
  2022-03-16 16:08     ` Iain Sandoe
@ 2022-03-17  9:00       ` Rainer Orth
  0 siblings, 0 replies; 6+ messages in thread
From: Rainer Orth @ 2022-03-17  9:00 UTC (permalink / raw)
  To: Iain Sandoe; +Cc: GCC Patches

Hi Iain,

>> I suspected that the 32-bit issue might be due to several stdint types
>> being wrong, which was just fixed on master.  At least the issue seemed
>> similar to PR d/104738.  I'm building a 64-bit trunk gdc as we speak in
>> order to try that as a bootstrap compiler for a 32-bit build.
>
> The issue on 11.x is related to code that tries to synthesize section-start
> symbols, it causes a link fail on m32 - which is a bootstrap breaker.
>
> ..  if that has been fixed for m32 codegenon master then, yes - presumably we
> could build an x86_64 compiler and use that “-m32” to make an i686 bootstrap.

I tried just that: 64-bit-default gdc 12.0.1 as of 20220311 as bootstrap
compiler with -m32 for i386-apple-darwin11.4.2 target: same link
failures, unfortunately.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] doc: Document Solaris D bootstrap requirements [PR 103528]
  2022-03-16 13:28 [PATCH] doc: Document Solaris D bootstrap requirements [PR 103528] Rainer Orth
  2022-03-16 15:45 ` Iain Sandoe
@ 2022-03-30 10:37 ` Rainer Orth
  1 sibling, 0 replies; 6+ messages in thread
From: Rainer Orth @ 2022-03-30 10:37 UTC (permalink / raw)
  To: gcc-patches

Hi Iain,

I don't know if you really saw this patch:

https://gcc.gnu.org/pipermail/gcc-patches/2022-March/591844.html

It's Cc'ed to you in my outbox, but somehow the Cc: is missing in the
mail that arrived on gcc-patches ;-(

> This patch documents the Solaris-specific D bootstrap requirements.
>
> Tested by building and inspecting gccinstall.{pdf,info}.
>
> Ok for trunk?
>
> I've omitted the Darwin-specific stuff so far documented in PRs d/103577
> and d/103578:
>
> * needs --enable-libphobos
> * top of gcc-11 branch only
> * backport of -static-libphobos patch
> * Darwin/i386 doesn't work at all
>
> 	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-03-30 10:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-16 13:28 [PATCH] doc: Document Solaris D bootstrap requirements [PR 103528] Rainer Orth
2022-03-16 15:45 ` Iain Sandoe
2022-03-16 15:55   ` Rainer Orth
2022-03-16 16:08     ` Iain Sandoe
2022-03-17  9:00       ` Rainer Orth
2022-03-30 10:37 ` Rainer Orth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).