This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Position independence: $PREFIX-populate has absolute paths


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]