This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: glibc compiled with mcmodel=large
- From: "Carlos O'Donell" <carlos at systemhalted dot org>
- To: Zeng Bin <ezengbin at gmail dot com>
- Cc: libc-help <libc-help at sourceware dot org>
- Date: Fri, 17 Feb 2012 17:43:03 -0500
- Subject: Re: glibc compiled with mcmodel=large
- Authentication-results: mr.google.com; spf=pass (google.com: domain of patofiero@gmail.com designates 10.236.165.1 as permitted sender) smtp.mail=patofiero@gmail.com; dkim=pass header.i=patofiero@gmail.com
- References: <CAFU2bD0a72geZObDUdxFkyjMRS_WPzscb8PB-gt6pjX7HT63bQ@mail.gmail.com>
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.