Hi Guillem, On Sat, Aug 11, 2012 at 03:34:07PM +0200, Stephen Kitt wrote: > On Wed, 8 Aug 2012 13:01:03 +0200, Guillem Jover <guil...@debian.org> wrote: > > Sorry, I thought I had replied but it appears that was not the case, > > it was on my radar to come back to it anyway, thanks for the reminder. > > > > The main issue I have with this request is that the upstream triplet just > > seems wrong, as it encodes part of the ABI in the vendor field. That's > > AFAIR, from reading the thread back then. > > > > For dpkg tools the vendor is irrelevant, and having to take it into > > account would imply changing the underlaying infrastructure which > > might not be a problem per se, if the reason for requiring this wan't > > wrong. > > I take it you're referring to the "w64" portion, differenciating MinGW-w64 > from MinGW? I've been using the attached patch (which I'll explain further > down...) with pretty good results; what would break in dpkg if we wanted > correct support for the vendor? Currently I can specify "mingw64-x86" as an > architecture; wouldn't it be possible to have a "mingw-x86" architecture, > with the appropriate entries in triplettable and ostable, for MinGW support > without any other changes? > > > I'm not sure if it's too late now to consider changing the triplet > > upstream, I should probable have brought this up long time ago, but > > then it seemed to be pretty settled down already. :/ > > I think it is too late, everyone else (MinGW-w64, the many projects using > it, and the various other distributions supporting it) has already switched > to it. > > > OTOH, is dpkg buildable and usable at all on mingw-w64 systems? I > > understand though that there might be reasons to want the architecture > > supported so that cross-building is allowed, but then the request does > > not seem pressing, and that's one of the reasons I've not acted on it > > before. > > As Dmitrijs explained in his reply, all the MinGW-w64 stuff in Debian is > likely to only ever support cross-compilation, not end up being a full > architecture hosted on Windows. The main reason to have the support in dpkg > is to start building the infrastructure required for a partial architecture, > so we can more easily provide libraries etc. (see for example > http://bugs.debian.org/671437).
Is there any chance the attached version could go in? It's against current git, minus the previous changes to cputable which were wrong. Now that Debian is increasingly cross-buildable, and with sbuild and cross-build-essential providing an excellent environment to work in, it would be great to have mingw-w64 support in dpkg... Unless you have objections of course! Regards, Stephen
diff --git a/ostable b/ostable index 29d3843..8cc709b 100644 --- a/ostable +++ b/ostable @@ -36,3 +36,4 @@ sysv-solaris solaris solaris[^-]* uclibceabi-uclinux uclinux-uclibceabi uclinux[^-]*-uclibceabi uclibc-uclinux uclinux-uclibc uclinux[^-]*(-uclibc.*)? tos-mint mint mint[^-]* +mingw64-windows w64-mingw32 w64-mingw32[^-]* diff --git a/scripts/Dpkg/Vendor/Debian.pm b/scripts/Dpkg/Vendor/Debian.pm index e1a6b0c..3bc568c 100644 --- a/scripts/Dpkg/Vendor/Debian.pm +++ b/scripts/Dpkg/Vendor/Debian.pm @@ -122,15 +122,17 @@ sub add_hardening_flags { # (#574716). $use_feature{pie} = 0; } - if ($cpu =~ /^(ia64|alpha|mips|mipsel|hppa|arm64)$/ or $arch eq 'arm') { + if ($cpu =~ /^(ia64|alpha|mips|mipsel|hppa|arm64)$/ or $arch eq 'arm' or $os eq 'windows') { # Stack protector disabled on ia64, alpha, arm64, mips, mipsel, hppa. # "warning: -fstack-protector not supported for this target" # Stack protector disabled on arm (ok on armel). # compiler supports it incorrectly (leads to SEGV) + # Stack protector disabled on Windows (requires glibc). $use_feature{stackprotector} = 0; } - if ($cpu =~ /^(ia64|hppa|avr32)$/) { + if ($cpu =~ /^(ia64|hppa|avr32)$/ or $os eq 'windows') { # relro not implemented on ia64, hppa, avr32. + # relro not implemented on Windows. $use_feature{relro} = 0; } diff --git a/triplettable b/triplettable index a2c683f..c66964e 100644 --- a/triplettable +++ b/triplettable @@ -29,3 +29,4 @@ sysv-solaris-<cpu> solaris-<cpu> uclibceabi-uclinux-arm uclinux-armel uclibc-uclinux-<cpu> uclinux-<cpu> tos-mint-m68k mint-m68k +mingw64-windows-<cpu> mingw64-<cpu>
signature.asc
Description: Digital signature