On Sun, 17 Feb 2019 10:16:04 -0500 Diane Bruce <[email protected]> wrote:
> On Sat, Feb 16, 2019 at 06:35:52PM -0700, Russell L. Carter wrote:
>> So I must dig deeper. Perhaps with rpaths interacting with the system
>> paths?
>
> You got it. ;)
> Except python doesn't have an rpath which is why this keeps coming
> up over and over again.
Maybe we should just add the gcc rpaths to the python ports LDFLAGS
without depending on gcc. Then python should use gcc libgcc_s when
it exists and fall back to base system libgcc_s when it doesn't.
Maybe we should compile *all* ports with gcc rpaths without depending
on gcc, just like we already compile everything with -fstack-protector
in LDFLAGS.
There's also the fact that gfortran behaves differently from the C
compilers (both clang and gcc) when it comes to libgcc_s. Gfortran
always links with libgcc_s. The C compilers link with libgcc.a first
and then with libgcc_s only as needed. This eliminates almost all
links with libgcc_s. The only ones left are for exception handling
and stack unwinding and gcc libgcc_s and base system libgcc_s are
version compatible for that so it doesn't matter which one gets picked
up. The attached patch for lang/gcc8 makes gfortran behave just like
the C compilers.
We cannot rename the base system libgcc_s to libclang_s because then a
process could load both gcc libgcc_s and base system libclang_s and I
think that could break exception handling and stack unwinding in weird
ways.
Index: lang/gcc8/files/patch-gcc_fortran_gfortranspec.c
===================================================================
--- lang/gcc8/files/patch-gcc_fortran_gfortranspec.c (nonexistent)
+++ lang/gcc8/files/patch-gcc_fortran_gfortranspec.c (working copy)
@@ -0,0 +1,11 @@
+--- gcc/fortran/gfortranspec.c.orig 2018-01-03 10:03:58 UTC
++++ gcc/fortran/gfortranspec.c
+@@ -404,7 +404,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR
+ }
+ }
+
+-#ifdef ENABLE_SHARED_LIBGCC
++#if 0
+ if (library)
+ {
+ unsigned int i;
Property changes on: lang/gcc8/files/patch-gcc_fortran_gfortranspec.c
___________________________________________________________________
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: lang/gcc8/files/patch-libgfortran_Makefile.in
===================================================================
--- lang/gcc8/files/patch-libgfortran_Makefile.in (nonexistent)
+++ lang/gcc8/files/patch-libgfortran_Makefile.in (working copy)
@@ -0,0 +1,11 @@
+--- libgfortran/Makefile.in.orig 2018-07-26 09:48:58 UTC
++++ libgfortran/Makefile.in
+@@ -625,7 +625,7 @@ libgfortran_la_LDFLAGS = -version-info `grep -v '^\#'
+ $(LTLDFLAGS) $(LIBQUADLIB) ../libbacktrace/libbacktrace.la \
+ $(HWCAP_LDFLAGS) \
+ -lm $(extra_ldflags_libgfortran) \
+- $(version_arg) -Wc,-shared-libgcc
++ $(version_arg)
+
+ libgfortran_la_DEPENDENCIES = $(version_dep) libgfortran.spec $(LIBQUADLIB_DEP)
+ cafexeclib_LTLIBRARIES = libcaf_single.la
Property changes on: lang/gcc8/files/patch-libgfortran_Makefile.in
___________________________________________________________________
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "[email protected]"