2014-11-03 16:45 GMT+01:00 Baruch Burstein <bmburst...@gmail.com>:

> On Mon, Nov 3, 2014 at 2:37 PM, Ruben Van Boxem <vanboxem.ru...@gmail.com>
> wrote:
>
>> 2014-11-03 10:30 GMT+01:00 Baruch Burstein <bmburst...@gmail.com>:
>>
>>> I am curious why only a few of the executables get prefixed versions? I
>>> just tried running a certain makefile with prefixed versions of the
>>> toolchain, and it failed looking for the prefixed versions of 'ar' and
>>> 'windres'. Easily solvable (make a copy and prefix it), but I am still
>>> curious why some get it by default while others don't?
>>>
>>
>> Because this is a native toolchain. Native toolchains don't have
>> everything prefixed. Your makefile shouldn't be using any prefixes, and
>> just call the bare "gcc" etc. instead.
>>
>
> a. Then why are some prefixed?
>

That's the whole GCC/binutils/autotools ecosystem that does that and uses
that. Don't ask me for the reasons, I did not write the tools way back when.



> b. Is there another way to determine in the makefile if compiling for x64
> or x32 without using the compiler executable name?
>

First, a makefile shouldn't care if it's building for 32 or 64-bit. That is
a distinction you'd want to make at the code-level, if you need to make it
at all.
If you want to be able to cross-compile, a good way is to have the makefile
"accept an option" like CROSS_PREFIX, which could be "i686-w64-mingw32-",
and passed in like:
make CROSS_PREFIX=i686-w64-mingw32-

And prefixing all calls to the tools with this prefix. For native
toolchains, just "make" with an empty CROSS_PREFIX would work.


Cheers,

Ruben
------------------------------------------------------------------------------
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to