On 07/03/2012 04:28 AM, Adrian Smith wrote:
When I try to compile gcc using "-mcmodel=large" it fails with: configure: error: cannot compute suffix of object files: cannot compile. See `config.log' for more details. I have, however, successfully downloaded and compiled gcc without using the "-mcmodel=large" option. gcc compiles, and the resulting compiler compiles a simple "hello world" and the program runs successfully. Introducing the "-mcmodel=large" parameters into the CFLAGS_FOR_TARGET parameter in following command, however, causes it to fail: make \ BOOT_CFLAGS='-g -O2 -mcmodel=large' \ CFLAGS_FOR_TARGET='-g -O2 -mcmodel=large' \ bootstrap The "config.log" is identical between the successful and non-successful runs (attached). The stdout and stderr from the "make" command which fails is also attached. I am compiling gcc 4.7.1 on Ubuntu 10.10 x86-64. I would appreciate your help. The reason I am compiling gcc like this is I wish to use the "-mcmodel=large" option, as I have a (generated) program whose executable would be larger than 2GB. When I use the standard gcc supplied with my system, and use this option, the linker fails with errors like the following; I understand this means I need to recompile gcc itself using the option, please correct me if I am wrong about this. crtstuff.c:(.text+0x20): relocation truncated to fit: R_X86_64_32S against `.dtors' Thanks, Adrian --- Adrian Smith B.Sc. adrian.m.smith@xxxxxxxxx http://www.databasesandlife.com/
What happens if you use a normal (64-bit) gcc with option -mcmodel=medium ? -- Tim Prince