With https://github.com/msys2/msys2-autobuild/commit/dc632d99340da8b204fa2d7
we can now override COMPRESSZST in autobuild, to use higher than default
compression when building packages for the repo.
This means we can revert the default COMPRESSZST back to the default
zstd compression level (3) and make packaging faster for development/CI
etc.
currently there is an issue with `crt-static` option being
uncontrollable for windows-gnu targets: . this behavour is bad because
libunwind.dll is linked by default for windows-gnullvm, but no gcc
dynamic libs are linked in case of windows-gnu. I tried to use
bootstrap.toml option, but it doesn't do what is expected.
this change should be temp before the issue is fixed. this flag can be
changed in case of package which has cc-libs as their dependency anyway.
I'll block some rust updates/additions before this is merged
it turns out makepkg already include ${MAKEPKG_CONF}.d/*.conf, which
results in the last alphabetically getting to set the variables. Rename
our directory without the .conf, so this pattern won't match it.
cmake for example doesn't use CPPFLAGS, so anything using cmake wont
get __USE_MINGW_ANSI_STDIO set, which is causing problems like
https://github.com/msys2/MINGW-packages/pull/21796
Instead move __USE_MINGW_ANSI_STDIO into CFLAGS and CXXFLAGS.
Uses "-Wp" because we already do that for _FORTIFY_SOURCE, not sure
if it helps with anything really, but why not.
See #4860
In case we have a git clone from Linux that is accessed via cygwin git
the files executable status will be derived from the file content (shebang)
and won't match the git repo, leading to a initially dirty tree.
This can be worked around by setting "core.filemode=false", but let's try
to match the cygwin permissions with the in-repo permissions so this isn't
needed.
This is motivated by https://github.com/msys2/MINGW-packages/pull/20591
where flang v18 stopped supporting the -pipe flag which is passed to
it via LDFLAGS. v17 still supported it and it's not clear where and when
it was changed exactly.
Let's remove it from LDFLAGS because:
* it's not clear if -pipe actually does anything for linking
(it's still passed via CFLAGS/CXXFLAGS)
* other distros like Arch/Gentoo also only add it to CFLAGS/CXXFLAGS
* of the above flang issue
There are many cases where the extra memory is helpful and
with the type of software we package this hopefully shouldn't
lead to any problems.
Fixes#3283
In case a package has a configure check for say -mssse3 and then
enables it if the compiler supports it it would be passed to the compiler
before our CFLAGS, which currently has -mno-ssse3 (which seems to also disable
sse4 and above while at it). The code then assumes it's available but the compiler
fails.
While one could argue that we try to prevent ssse3+ being used in packages, there
are always exceptions like building sse4 code which dynamically gets executed.
So it's better we only enable machine options in CFLAGS and never disable them
Replace "-march=core2 -mno-ssse3" with the equivalent "-march=nocona -msahf".
Note that the GCC docs wrongly state that "nocona" doesn't include "CX16", while it does.
See https://github.com/msys2/MINGW-packages/pull/13651