Position independence: $PREFIX-populate has absolute paths

Michael Abbott michael@araneidae.co.uk
Tue Jul 29 14:28:00 GMT 2008


Just discovered that $PREFIX-populate has absolute paths.  I suggest 
changing tools/populate.in so that the lines:

CT_READELF="@@CT_READELF@@"
CT_SYSROOT_DIR="@@CT_SYSROOT_DIR@@"

read something closer to:

CT_HERE="$(dirname "$0")"
CT_READELF="$CT_HERE/@@CT_PREFIX@@-readelf"
CT_SYSROOT_DIR="$CT_HERE/../@@CT_PREFIX@@/sys-root"

(Here I'm assuming there's something like CT_PREFIX symbol to substitute 
here.)

Is it as simple as this?


P.S. As a bash style I'd prefer to write
	(( ${still_needed} ))
in preference to
	[ ${still_needed} -eq 1 ]
on the grounds that it's an honest boolean test.

--
For unsubscribe information see http://sourceware.org/lists.html#faq



More information about the crossgcc mailing list