Re: [Mingw-w64-public] [PATCH 2/2] winstorecompat: Provide RtlAddFunctionTable on 64bits platforms only

2018-08-06 Thread Martin Storsjö

On Mon, 6 Aug 2018, Liu Hao wrote:


在 2018-08-06 01:38, Martin Storsjö 写道:

On Sun, 5 Aug 2018, NightStrike wrote:

On Wed, Jul 11, 2018, 1:20 PM Hugo Beauzée-Luyssen  
wrote:



On Wed, Jul 11, 2018, at 7:12 PM, Martin Storsjö wrote:
I originally wanted to do so but disliked the "iso C forbids empty
translation unit" warning, however if that's fine by you then I'll 
remove

the configure/makefile part!



Builds should be warning free, from all tools and all configurations. 
This

is a quality regression I'm seeing across the entire project.



I personally think the warning about empty translation units shouldn't 
be enabled, as it is included in `-Wpedantic` only, which shouldn't be 
turned on unless by some VERY pedantic people.


This warning can be silenced by putting an unused typedef in the TU:
```
typedef __attribute__((__unused__))
  int this_translation_unit_is_not_empty;
```


Yes, and in this particular case, I worked around it by moving the ifdef 
guards after the system headers, so the translation unit never really is 
empty.


The other warning I was referring to, that I would have deemed acceptable, 
only seems to be printed by macOS ar/ranlib, e.g. like this:


$ cat test.c
typedef int foo;
$ clang test.c -c -o test.o
$ ar rcs libtest.a test.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: 
file: libtest.a(test.o) has no symbols


That isn't even prefixed with "warning", just an extra verbose printout, 
and only in the macOS tools, not with GNU binutils.


// Martin
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [PATCH 2/2] winstorecompat: Provide RtlAddFunctionTable on 64bits platforms only

2018-08-05 Thread Liu Hao
在 2018-08-06 01:38, Martin Storsjö 写道:
> On Sun, 5 Aug 2018, NightStrike wrote:
> 
>> On Wed, Jul 11, 2018, 1:20 PM Hugo Beauzée-Luyssen  
>> wrote:
>>
>>> On Wed, Jul 11, 2018, at 7:12 PM, Martin Storsjö wrote:
>>> I originally wanted to do so but disliked the "iso C forbids empty
>>> translation unit" warning, however if that's fine by you then I'll 
>>> remove
>>> the configure/makefile part!
>>>
>>
>> Builds should be warning free, from all tools and all configurations. 
>> This
>> is a quality regression I'm seeing across the entire project.
> 
> 
I personally think the warning about empty translation units shouldn't 
be enabled, as it is included in `-Wpedantic` only, which shouldn't be 
turned on unless by some VERY pedantic people.

This warning can be silenced by putting an unused typedef in the TU:
```
typedef __attribute__((__unused__))
   int this_translation_unit_is_not_empty;
```


-- 
Best regards,
LH_Mouse
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [PATCH 2/2] winstorecompat: Provide RtlAddFunctionTable on 64bits platforms only

2018-08-05 Thread Martin Storsjö

On Sun, 5 Aug 2018, NightStrike wrote:


On Wed, Jul 11, 2018, 1:20 PM Hugo Beauzée-Luyssen  wrote:


On Wed, Jul 11, 2018, at 7:12 PM, Martin Storsjö wrote:
> On Wed, 11 Jul 2018, Hugo Beauzée-Luyssen wrote:
>
> > RtlAddFunctionTable is only available on those. Moreover, so are the
> > (P)RUNTIME_FUNCTION types
>
> No, it's available for armv7 as well (I just checked the msvc import
> libs). So the correct logic probably is "HAVE_NON_I386" or something
like
> that. (We have a corresponding macro F_NON_I386 for .def files.)
>

Ok, I'll send an updated version :)

> Also, to keep things simple, you could skip the build system part and
just
> use an ifdef in the source file; ar usually gives a small warning for
> object files without symbols, but it shouldn't hurt much imo. But I
won't
> object to that part if you really want to have the condition in the
> makefile.
>

I originally wanted to do so but disliked the "iso C forbids empty
translation unit" warning, however if that's fine by you then I'll remove
the configure/makefile part!



Builds should be warning free, from all tools and all configurations. This
is a quality regression I'm seeing across the entire project.


The version actually committed was warning free - in particular, I changed 
Hugo's patch to get rid of that warning he mentioned (it was trivial to do 
so), and ar didn't produce the warning I thought it might.


I do generally try to make sure that all my changes add no warnings.

// Martin
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [PATCH 2/2] winstorecompat: Provide RtlAddFunctionTable on 64bits platforms only

2018-07-11 Thread Hugo Beauzée-Luyssen
On Wed, Jul 11, 2018, at 7:12 PM, Martin Storsjö wrote:
> On Wed, 11 Jul 2018, Hugo Beauzée-Luyssen wrote:
> 
> > RtlAddFunctionTable is only available on those. Moreover, so are the
> > (P)RUNTIME_FUNCTION types
> 
> No, it's available for armv7 as well (I just checked the msvc import 
> libs). So the correct logic probably is "HAVE_NON_I386" or something like 
> that. (We have a corresponding macro F_NON_I386 for .def files.)
> 

Ok, I'll send an updated version :)

> Also, to keep things simple, you could skip the build system part and just 
> use an ifdef in the source file; ar usually gives a small warning for 
> object files without symbols, but it shouldn't hurt much imo. But I won't 
> object to that part if you really want to have the condition in the 
> makefile.
> 

I originally wanted to do so but disliked the "iso C forbids empty translation 
unit" warning, however if that's fine by you then I'll remove the 
configure/makefile part!

Thanks,

-- 
  Hugo Beauzée-Luyssen
  h...@beauzee.fr

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [PATCH 2/2] winstorecompat: Provide RtlAddFunctionTable on 64bits platforms only

2018-07-11 Thread Martin Storsjö

On Wed, 11 Jul 2018, Hugo Beauzée-Luyssen wrote:


RtlAddFunctionTable is only available on those. Moreover, so are the
(P)RUNTIME_FUNCTION types


No, it's available for armv7 as well (I just checked the msvc import 
libs). So the correct logic probably is "HAVE_NON_I386" or something like 
that. (We have a corresponding macro F_NON_I386 for .def files.)


Also, to keep things simple, you could skip the build system part and just 
use an ifdef in the source file; ar usually gives a small warning for 
object files without symbols, but it shouldn't hurt much imo. But I won't 
object to that part if you really want to have the condition in the 
makefile.


// Martin
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [PATCH 2/2] winstorecompat: Provide RtlAddFunctionTable on 64bits platforms only

2018-07-11 Thread JonY via Mingw-w64-public
On 07/11/2018 12:06 PM, Hugo Beauzée-Luyssen wrote:
> RtlAddFunctionTable is only available on those. Moreover, so are the
> (P)RUNTIME_FUNCTION types

Patches OK.



signature.asc
Description: OpenPGP digital signature
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public