This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: mcmodel=large problem
- From: Zeng Bin <ezengbin at gmail dot com>
- To: Ian Lance Taylor <iant at google dot com>, gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Mon, 20 Feb 2012 11:49:11 -0500
- Subject: Re: mcmodel=large problem
- Authentication-results: mr.google.com; spf=pass (google.com: domain of ezengbin@gmail.com designates 10.50.153.234 as permitted sender) smtp.mail=ezengbin@gmail.com; dkim=pass header.i=ezengbin@gmail.com
- References: <CAFU2bD2emjchjwQkid-qQvB4=TTZzBp_4EhUO2NRnEA6oyjMYg@mail.gmail.com> <mcrwr7lzdql.fsf@dhcp-172-18-216-180.mtv.corp.google.com> <CAFU2bD201pPfL37VzR0r6jbiW+C-EcOVXYAKgcT9bwKf-uaX7A@mail.gmail.com> <mcr1uptxakx.fsf@dhcp-172-18-216-180.mtv.corp.google.com>
On Fri, Feb 17, 2012 at 7:13 PM, Ian Lance Taylor <iant@google.com> wrote:
> Zeng Bin <ezengbin@gmail.com> writes:
>
>> It reported the following error message during compilation:
>>
>> ../../../src/libgcc/config/libbid/bid_decimal_globals.c: In function
>> ‘__dfp_set_round’:
>> ../../../src/libgcc/config/libbid/bid_decimal_globals.c:34:1: error:
>> unrecognizable insn:
>> (call_insn/u 6 5 7 3 (parallel [
>> ? ? ? ? ? ? (set (reg:DI 0 ax)
>> ? ? ? ? ? ? ? ? (call:DI (mem:QI (symbol_ref:DI ("__tls_get_addr")) [0 S1
>> A8])
>> ? ? ? ? ? ? ? ? ? ? (const_int 0 [0])))
>> ? ? ? ? ? ? (unspec:DI [
>> ? ? ? ? ? ? ? ? ? ? (symbol_ref:DI ("__bid_IDEC_glbround") [flags 0x10]
>> <var_decl 0x2b9b4508f000 __bid_IDEC_glbround>)
>> ? ? ? ? ? ? ? ? ] UNSPEC_TLS_GD)
>> ? ? ? ? ]) ../../../src/libgcc/config/libbid/bid_decimal_globals.c:33 -1
>> ? ? ?(expr_list:REG_EH_REGION (const_int -2147483648 [0xffffffff80000000])
>> ? ? ? ? (nil))
>> ? ? (nil))
>> ../../../src/libgcc/config/libbid/bid_decimal_globals.c:34:1: internal
>> compiler error: in extract_insn, at recog.c:2109
>> Please submit a full bug report,
>
>
> This is a compiler bug. ?Please submit a bug report, as described at
> http://gcc.gnu.org/bugs. ?Thanks.
>
>
>> BTW, I am using Ubuntu with gcc-4.6.1. I am trying to compile gcc-4.6.2
>> with -mcmodel=large.
>
> Relatively few people use -mcmodel=large, because of the performance
> penalty. ?I suspect that it is not well-tested, hence this sort of
> problem.
>
> Another approach you can take to running a program at high addresses is
> to use -fPIE and -pie, which lets you move the program around in
> memory.
>
> Ian
Thanks a lot! The problem still exists even configured with -fPIE:
../src/configure --disable-multilib --with-multilib-list=m64
CFLAGS=-fPIE CFLAGS_FOR_TARGET=-mcmodel=large
--with-gmp=/home/bzeng/tools/gmp/gmp-5.0.4/install
--with-mpfr=/home/bzeng/tools/mpfr/mpfr-3.1.0/install
--with-mpc=/home/bzeng/tools/mpc/mpc-0.9/install
--prefix=/home/bzeng/tools/gcc/gcc-4.6.2/install-large
The error is still the same:
../../../src/libgcc/config/libbid/bid_decimal_globals.c: In function
‘__dfp_set_round’:
../../../src/libgcc/config/libbid/bid_decimal_globals.c:34:1: error:
unrecognizable insn:
(call_insn/u 6 5 7 3 (parallel [
(set (reg:DI 0 ax)
(call:DI (mem:QI (symbol_ref:DI ("__tls_get_addr")) [0 S1 A8])
(const_int 0 [0])))
(unspec:DI [
(symbol_ref:DI ("__bid_IDEC_glbround") [flags
0x10] <var_decl 0x2abaca167000 __bid_IDEC_glbround>)
] UNSPEC_TLS_GD)
]) ../../../src/libgcc/config/libbid/bid_decimal_globals.c:33 -1
(expr_list:REG_EH_REGION (const_int -2147483648 [0xffffffff80000000])
(nil))
(nil))
../../../src/libgcc/config/libbid/bid_decimal_globals.c:34:1: internal
compiler error: in extract_insn, at recog.c:2109
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[3]: *** [bid_decimal_globals.o] Error 1
make[2]: *** [all-stage1-target-libgcc] Error 2
make[1]: *** [stage1-bubble] Error 2
make: *** [all] Error 2
BTW, it is a ubuntu box running on a core2 processor. The native gcc
is gcc-4.6.1. Trying to compile gcc-4.6.2.
Thanks a lot.