From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19766 invoked by alias); 13 Feb 2009 12:20:11 -0000 Received: (qmail 19682 invoked by uid 48); 13 Feb 2009 12:19:58 -0000 Date: Fri, 13 Feb 2009 12:20:00 -0000 Message-ID: <20090213121958.19681.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug libfortran/39176] [4.4 Regression] -static and -fopenmp and io causes segfault In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jv244 at cam dot ac dot uk" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-02/txt/msg01187.txt.bz2 ------- Comment #3 from jv244 at cam dot ac dot uk 2009-02-13 12:19 ------- (In reply to comment #2) > This has been repeated many times. Don't use -static for threaded programs, it > is really bad idea, and if you really have to, you need to link the whole > libpthread.a in (-Wl,--whole-archive -lpthread -Wl,--no-whole-archive), > otherwise if it works, it is by pure luck. > This certainly isn't a regression. > Thanks for your reply, this was unknown to me, and I think for many occassional omp users. Do you think this could be documented near the -fopenmp flag (I can write something if you wish). Or could one have gcc warn if both -fopenmp and -static are present ? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39176