Hi David,

> Release managers:
>
> I'd like to apply FX's patch here:
>   https://gcc.gnu.org/ml/gcc-patches/2018-02/msg00881/patch
> to trunk, to fix the build of jit on OS X, and to make it easier to fix
> it on Solaris.
>
> This involves touching gcc/configure.ac (and configure).
>
> I've successfully bootstrapped and regression-tested it on x86_64-pc-
> linux-gnu.  FX reports above that it fixes the build on macOS, and
> Rainer has an (untested) patch on top of it that ought to fix the build
> on Solaris:
>   https://gcc.gnu.org/ml/gcc-patches/2018-02/msg00835.html

I've now tested the patch (together with the one from PR jit/84288 for
several remaining issues).  I've needed another snippet for
Solaris/SPARC which links libkstat into xgcc and needs it in
libgccjit.so, too.  Bootstrapped without regressions on
i386-pc-solaris2.11 and sparc-sun-solaris2.11.

Ok for mainline?

        Rainer

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


2018-03-20  Rainer Orth  <r...@cebitec.uni-bielefeld.de>

        gcc/jit:
        PR jit/84288
        * Make-lang.in ($(LIBGCCJIT_FILENAME)): Add $(EXTRA_GCC_LIBS).

        gcc:
        PR jit/84288
        * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
        * configure: Regenerate.

# HG changeset patch
# Parent  401d306950a09a18dcff23bc4f3086cce131450b
Enable jit on Solaris without GNU ld

diff --git a/gcc/configure.ac b/gcc/configure.ac
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -3715,6 +3715,12 @@ elif test x$gcc_cv_ld != x; then
       gcc_cv_ld_soname=yes
       ld_soname_option='-install_name'
       ;;
+    # Solaris 2 ld always supports -h.  It also supports --soname for GNU
+    # ld compatiblity since some Solaris 10 update.
+    *-*-solaris2*)
+      gcc_cv_ld_soname=yes
+      ld_soname_option='-h'
+      ;;
   esac
 fi
 # Don't AC_DEFINE result, only used in jit/Make-lang.in so far.
diff --git a/gcc/jit/Make-lang.in b/gcc/jit/Make-lang.in
--- a/gcc/jit/Make-lang.in
+++ b/gcc/jit/Make-lang.in
@@ -96,7 +96,7 @@ jit-warn = $(STRICT_WARN)
 	$(EXTRA_GCC_OBJS)
 	+$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ -shared \
 	     $(jit_OBJS) libbackend.a libcommon-target.a libcommon.a \
-	     $(CPPLIB) $(LIBDECNUMBER) $(LIBS) $(BACKENDLIBS) \
+	     $(CPPLIB) $(LIBDECNUMBER) $(EXTRA_GCC_LIBS) $(LIBS) $(BACKENDLIBS) \
 	     $(EXTRA_GCC_OBJS) \
 	     $(LIBGCCJIT_VERSION_SCRIPT_OPTION) \
 	     $(LIBGCCJIT_SONAME_OPTION)

Reply via email to