public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] libphobos: Enable on Solaris/SPARC or with /bin/as [PR 103528]
Date: Thu, 10 Mar 2022 11:19:29 +0100	[thread overview]
Message-ID: <yddzglyjej2.fsf@CeBiTec.Uni-Bielefeld.DE> (raw)

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

libphobos is currently only enabled on Solaris/x86 with gas.  As
discovered when gdc was switched to the dmd frontend, this initially
broke bootstrap for the other Solaris configurations.

However, it's now well possible to enable it both for Solaris/x86 with
as and Solaris/SPARC (both as and gas) since the original problems (x86
as linelength limit among others) are long gone.

The following patch does just that.

Tested on i386-pc-solaris2.11 and sparc-sun-solaris2.11 (both as and
gas) with gdc 9.3.0 (x86) resp. 9.4.0 (sparc, configured with
--enable-libphobos) as bootstrap compilers.

Ok for trunk?

	Rainer

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


2021-12-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	libphobos:
	PR d/103528
	* configure.ac <x86_64-*-solaris2.* | i?86-*-solaris2.*>: Remove
	gas requirement.
	* configure: Regenerate.
	* configure.tgt (sparc*-*-solaris2.11*): Mark supported.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: sol2-libphobos-enable.patch --]
[-- Type: text/x-patch, Size: 1370 bytes --]

# HG changeset patch
# Parent  0c244e272e86453f81642685e5eee36c3996fadf
libphobos: Enable on Solaris/SPARC or with /bin/as [PR ?????]

diff --git a/libphobos/configure.ac b/libphobos/configure.ac
--- a/libphobos/configure.ac
+++ b/libphobos/configure.ac
@@ -189,18 +189,6 @@ AC_MSG_CHECKING([for host support for li
 . ${srcdir}/configure.tgt
 case ${host} in
   x86_64-*-solaris2.* | i?86-*-solaris2.*)
-    # libphobos doesn't compile with the Solaris/x86 assembler due to a
-    # relatively low linelength limit.
-    as_prog=`$CC -print-prog-name=as`
-    if test -n "$as_prog" && $as_prog -v /dev/null 2>&1 | grep GNU > /dev/null 2>&1; then
-      druntime_cv_use_gas=yes;
-    else
-      druntime_cv_use_gas=no;
-    fi
-    rm -f a.out
-    if test x$druntime_cv_use_gas = xno; then
-      LIBPHOBOS_SUPPORTED=no
-    fi
     # 64-bit D execution fails with Solaris ld without -z relax=transtls support.
     if test "$druntime_ld_gld" = "no" && test "$druntime_ld_relax_transtls" = "no"; then
       LIBPHOBOS_SUPPORTED=no
diff --git a/libphobos/configure.tgt b/libphobos/configure.tgt
--- a/libphobos/configure.tgt
+++ b/libphobos/configure.tgt
@@ -49,6 +49,9 @@ case "${target}" in
   s390*-linux*)
 	LIBPHOBOS_SUPPORTED=yes
 	;;
+  sparc*-*-solaris2.11*)
+	LIBPHOBOS_SUPPORTED=yes
+	;;
   x86_64-*-freebsd* | i?86-*-freebsd*)
 	LIBPHOBOS_SUPPORTED=yes
 	;;

             reply	other threads:[~2022-03-10 10:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-10 10:19 Rainer Orth [this message]
2022-03-10 11:30 ` Iain Buclaw

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yddzglyjej2.fsf@CeBiTec.Uni-Bielefeld.DE \
    --to=ro@cebitec.uni-bielefeld.de \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).