- Don't turn off warnings for winelib builds, fix them. Using __declspec on winelib builds just doesn't make sense.
- Drop the custom cross property 'winelib'. Detect it instead.
- Move the libdl dependency to the build system
- Don't run wine during mingw build process. Same as for wine builds, see 715d2571
GCC produces a lot of warnings about ignored dllimport/dllexport attributes.
Detecting real problems from build output will be easier with this warnings turned off.
`man winegcc`
> The dllimport/dllexport attributes are not supported at the moment,
> due to lack of support for these features in the ELF version of gcc.
`man gcc`
> -Wno-attributes
> Do not warn if an unexpected "__attribute__" is used,
> such as unrecognized attributes, function attributes applied to variables, etc.
> This does not stop errors for incorrect use of supported attributes.