Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#12144 - Use -fPIC -fvisibility=hidden for 32 bit x86 builds too to fix link errors.

Attached to Project: Rockbox
Opened by Nils Wallménius (nls) - Wednesday, 01 June 2011, 11:45 GMT+2
Last edited by Andree Buschmann (Buschel) - Friday, 24 June 2011, 10:59 GMT+2
Task Type Patches
Category Build environment
Status Closed
Assigned To No-one
Player Type All players
Severity Low
Priority Normal
Reported Version Release 3.8.1
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Private No

Details

This patch enables the -fPIC and -fvisibility=hidden options for 32 x86 builds, they were previously only used for 64 bit. This fixes or works around linker errors with recent binutils in debian but i'm unsure if there are any downsides to this
   config_pic.diff (1 KiB)
 tools/configure |   22 +++++++++-------------
 1 file changed, 9 insertions(+), 13 deletions(-)

This task depends upon

Closed by  Andree Buschmann (Buschel)
Friday, 24 June 2011, 10:59 GMT+2
Reason for closing:  Accepted
Additional comments about closing:  Latest fixes for cygwin and win32 corss-compiliation under Linux have been submitted.
Comment by Nils Wallménius (nls) - Wednesday, 01 June 2011, 14:10 GMT+2
Better patch that only uses the -fPIC flag for things that are actually shared, introduces a new SHARED_CFLAGS flag to set in configure.
Works fine on both 64 and 32 bit sims here. Dunno about other platforms that use "-shared" like maemo and android.
Also it breaks on the sscanf hack in doom and rockboy, which should be fixed.
   picfix.diff (5.2 KiB)
 apps/plugins/plugins.make |    3 ++-
 apps/codecs/codecs.make   |    3 ++-
 apps/plugins/lua/Makefile |    2 +-
 apps/plugins/SUBDIRS      |    4 ++--
 tools/configure           |   39 ++++++++++++++++++---------------------
 5 files changed, 25 insertions(+), 26 deletions(-)

Comment by Nils Wallménius (nls) - Tuesday, 07 June 2011, 10:27 GMT+2
doom and rockboy fixed by adding sscanf to their SOURCES files so that it gets compiled with the correct flags
   picfix2.diff (5.9 KiB)
 apps/plugins/plugins.make         |    3 +-
 apps/plugins/doom/SOURCES         |    1 
 apps/plugins/doom/doom.make       |    1 
 apps/plugins/rockboy/rockboy.make |    1 
 apps/plugins/rockboy/SOURCES      |    1 
 apps/plugins/lua/Makefile         |    2 -
 apps/codecs/codecs.make           |    3 +-
 tools/configure                   |   39 +++++++++++++++++---------------------
 8 files changed, 25 insertions(+), 26 deletions(-)

Comment by Andree Buschmann (Buschel) - Monday, 20 June 2011, 22:19 GMT+2
The current solution (since r29983) throws lots of "fPIC"- and "visibility"-related warnings when building win32 simulation under Linux (Ubuntu). Commenting line 299 in /tools/configure does of course solve this issue.

Edit: compile log attached.
   log.7z (87.4 KiB)
Comment by Steve Bavin (pondlife) - Tuesday, 21 June 2011, 09:52 GMT+2
FYI I also need to remove the -fvisibilityoption to get a Cygwin build to work. The standard Cygwin setup still uses gcc 3.4.4 which doesn't know about -fvisibility. The -fPIC option does give plenty of warnings, but the compilation still succeeds.
Comment by Nils Wallménius (nls) - Tuesday, 21 June 2011, 10:29 GMT+2
Can you make the switches conditional on mingw or cygwin or whatever in configure?
I don't have a setup to test that stuff
Comment by Andree Buschmann (Buschel) - Tuesday, 21 June 2011, 21:19 GMT+2
This fixes the issues with the win32 build for both Linux (Ubuntu) and cygwin hosts. I am not sure whether this might be needed for other hosts as well...
   config_v01.patch (0.4 KiB)
 tools/configure |    2 ++
 1 file changed, 2 insertions(+)

Comment by Andree Buschmann (Buschel) - Wednesday, 22 June 2011, 19:50 GMT+2
Fix submitted with r30052. I am not sure whether this kind of fix is also needed for some of the other environments as well.

Loading...