Relocatable linking with relocations from format elf64-x86-64-freebsd (crt1_s.o) to format elf32-i386-freebsd (gcrt1.o) is not supported

Dimitry Andric dim at FreeBSD.org
Tue Aug 23 09:34:13 UTC 2011


On 2011-08-23 11:23, Alexander Best wrote:
...
>> The patch fixes this by adding "-ECC -ECXX -EAS -ELD" to the build32
>> sub-make invocation, which forces those environment variables to always
>> override any assignment in makefiles.
>>
>> It makes it possible to simply do:
>>
>> CC=clang
>> CXX=clang++
>>
>> in your make.conf, or specify a path, even:
>>
>> CC=/usr/local/bin/gcc46
>> CXX=/usr/local/bin/g++46
>>
>> Note this was already possible on i386, but not yet on amd64.  Also,
>> strange things might happen if you set CC but not CXX, or vice versa...
>
> any chance this patch can be committed?

I hope so, but it needs to be reviewed by one or more senior build
gurus, before it makes a chance (if any) to get into 9.0-R.

It's really just a band-aid now.  Obviously, the whole way Makefile.inc1
sets up CC to run the build32 stage should be overhauled, and as Warner
said, we really need a (SYSTEM|WORLD|PORTS)_COMPILER global switch
(instead of manually setting CC), but that kind of restructuring must be
done after the tree is unfrozen, not now.


More information about the freebsd-toolchain mailing list