glibc compiled with mcmodel=large

Carlos O'Donell carlos@systemhalted.org
Fri Feb 17 22:43:00 GMT 2012


On Fri, Feb 17, 2012 at 4:19 PM, Zeng Bin <ezengbin@gmail.com> wrote:
> Hi all,
>
> I am really stumped on this problem. I have been trying to compile
> glibc-2.14 with mcmodel=large on.
>
> glibc-2.14 is configured like this:
> ../src/configure
> --prefix=/home/bzeng/tools/glibc/glibc-2.14-git/install/
> CFLAGS="-mcmodel=large -O2 -U_FORTIFY_SOURCE" -enable-add-ons
> --without-selinux --disable-profile
>
> During the make, it reported this error:
>
> ../sysdeps/x86_64/multiarch/init-arch.c: In function ‘__init_cpu_features’:
> ../sysdeps/x86_64/multiarch/init-arch.c:53:3: error: inconsistent
> operand constraints in an ‘asm’
> ../sysdeps/x86_64/multiarch/init-arch.c:32:3: error: inconsistent
> operand constraints in an ‘asm’
> ../sysdeps/x86_64/multiarch/init-arch.c:32:3: error: inconsistent
> operand constraints in an ‘asm’
> make[2]: *** [/home/bzeng/tools/glibc/glibc-2.14-git/build/csu/init-arch.os]
> Error 1
> make[2]: Leaving directory `/home/bzeng/tools/glibc/glibc-2.14-git/src/csu'
> make[1]: *** [csu/subdir_lib] Error 2
> make[1]: Leaving directory `/home/bzeng/tools/glibc/glibc-2.14-git/src'
> make: *** [all] Error 2
>
> Did anyone compile glibc with -mcmodel=large on? Any suggestion would
> be appreciated. Also, if there is a distro compiled with
> -mcmodel=large, would you please point me  to the right link?

I don't know of any distro that builds with -mcmodel=large.

Your best bet is to look at the pre-processed code by re-running the
failed compile with -E and -save-temps.

Remove the #line markers and recompile to get sensible line numbers on errors.

Then with the sensible line numbers track down the offending assembly
and try to understand why the compiler thinks it's wrong.

You might genuinely be hitting a compiler bug.

Cheers,
Carlos.



More information about the Libc-help mailing list