Tuesday, September 25, 2018

Re: Problem building GCC 8.2.0 amd64-to-i386 cross-compiler

That was it - thank you. My GCC cross-compiler now works.

—Katherine

> On Sep 25, 2018, at 8:25 AM, Todd C. Miller <Todd.Miller@sudo.ws> wrote:
>
>> On Mon, 24 Sep 2018 23:43:20 -0400, Katherine Rohl wrote:
>>
>> I need to build a GCC cross-compiler targeting i386-pc-elf. I'm running
>> into problems with the build on OpenBSD 6.3.
>>
>> I've already successfully built a binutils-2.31.1 for i386-pc-elf.
>>
>> Trying to use the GCC 4.9.4 package (as GCC 4.2 is too old to build GCC
>> 8), my configure is:
>>
>> CC=egcc CXX=eg++ ../gcc-8.2.0/configure --prefix=/usr/local/gcc-i386
>> --target=i386-pc-elf --with-gmp=/usr/local
>
> You might need to disable PIE when building gcc. Try setting
> "CFLAGS=-fno-pie -g -O2" and "LDFLAGS=-nopie" when running configure
> and see if that helps.
>
> - todd

No comments:

Post a Comment