Greetings, The patch below is needed for google/integration branch: we want to be able build ...
12 years, 12 months ago
(2012-04-22 17:50:41 UTC)
#1
Greetings,
The patch below is needed for google/integration branch:
we want to be able build libgomp.a with -fPIC, be able to link it into a
shared library, and be able to dlopen that library without running out of
static TLS space (-ftls-model=initial-exec precludes that last part).
Google ref b/6368405
Google ref b/6156799
Tested: make && make check
2012-04-22 Paul Pluzhnikov <ppluzhnikov@google.com>
* libgomp/configure.tgt: Don't force initial-exec.
Index: libgomp/configure.tgt
===================================================================
--- libgomp/configure.tgt (revision 186636)
+++ libgomp/configure.tgt (working copy)
@@ -10,16 +10,6 @@
# XCFLAGS Add extra compile flags to use.
# XLDFLAGS Add extra link flags to use.
-# Optimize TLS usage by avoiding the overhead of dynamic allocation.
-if test $gcc_cv_have_tls = yes ; then
- case "${target}" in
-
- *-*-linux*)
- XCFLAGS="${XCFLAGS} -ftls-model=initial-exec"
- ;;
- esac
-fi
-
# Since we require POSIX threads, assume a POSIX system by default.
config_path="posix"
--
This patch is available for review at http://codereview.appspot.com/6107046
On Sun, Apr 22, 2012 at 10:50 AM, Paul Pluzhnikov <ppluzhnikov@google.com> wrote: > Greetings, > ...
12 years, 12 months ago
(2012-04-23 05:09:46 UTC)
#3
On Sun, Apr 22, 2012 at 10:50 AM, Paul Pluzhnikov
<ppluzhnikov@google.com> wrote:
> Greetings,
>
> The patch below is needed for google/integration branch:
> we want to be able build libgomp.a with -fPIC, be able to link it into a
> shared library, and be able to dlopen that library without running out of
> static TLS space (-ftls-model=initial-exec precludes that last part).
Do you understand the reason why it was made -ftls-model=initial-exec
in the first place?
IIRC the main reason is because the slow down from not using
initial-exec model for GOMP is a lot.
Thanks,
Andrew Pinski
> Google ref b/6368405
> Google ref b/6156799
>
> Tested: make && make check
>
>
> 2012-04-22 Paul Pluzhnikov <ppluzhnikov@google.com>
>
> * libgomp/configure.tgt: Don't force initial-exec.
>
> Index: libgomp/configure.tgt
> ===================================================================
> --- libgomp/configure.tgt (revision 186636)
> +++ libgomp/configure.tgt (working copy)
> @@ -10,16 +10,6 @@
> # XCFLAGS Add extra compile flags to use.
> # XLDFLAGS Add extra link flags to use.
>
> -# Optimize TLS usage by avoiding the overhead of dynamic allocation.
> -if test $gcc_cv_have_tls = yes ; then
> - case "${target}" in
> -
> - *-*-linux*)
> - XCFLAGS="${XCFLAGS} -ftls-model=initial-exec"
> - ;;
> - esac
> -fi
> -
> # Since we require POSIX threads, assume a POSIX system by default.
> config_path="posix"
>
>
> --
> This patch is available for review at http://codereview.appspot.com/6107046
On Sun, Apr 22, 2012 at 10:09:46PM -0700, Andrew Pinski wrote: > On Sun, Apr ...
12 years, 12 months ago
(2012-04-23 05:23:57 UTC)
#4
On Sun, Apr 22, 2012 at 10:09:46PM -0700, Andrew Pinski wrote:
> On Sun, Apr 22, 2012 at 10:50 AM, Paul Pluzhnikov
> <ppluzhnikov@google.com> wrote:
> > Greetings,
> >
> > The patch below is needed for google/integration branch:
> > we want to be able build libgomp.a with -fPIC, be able to link it into a
> > shared library, and be able to dlopen that library without running out of
> > static TLS space (-ftls-model=initial-exec precludes that last part).
>
> Do you understand the reason why it was made -ftls-model=initial-exec
> in the first place?
> IIRC the main reason is because the slow down from not using
> initial-exec model for GOMP is a lot.
Yes, the reason is that initial-exec is much faster than global-exec.
Jakub
On Sun, Apr 22, 2012 at 10:09 PM, Andrew Pinski <pinskia@gmail.com> wrote: > IIRC the ...
12 years, 12 months ago
(2012-04-23 05:32:25 UTC)
#5
On Sun, Apr 22, 2012 at 10:09 PM, Andrew Pinski <pinskia@gmail.com> wrote:
> IIRC the main reason is because the slow down from not using
> initial-exec model for GOMP is a lot.
Given a choice between "slows down a lot" and "doesn't work at all",
we prefer the former ;-)
I see that we are not alone:
http://old.nabble.com/-patch--libgomp%3A-removing-nodlopen-flag-for-portabili...
Generally we don't use OpenMP, but some of our third-party libraries
do depend on it.
Thanks for the heads-up.
--
Paul Pluzhnikov
Issue 6107046: [patch][google/integration] Don't force tls-model to initial-exec when building libgomp
Created 12 years, 12 months ago by ppluzhnikov
Modified 10 years, 4 months ago
Reviewers: Ollie Wild, pinskia_gmail.com, jakub_redhat.com
Base URL: svn+ssh://gcc.gnu.org/svn/gcc/branches/google/integration/
Comments: 0