public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Lorenzo Pesce <lpesce@uchicago.edu>
To: Andrew Haley <aph@redhat.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: Issue on X86_64?
Date: Fri, 28 Mar 2008 18:41:00 -0000	[thread overview]
Message-ID: <D96337C2-86A7-4DAF-B141-AB575499CA21@uchicago.edu> (raw)
In-Reply-To: <47ED33BC.2000806@redhat.com>

>>> When you use gcc to build *your* libraries, *you* must compile
>>> with -fPIC.
>>
>> I already do that. The problem is with libgfortran.* not with my  
>> libraries!
>
> Now you tell me.  Have a look at the gcc build log to see if it really
> did compile some of the libgfortran sources without -fPIC.

Forgive me again, which is the file I should look for?
I am looking in  gcc-4.1.1/objdir and this is all I can find:

x86_64-unknown-linux-gnu/libgfortran/libtool:140:pic_flag=" -fPIC -DPIC"
x86_64-unknown-linux-gnu/libgfortran/config.cache: 
259:ac_cv_prog_cc_pic=${ac_cv_prog_cc_pic=' -fPIC -DPIC'}
x86_64-unknown-linux-gnu/libgfortran/config.log:175:ltconfig: 
687:checking that /home/lpesce/GCC/gcc-4.1.1/objdir/./gcc/xgcc PIC  
flag -fPIC -DPIC works.
x86_64-unknown-linux-gnu/libgfortran/config.log:176:ltconfig:697: / 
home/lpesce/GCC/gcc-4.1.1/objdir/./gcc/xgcc -B/home/lpesce/GCC/ 
gcc-4.1.1/objdir/./gcc/ -B/usr/local/x86_64-unknown-linux-gnu/bin/ -B/ 
usr/local/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/x86_64- 
unknown-linux-gnu/include -isystem /usr/local/x86_64-unknown-linux- 
gnu/sys-include -c -std=gnu99 -O2 -g -O2  -fPIC -DPIC -DPIC   
conftest.c 1>&5
x86_64-unknown-linux-gnu/libgfortran/config.log: 
5096:ac_cv_prog_cc_pic=' -fPIC -DPIC'
x86_64-unknown-linux-gnu/32/libgfortran/libtool:140:pic_flag=" -fPIC - 
DPIC"
x86_64-unknown-linux-gnu/32/libgfortran/config.cache: 
259:ac_cv_prog_cc_pic=${ac_cv_prog_cc_pic=' -fPIC -DPIC'}
x86_64-unknown-linux-gnu/32/libgfortran/config.log:175:ltconfig: 
687:checking that /home/lpesce/GCC/gcc-4.1.1/objdir/./gcc/xgcc PIC  
flag -fPIC -DPIC works.
x86_64-unknown-linux-gnu/32/libgfortran/config.log:176:ltconfig:697: / 
home/lpesce/GCC/gcc-4.1.1/objdir/./gcc/xgcc -B/home/lpesce/GCC/ 
gcc-4.1.1/objdir/./gcc/ -B/usr/local/x86_64-unknown-linux-gnu/bin/ -B/ 
usr/local/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/x86_64- 
unknown-linux-gnu/include -isystem /usr/local/x86_64-unknown-linux- 
gnu/sys-include  -m32 -c -std=gnu99  std=gnu99 -O2 -g -O2  -Wunknown- 
pragmas -fPIC -DPIC -DPIC  conftest.c 1>&5
x86_64-unknown-linux-gnu/32/libgfortran/config.log: 
5146:ac_cv_prog_cc_pic=' -fPIC -DPIC'

>> Java seems to need the object files from libgfortran for the JNI
>> libraries to work properly
>
> No it doesn't.

Sorry, I did not report all the steps. I am constructing some jni  
libraries from
some fortran libraries. I seem to be able to use the fortran  
libraries as jni
if and only if the objects from libgfortran are included into the  
dynamically
linked jni library.
>>

I hope that it makes more sense now.

Lorenzo

  reply	other threads:[~2008-03-28 18:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-25 21:06 Lorenzo Pesce
2008-03-26 10:03 ` Andrew Haley
2008-03-28 17:20   ` Lorenzo Pesce
2008-03-28 17:45     ` Andrew Haley
2008-03-28 17:57       ` Lorenzo Pesce
2008-03-28 18:07         ` Andrew Haley
2008-03-28 18:41           ` Lorenzo Pesce [this message]
2008-03-28 19:55             ` Andrew Haley
2008-03-28 22:31               ` Lorenzo Pesce
2008-03-28 22:51                 ` David Daney
     [not found] <20080328191557.BDJ30009@m4500-01.uchicago.edu>
2008-03-29  1:02 ` David Daney
2008-03-29  3:21 Lorenzo Pesce
2008-03-29  4:17 ` Ian Lance Taylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D96337C2-86A7-4DAF-B141-AB575499CA21@uchicago.edu \
    --to=lpesce@uchicago.edu \
    --cc=aph@redhat.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).