This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cross compiling Newlib for ARM in Cygwin


Greetings,

If you carefully read the thread, you will notice how Schwarz is
attempting to cross compile newlib in a Cygwin environment exporting his
cross compiler under the CC variable then running the configure script
with no arguments.

Because the configure script assumes that the TARGET platform is the
same as the HOST platform (Cygwin on some variation of x86), and the
exported compiler builds for ARM systems, the configure script fails to
produce any meaningful results.

Yaakov's answer is correct in this context. The --target parameter must
be set to arm-none-eabi in the configure script for newlib. This is the
proper utilization of the parameter by anything that uses autotools.
With that said, the proper invocation of the script is:

../newlib-cygwin/configure --target=arm-none-eabi

The --host parameter is irrelevant in this context.

Cheers,
Orlando.

On 03/22/2016 03:04 PM, Mike Frysinger wrote:
> On 22 Mar 2016 12:35, Yaakov Selkowitz wrote:
>> On 2016-03-22 12:28, Mike Frysinger wrote:
>>> On 22 Mar 2016 10:47, Yaakov Selkowitz wrote:
>>>> On 2016-03-22 09:33, Schwarz, Konrad wrote:
>>>>> pardon my obtuseness: I'd like to build newlib for the arm-none-eabi target on a Cygwin host.
>>>>>
>>>>> I have a arm-none-eabi GCC and Binutils which was built for native Windows.
>>>>
>>>> Cygwin != native Windows.  If you want to use a Cygwin shell for
>>>> cross-compiling, then you'll want Cygwin-hosted cross-compilers.
>>>>
>>>>> I have downloaded newlib-cygwin in directory ./newlib-cygwin .  I create a directory ./newlib-cygwin-arm, and
>>>>>
>>>>> $ export CC=arm-none-eabi-gcc
>>>>> $ cd newlib-cygwin-arm
>>>>> $ ../newlib-cygwin/configure
>>>>
>>>> That is not how cross-compiling works.  Cross-compiler toolchains
>>>> (binutils/gcc/gdb/newlib) are built by configuring with the desired
>>>> --target.
>>>
>>> i think you mean --host
>>
>> No, I didn't.
> 
> looks like newlib is an aberration and uses --target when it should
> use --host.  probably due to being integrated w/binutils et al.
> -mike
> 

Attachment: signature.asc
Description: OpenPGP digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]