bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unable to cross build for Windows


From: Torbjorn SVENSSON
Subject: Re: Unable to cross build for Windows
Date: Thu, 8 Jun 2023 16:19:04 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1



On 2023-06-08 16:14, Eli Zaretskii wrote:
Date: Thu, 8 Jun 2023 14:44:35 +0200
From: Torbjorn SVENSSON <torbjorn.svensson@foss.st.com>

/build/gnu-make_4.4.1-45-g07fcee35/src/function.c: In function 
'windows32_openpipe':
/build/gnu-make_4.4.1-45-g07fcee35/src/function.c:1676:12: error: cast from 
function call of type 'intptr_t {aka long long int}' to non-matching type 'void 
*' [-Werror=bad-function-cast]
     tmpErr = (HANDLE)_get_osfhandle (errfd);
              ^


/build/gnu-make_4.4.1-45-g07fcee35/src/job.c: In function 'create_batch_file':
/build/gnu-make_4.4.1-45-g07fcee35/src/job.c:365:3: error: format not a string 
literal and no format arguments [-Werror=format-security]
     O (fatal, NILF, error_string);
     ^


On the MSDN page for _get_osfhandle, they recommend to case the return value
to HANDLE, but GCC apparently thinks this is not allowed.
Any idea on how to get around this issue?


For the O()-macro; is it correct to use the macro with a variable?
Maybe it's more appropriate to fall fatal directly with the arguments?

Is this with x86_64 being the target or i686?  I'm guessing the
latter, since for 64-bit Windows 'long long' and 'void *' are of the
same width.  If it's indeed for i686, are you sure the MinGW64 headers
you have support 32-bit builds?  Because AFAIR MinGW64 tossed
supported for old Windows versions, which basically means they don't
support 32-bit Windows.

The idea is to have a 64-bit make application. I just included the i686
log for completeness.

If I can get a build going for x86_64-w64-mingw32, I would be okay with
ignoring whatever problems that are unique to the i686-w64-mingw32 target.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]