This is the mail archive of the mailing list for the libc-ports project.

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

Re: [WIP] glibc: Use /lib/ for ARM's -mfloat-abi=hard ABI.

> 	* Check and set libc_cv_compiler_dynlinker_default.

Since this is not used generically, it doesn't belong in the main configure.
Instead, put it in a macro in aclocal.m4 and use it in arm/

> +dnl Determine the dynamic linker that the compiler would have used given
> +dnl options we have been given. This is useful for machines to know so

Two spaces between sentences.

> +dnl compute it here and have it available for things like ABI checking.
> +AC_CACHE_CHECK([what dynamic linker is used by the compiler], libc_cv_complier_dynlinker_default,

Line too long, wrap the second arg to below [.

> +[libc_cv_compiler_dynlinker_default=""
> +cat > conftest.c <<EOF
> +int main (void) {}
> +EOF

Why can't use use AC_TRY_LINK?

> +    libc_cv_compiler_dynlinker_default="`$READELF -W -l conftest | grep interpreter | sed -e 's,^.* \(\/.*\).$,\1,g'`"

Don't use grep.  You can use:

	| sed -n 's/^.*interpreter: \(.*\)\@:>@$/\1/p'

> +rm -r conftest.*])

You meant -f.  But you should just leave it to AC_TRY_LINK to clean up.

> In ARM's preconfigure we detect that the compiler is using the new
> dynamic linker and select the new "armhf" sysdep directory. The
> new "armhf" sysdep directory has a shlib-versions file which 
> names the dynamic linker correctly.
> One downside to this solution is that we need to duplicate
> the directory structure for arm along with Implies in order
> to pickup the optimized routines normally present.
> This is a bit hackish and I'd be open to other solutions, but
> at present this works.

I think you can just do the whole check in sysdeps/arm/configure
instead of preconfigure.  Make it AC_DEFINE something.  Then use
%ifdef something in sysdeps/arm/shlib-versions.  Or if you really
want to be open to randomness from the compiler config, you could
even AC_DEFINE_UNQUOTED(FOO, $libc_cv_compiler_dynlinker_default)
and then put in sysdeps/arm/shlib-versions:

arm.*-.*-linux-gnueabi.*	ld=FOO

But I wouldn't recommend that lack of sanity-checking.


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