Opened 12 years ago

Closed 11 years ago

Last modified 5 years ago

#9460 closed patch

Fails to build on Linux PowerPC when using plugins

Reported by: SF/reddwarf69 Owned by: lordhoto
Priority: normal Component: Port: Linux
Version: Keywords:
Cc: Game:

Description

When using plugins everything (this could be improved) is compiled with -fpic. On PowerPC the GOT gets too big, it needs to be compiled with -fPIC instead.

Patch attached.

Ticket imported from: #3575572. Ticket imported from: patches/1565.

Attachments (1)

scummvm-1.5.0-no_fpic.patch (442 bytes ) - added by SF/reddwarf69 12 years ago.
Patch

Download all attachments as: .zip

Change History (7)

by SF/reddwarf69, 12 years ago

Attachment: scummvm-1.5.0-no_fpic.patch added

Patch

comment:1 by lordhoto, 12 years ago

Wouldn't it be simpler to add -fPIC for all architectures?

comment:2 by SF/reddwarf69, 12 years ago

Totally. I just went for the minimum modification approach to get the change approved.

That say I have no idea about the extra costs of using -fPIC instead of -fpic. Perhaps the person who added it knew what he was doing?

comment:3 by lordhoto, 12 years ago

According to my gcc manpage: "This option makes a difference on the m68k, PowerPC and SPARC.". This sounds to me like other platforms are not affected by this. But I suppose a simple test compilation with -fpic and -fPIC on x86/amd64 and comparing the result should give more insights.

comment:4 by lordhoto, 11 years ago

Owner: set to lordhoto
Status: newclosed

comment:5 by lordhoto, 11 years ago

It seems -fPIC really doesn't make a difference on amd64. So I just unconditionally use -fPIC for Linux (and FreeBSD) targets now. The change is in master as commit b52274d011bb0e4be399dd25a04f76f6a3c22f8c. Thanks for your patch.

comment:6 by digitall, 5 years ago

Component: Port: Linux
Note: See TracTickets for help on using tickets.