Rockbox

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

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#9112 - Automatically set correct cross compiler path based on user configuration file.

Attached to Project: Rockbox
Opened by William Poetra Yoga Hadisoeseno (wpyh) - Monday, 23 June 2008, 22:25 GMT+2
Last edited by Marcoen Hirschberg (marcoen) - Monday, 23 June 2008, 22:27 GMT+2
Task Type Patches
Category Build environment
Status Unconfirmed
Assigned To No-one
Player Type All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Private No

Details

This is an attempt to automate the setting of $PATH in tools/rockboxdev.sh, tools/configure and the generated Makefile.

The directory prefix of the cross compilers is stored in ~/.config/rockbox.org/RockboxCompilerPrefix. As the default path (in tools/rockboxdev.sh) is /usr/local, if that file is empty, then $PATH won't be modified. Otherwise, the value stored inside that file will be read, the target platform type appended, and lastly /bin appended. The resulting string will be appended to $PATH.

This patch doesn't break existing configuration. But it's most probably incomplete, so please provide feedback on which files need to be modified as well.
   autopath.v1.diff (3.7 KiB)
 tools/rockboxdev.sh |   11 +++++++++--
 tools/configure     |   25 +++++++++++++++++++++++++
 2 files changed, 34 insertions(+), 2 deletions(-)

This task depends upon

Comment by Jonas Häggqvist (rasher) - Wednesday, 25 June 2008, 00:58 GMT+2
Wouldn't it be better to prepend the path to PATH, to avoid rogue crosscompilers causing trouble?
Comment by William Poetra Yoga Hadisoeseno (wpyh) - Wednesday, 25 June 2008, 03:23 GMT+2
Good idea. This patch does that, prepending the cross compiler path to PATH instead of appending to it.
   autopath.v2.diff (3.7 KiB)
 tools/rockboxdev.sh |   11 +++++++++--
 tools/configure     |   25 +++++++++++++++++++++++++
 2 files changed, 34 insertions(+), 2 deletions(-)

Comment by Frank Gevaerts (fg) - Thursday, 26 June 2008, 14:45 GMT+2
Actually I prefer the original. I'd like to keep the ability to override this by setting PATH

edit: of course those people who know how to use PATH properly can just ignore the issue by not creating the settings file.
Comment by Frank Gevaerts (fg) - Thursday, 26 June 2008, 14:54 GMT+2
Also, maybe a different filename is better. It's not inconceivable that at some point people will want to add other settings, and RockboxCompilerPrefix will be a bit too specific then
Comment by William Poetra Yoga Hadisoeseno (wpyh) - Sunday, 10 May 2009, 05:44 GMT+2
Here's an updated version, sync'ed with latest SVN.

Gevaerts, regarding your comments:
1. I'm neutral as to whether we should add the new path before PATH or after PATH. I don't see any strong benefit in either way, so I'm keeping the current behaviour for now.
2. For the filename thing, I think other settings should be created in other files, inside the ~/.config/rockbox.org directory. What do you think?

   autopath.v9.diff (4.3 KiB)
 tools/rockboxdev.sh |   11 +++++++++--
 tools/configure     |   25 +++++++++++++++++++++++++
 2 files changed, 34 insertions(+), 2 deletions(-)

Loading...