Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=513825
--- Comment #5 from Erik van Pienbroek <erik-fedora(a)vanpienbroek.nl> 2009-07-27
04:01:36 EDT ---
(In reply to comment #4)
[Warning: long comment ahead].
The naming however is crucial in this case. mingw32-pkg-config is not a
convenience for the user, like the configure/make scripts; it is a
host-specific tool that (only by virtue of pkg-config's configurability)
happens to share its executable with the native tool.
The key point is that it is not invoked by the user, rather it is meant to be
found by its clients' build system. The autotools were designed from the start
to support host-specific tools in a cross-compilation scenario <rant>*not* by
defining a zillion variables differently for each cross-compilation setup, but
rather</rant> just by naming the tools correctly and passing --host.
I'm starting to get your point. The mingw32-pkg-config tool should really be
renamed to i686-pc-mingw32-pkg-config so it can be found by ./configure scripts
without manually fiddling the environment variables. We can do such a change
without any side effects. However, if we want to use the sysroot part as
mentioned in bug 513826 we need to perform a complete rebuild of all mingw32
packages. Such a rebuild should be prepared by determining the order in which
packages need to be rebuild. In rawhide, the mass rebuild of all packages has
just been started this weekend so I don't know if it's okay to do such another
rebuild right now. Additionally, every package which produces .pc files needs
to manually 'fix' these to have the right sysroot set (which is more or less a
packaging guidelines adjustment).
Another issue I'm afraid of is that binaries compiled using Fedora's
i686-pc-mingw32-gcc can't be mixed with binaries compiled with MinGW's GCC
running in a wine environment (or that strange side-effects are introduced,
possible due to bugs in wine)
1) mingw32-make sets an HOST_CC variable. This is wrong, since it is
referring
to the *build* system and not the *host*, and should not be used for programs
that use an autoconf configure. The autotools were designed to support a three
system cross (build/host/target); the HOST_CC variable comes probably from the
Linux kernel and you don't care for Windows cross compilation.
I'm also having doubts whether the HOST_CC variable is really necessary.
Perhaps Richard can remember the reason why it was there in the first place?
2a) compiling everything with -Wp,-D_FORTIFY_SOURCE=2 is not in
general
something that should be done by a casual user. Some programs (it's their
fault, granted) stop working. It should be okay for a distribution in which
there is complete control on testing and a quality assurance process, but it
should not be passed automatically for the user.
I think of FORTIFY_SOURCE as an aid to detect bugs in libraries/programs. I
can't think of any reason why this feature should be dropped.
2b) Passing -fexceptions for the Windows C compiler is useless,
especially
before the MinGW compiler is switched to dwarf-2 exceptions. But in any case,
the MinGW runtime is not advanced enough (unlike glibc) to take any advantage
of -fexceptions.
We already have a bug open WRT exception handling in MinGW: 489100
I'm not familiar with exception handling in GCC so I refrain myself from
further comments on this.
2c) passing -mms-bitfields also has serious binary compatibility
problems.
Either gcc/config/i386/cygming.h should be patched in GCC to make this the
default, or it should not be passed.
IIRC, this parameter has became on by default in recent versions of GCC (I
don't have a link to confirm it right now).
3) the cache file was disabled for a reason in Autoconf 2.50 (ten
years ago
approx.). A developer has to remove manually the cache file whenever he
rebuilds the configure script. Keeping it is okay for RPM, but absolutely not
for a developer (and the nonstandard name mingw32-config.cache adds to the
confusion).
The cache file is only really needed for the glib2 package because some
./configure runtime checks are really required
4) passing the same variables twice (first to configure and then to
make) is
useless. That's why I said that even "mingw32-configure && make"
ought to be
enough.
Yeah, mingw32-make shouldn't be used by anything. mingw32-configure && make
should be enough for almost all cases
--
Configure bugmail:
https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.