public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/30153]  New: -fPIC failure
@ 2006-12-11 19:24 terra at gnome dot org
  2006-12-24  4:49 ` [Bug target/30153] " pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: terra at gnome dot org @ 2006-12-11 19:24 UTC (permalink / raw)
  To: gcc-bugs

> cat gcc.c
static inline void foo (void) { }
void baz (void (*f) (void));
void bar (void) { baz (foo); }

> gcc -O0 -c -fPIC gcc.c
> gcc -shared -o gcc.so gcc.o
/usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bin/ld:
gcc.o: relocation R_X86_64_PC32 against `foo' can not be used when making a
shared object; recompile with -fPIC
/usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bin/ld:
final link failed: Bad value
collect2: ld returned 1 exit status


Note: Adding -02 to the compilation silences this.
Note: Removing "inline" silences this.


-- 
           Summary: -fPIC failure
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: terra at gnome dot org
 GCC build triplet: x86_64-suse-linux
  GCC host triplet: x86_64-suse-linux
GCC target triplet: x86_64-suse-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30153


^ permalink raw reply	[flat|nested] 6+ messages in thread
[parent not found: <bug-30153-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2011-12-22  2:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-11 19:24 [Bug c/30153] New: -fPIC failure terra at gnome dot org
2006-12-24  4:49 ` [Bug target/30153] " pinskia at gcc dot gnu dot org
2007-05-17  2:19 ` price at ifa dot hawaii dot edu
2010-02-05 21:11 ` reza dot yazdani at amd dot com
2010-02-05 23:11 ` reza dot yazdani at amd dot com
     [not found] <bug-30153-4@http.gcc.gnu.org/bugzilla/>
2011-12-22  3:24 ` pinskia at gcc dot gnu.org

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).