From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10447 invoked by alias); 18 Dec 2018 10:16:41 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 9500 invoked by uid 89); 18 Dec 2018 10:16:40 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=distribute, machines, Ricardo, distributing X-HELO: mout.perfora.net Received: from mout.perfora.net (HELO mout.perfora.net) (74.208.4.197) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 18 Dec 2018 10:16:38 +0000 Received: from krylov.cigma-design.com ([67.180.190.51]) by mrelay.perfora.net (mreueus003 [74.208.5.2]) with ESMTPSA (Nemesis) id 0MPnwS-1gVMwa1q1C-0052oO for ; Tue, 18 Dec 2018 11:16:34 +0100 To: gcc-help From: Ricardo Telichevesky Subject: Trying to build libgfortran.a with -fPIC Message-ID: <537a6b62-8d5c-1761-124d-375be1ba122c@teli.org> Date: Tue, 18 Dec 2018 11:40:00 -0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2018-12/txt/msg00061.txt.bz2 Hello, Can't find anywhere how to do it .... I've built the gcc compiler many times, in many different machines, and many versions ... However, now I need to compile it in such way that libgfortran.a and libquadmath.a with -fPIC flags, so that I can statically link them inside a shared object that contains lapack stuff .. The problem with distributing shared objects that rely on other shared objects is that quite often the target machine doesn't have the right libraries libgfortran.so and libquadmath.so ... and if I distribute them have to deal with proper search paths, etc, it is a mess... Any suggestions? - perhaps there is a simple way to force the entire build of gcc to compile with -fPIC ... Thanks, Ricardo