This is the mail archive of the mailing list for the glibc 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: PATCH: Configure x86_64 in sysdeps/x86_64/preconfigure

> Here is a patcn to implement #1.  Tested on Linux/x86-64.  OK to install?

That is #0 and #1.

> 2012-03-21  H.J. Lu  <>
> 	* sysdeps/unix/sysv/linux/ Check x86_64* instead
> 	of x86_64 when setting libc_cv_slibdir, libdir and
> 	libc_cv_localedir.
> 	* sysdeps/unix/sysv/linux/configure: Regenerated.

This part is OK.  Commit it alone.

> --- /dev/null
> +++ b/sysdeps/x86_64/preconfigure
> @@ -0,0 +1,12 @@
> +test "$machine" != "x86_64" ||
> +if echo __LP64__ | ${CC-cc} $CFLAGS $CPPFLAGS -E - | grep __LP64__ > /dev/null; then
> +  machine=x86_64/x32
> +else
> +  machine=x86_64/64
> +fi
> +
> +test -n "$base_machine" || case "$machine" in
> +x86_64*)
> +  base_machine=x86_64
> +  ;;
> +esac

I would put the x32 test inside the case statement after setting base_machine.

I think that any compilation test should be done using autoconf macros
rather than manual sh code like this.  i.e., write a
instead.  I don't think grepping -E output is a good idea.  Instead, you
can write a compile test that does something like:

#ifndef __LP64__
# error not lp64

and use its success/failure to decide.


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