View Issue Details

IDProjectCategoryView StatusLast Update
0005180CentOS-6-OTHERpublic2011-11-17 18:27
Reporterepienbro 
PrioritynormalSeverityfeatureReproducibilityN/A
Status acknowledgedResolutionopen 
Product Version6.1 
Target VersionFixed in Version 
Summary0005180: Bootstrap mingw32 packages
DescriptionHi,

I just noticed that the CR repo at http://mirror.centos.org/centos/6/cr/x86_64/RPMS/ lacks various mingw32-* packages which are part of rhel6.1 (like mingw32-gcc and mingw32-glib2). The only packages which are there right now are mingw32-binutils and mingw32-filesystem. This gives me the impression that you didn't succeed in getting the mingw32 toolchain bootstrapped yet. As I am a member of the Fedora MinGW SIG (http://fedoraproject.org/wiki/MinGW) and one of the people who created and maintained these packages in Fedora I'm willing to give you a helping hand in getting the mingw32 toolchain bootstrapped and sort out any issues that you may have with it.

The packages which belong to the base mingw32 toolchain are mingw32-filesystem, mingw32-binutils, mingw32-runtime, mingw32-w32api, mingw32-gcc and mingw32-pthreads. Once these packages are built correctly the toolchain will be self-hosting and all other mingw32 packages can be built with it.

There are two possible methods to get the mingw32 toolchain bootstrapped. One is by using binaries from an external source (like Fedora), but another possibility is by performing a complete bootstrap from scratch.

I will now give you instructions how to get the mingw32 toolchain bootstrapped from scratch.

First thing to note is that the package redhat-rpm-config needs to be installed in the buildroot (it is in a default mock buildroot). If this package isn't installed then the static libraries created by the toolchain will be corrupt.

You already managed to get the mingw32-filesystem and mingw32-binutils compiled, so I'll start explaining the bootstrap procedure from that point on. The bootstrap procedure contains of 9 steps. At the end of these steps you should have the mingw32 toolchain srpms as provided by upstream built successfully without any patching. Here goes:

#####################
# 0. Upstream srpms #
#####################

The list of upstream mingw32 srpms which I will use in this instruction are:
ftp://ftp.redhat.com/pub/redhat/linux/enterprise/6Server/en/os/SRPMS/mingw32-gcc-4.4.2-3.el6.1.src.rpm
ftp://ftp.redhat.com/pub/redhat/linux/enterprise/6Server/en/os/SRPMS/mingw32-runtime-3.18-1.el6.1.src.rpm
ftp://ftp.redhat.com/pub/redhat/linux/enterprise/6Server/en/os/SRPMS/mingw32-w32api-3.14-1.el6.5.src.rpm
ftp://ftp.redhat.com/pub/redhat/linux/enterprise/6Server/en/os/SRPMS/mingw32-pthreads-2.8.0-10.el6.6.src.rpm

##########################
# 1. Build a minimal GCC #
##########################

The mingw32-runtime and mingw32-w32api need a minimal GCC available to build the base libraries, so we need to build a minimal GCC first.

Install mingw32-gcc-4.4.2-3.el6.1.src.rpm in a local environment and apply mingw32-gcc-minimal-gcc.patch to the .spec file. Now create a new srpm for it and build it. Also make it available in the buildroot

#######################################
# 2. Build the runtime (headers only) #
#######################################

Normally we should install the headers first before we can create the crt libraries, but unfortunately some pieces of the mingw32-w32api package depend on headers which are provided by the mingw32-runtime package. So we need to get those headers available first.

Install mingw32-runtime-3.18-1.el6.1.src.rpm in a local environment and apply mingw32-runtime-only-install-headers.patch to the .spec file. Now create a new srpm for it and build it. Also make it available in the buildroot

#########################################################
# 3. Build the w32api (with a bootstrap-specific patch) #
#########################################################

The w32api package can now be built. Unfortunately there's a bug in the upstream tarball which causes compilation to fail on clean environments as it tries to look for a header provided by this package in the wrong path.

Install mingw32-w32api-3.14-1.el6.5.src.rpm in a local environment and apply mingw32-w32api-look-for-header-in-correct-path.patch to the .spec file. Also make w32api-fix-bootstrap.patch available in the SOURCES folder. Now create a new srpm for it and build it. Also make it available in the buildroot

###############################################
# 4. Build the runtime (without mingwm10.dll) #
###############################################

Now that all headers are in the correct place we can build the runtime. However, as we're still using a minimal gcc we can't build shared libraries (.DLL's) yet. So some more patching will be required for now.

Install mingw32-runtime-3.18-1.el6.1.src.rpm in a local environment (the old files can be overwritten) and apply mingw32-runtime-dont-build-mingw10-dll.patch to the .spec file. Also make the file runtime-fix-bootstrap.patch available in the SOURCES folder. Now create a new srpm for it and build it. Also make it available in the buildroot

##################################
# 5. Build GCC (without libgomp) #
##################################

We're now ready to build a regular gcc. However, the mingw32-gcc package as provided by upstream depends on mingw32-pthreads (for libgomp support). So we need to temporary disable libgomp support until mingw32-pthreads is built correctly.

Install mingw32-gcc-4.4.2-3.el6.1.src.rpm in a local environment (the old files can be overwritten) and apply mingw32-gcc-without-libgomp.patch to the .spec file. Now create a new srpm for it and build it. Also make it available in the buildroot

###################################
# 6. Build the w32api (complete) #
###################################

With a complete gcc it's now possible to build the mingw32-w32api package without any patching. Just build mingw32-w32api-3.14-1.el6.5.src.rpm and make it available in the buildroot

###################################
# 7. Build the runtime (complete) #
###################################

The mingw32-runtime package can now also be built without any patching. Just build mingw32-runtime-3.18-1.el6.1.src.rpm and make it available in the buildroot

#####################
# 8. Build pthreads #
#####################

As mentioned earlier in step 5 libgomp support in gcc depends on mingw32-pthreads. Now that we've got a complete gcc we can build the package mingw32-pthreads-2.8.0-10.el6.6.src.rpm without any patching

###########################
# 9. Build GCC (complete) #
###########################

With all pieces ready libgomp support in gcc can now be activated. Just build the package mingw32-gcc-4.4.2-3.el6.1.src.rpm without any patching


Congratulations! you've now got a working mingw32 toolchain and are ready to build the remaining mingw32 packages which are provided by upstream!

If you've got any questions about this bootstrap procedure or the mingw32 packages in general feel free to ping me here or on IRC
TagsNo tags attached.

Activities

epienbro

epienbro

2011-10-08 22:46

reporter  

mingw32-gcc-minimal-gcc.patch (5,911 bytes)
--- mingw32-gcc.spec.good	2011-10-08 17:55:52.245032242 +0200
+++ mingw32-gcc.spec	2011-10-08 18:46:32.109949340 +0200
@@ -5,7 +5,7 @@
 
 Name:           mingw32-gcc
 Version:        4.4.2
-Release:        3%{?dist}.1
+Release:        1%{?dist}.1
 Summary:        MinGW Windows cross-compiler (GCC) for C
 
 License:        GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions
@@ -45,9 +45,9 @@
 BuildRequires:  mingw32-filesystem >= 49
 # Need mingw32-binutils which support %gnu_unique_object >= 2.19.51.0.14
 BuildRequires:  mingw32-binutils >= 2.19.51.0.14
-BuildRequires:  mingw32-runtime
-BuildRequires:  mingw32-w32api
-BuildRequires:  mingw32-pthreads
+#BuildRequires:  mingw32-runtime
+#BuildRequires:  mingw32-w32api
+#BuildRequires:  mingw32-pthreads
 BuildRequires:  gmp-devel
 BuildRequires:  mpfr-devel
 BuildRequires:  libgomp
@@ -57,12 +57,12 @@
 Requires:       mingw32-filesystem >= 48
 # Need mingw32-binutils which support %gnu_unique_object
 Requires:       mingw32-binutils >= 2.19.51.0.14
-Requires:       mingw32-runtime
-Requires:       mingw32-w32api
+#Requires:       mingw32-runtime
+#Requires:       mingw32-w32api
 Requires:       mingw32-cpp
 # libgomp dll is linked with pthreads, but since we don't run the
 # automatic dependency scripts, it doesn't get picked up automatically.
-Requires:       mingw32-pthreads
+#Requires:       mingw32-pthreads
 
 # We don't run the automatic dependency scripts which would
 # normally detect and provide the following DLL:
@@ -177,7 +177,7 @@
   --enable-languages="$languages" \
   --with-bugurl=http://bugzilla.redhat.com/bugzilla
 
-make %{?_smp_mflags} all
+make %{?_smp_mflags} all-gcc
 
 popd
 
@@ -186,7 +186,7 @@
 rm -rf $RPM_BUILD_ROOT
 
 pushd build
-make DESTDIR=$RPM_BUILD_ROOT install
+make DESTDIR=$RPM_BUILD_ROOT install-gcc
 
 # These files conflict with existing installed files.
 rm -rf $RPM_BUILD_ROOT%{_infodir}
@@ -199,12 +199,12 @@
 
 # Not sure why gcc puts this DLL into _bindir, but surely better if
 # it goes into _mingw32_bindir.
-mkdir -p $RPM_BUILD_ROOT%{_mingw32_bindir}
-mv $RPM_BUILD_ROOT%{_bindir}/libgcc_s_sjlj-1.dll \
-  $RPM_BUILD_ROOT%{_mingw32_bindir}
+#mkdir -p $RPM_BUILD_ROOT%{_mingw32_bindir}
+#mv $RPM_BUILD_ROOT%{_bindir}/libgcc_s_sjlj-1.dll \
+#  $RPM_BUILD_ROOT%{_mingw32_bindir}
 # Same goes for this DLL under _libdir.
-mv $RPM_BUILD_ROOT%{_libdir}/gcc/i686-pc-mingw32/bin/libgomp-1.dll \
-  $RPM_BUILD_ROOT%{_mingw32_bindir}
+#mv $RPM_BUILD_ROOT%{_libdir}/gcc/i686-pc-mingw32/bin/libgomp-1.dll \
+#  $RPM_BUILD_ROOT%{_mingw32_bindir}
 
 # Don't want the *.la files.
 find $RPM_BUILD_ROOT -name '*.la' -delete
@@ -222,37 +222,17 @@
 %{_bindir}/i686-pc-mingw32-gcc-%{version}
 %{_bindir}/i686-pc-mingw32-gccbug
 %{_bindir}/i686-pc-mingw32-gcov
-%{_prefix}/i686-pc-mingw32/lib/libiberty.a
 %dir %{_libdir}/gcc/i686-pc-mingw32
 %dir %{_libdir}/gcc/i686-pc-mingw32/%{version}
-%{_libdir}/gcc/i686-pc-mingw32/%{version}/crtbegin.o
-%{_libdir}/gcc/i686-pc-mingw32/%{version}/crtend.o
-%{_libdir}/gcc/i686-pc-mingw32/%{version}/crtfastmath.o
-%{_libdir}/gcc/i686-pc-mingw32/%{version}/libgcc.a
-%{_libdir}/gcc/i686-pc-mingw32/%{version}/libgcc_eh.a
-%{_libdir}/gcc/i686-pc-mingw32/%{version}/libgcc_s.a
-%{_libdir}/gcc/i686-pc-mingw32/%{version}/libgcov.a
-%{_libdir}/gcc/i686-pc-mingw32/%{version}/libgomp.a
-%{_libdir}/gcc/i686-pc-mingw32/%{version}/libgomp.dll.a
-%{_libdir}/gcc/i686-pc-mingw32/%{version}/libgomp.spec
-%{_libdir}/gcc/i686-pc-mingw32/%{version}/libssp.a
-%{_libdir}/gcc/i686-pc-mingw32/%{version}/libssp_nonshared.a
-%{_libdir}/gcc/i686-pc-mingw32/%{version}/libssp.dll.a
 %dir %{_libdir}/gcc/i686-pc-mingw32/%{version}/include
 %dir %{_libdir}/gcc/i686-pc-mingw32/%{version}/include-fixed
-%dir %{_libdir}/gcc/i686-pc-mingw32/%{version}/include/ssp
 %{_libdir}/gcc/i686-pc-mingw32/%{version}/include-fixed/README
 %{_libdir}/gcc/i686-pc-mingw32/%{version}/include-fixed/*.h
 %{_libdir}/gcc/i686-pc-mingw32/%{version}/include/*.h
-%{_libdir}/gcc/i686-pc-mingw32/%{version}/include/ssp/*.h
 %dir %{_libdir}/gcc/i686-pc-mingw32/%{version}/install-tools
 %{_libdir}/gcc/i686-pc-mingw32/%{version}/install-tools/*
-%dir %{_libdir}/gcc/i686-pc-mingw32/bin/
-%{_libdir}/gcc/i686-pc-mingw32/bin/libssp-0.dll
 %dir %{_libexecdir}/gcc/i686-pc-mingw32/%{version}/install-tools
 %{_libexecdir}/gcc/i686-pc-mingw32/%{version}/install-tools/*
-%{_mingw32_bindir}/libgcc_s_sjlj-1.dll
-%{_mingw32_bindir}/libgomp-1.dll
 %{_mandir}/man1/i686-pc-mingw32-gcc.1*
 %{_mandir}/man1/i686-pc-mingw32-gcov.1*
 
@@ -269,40 +249,19 @@
 
 %files c++
 %defattr(-,root,root,-)
-%{_bindir}/i686-pc-mingw32-g++
-%{_bindir}/i686-pc-mingw32-c++
-%{_mandir}/man1/i686-pc-mingw32-g++.1*
-%{_libdir}/gcc/i686-pc-mingw32/%{version}/include/c++/
-%{_libdir}/gcc/i686-pc-mingw32/%{version}/libstdc++.a
-%{_libdir}/gcc/i686-pc-mingw32/%{version}/libsupc++.a
-%{_libexecdir}/gcc/i686-pc-mingw32/%{version}/cc1plus
 %{_libexecdir}/gcc/i686-pc-mingw32/%{version}/collect2
 
 
 %files objc
 %defattr(-,root,root,-)
-%{_libdir}/gcc/i686-pc-mingw32/%{version}/include/objc/
-%{_libdir}/gcc/i686-pc-mingw32/%{version}/libobjc.a
-%{_libexecdir}/gcc/i686-pc-mingw32/%{version}/cc1obj
 
 
 %files objc++
 %defattr(-,root,root,-)
-%{_libexecdir}/gcc/i686-pc-mingw32/%{version}/cc1objplus
 
 
 %files gfortran
 %defattr(-,root,root,-)
-%{_bindir}/i686-pc-mingw32-gfortran
-%{_mandir}/man1/i686-pc-mingw32-gfortran.1*
-%{_libdir}/gcc/i686-pc-mingw32/%{version}/libgfortran.a
-%{_libdir}/gcc/i686-pc-mingw32/%{version}/libgfortranbegin.a
-%dir %{_libdir}/gcc/i686-pc-mingw32/%{version}/finclude
-%{_libdir}/gcc/i686-pc-mingw32/%{version}/finclude/omp_lib.f90
-%{_libdir}/gcc/i686-pc-mingw32/%{version}/finclude/omp_lib.h
-%{_libdir}/gcc/i686-pc-mingw32/%{version}/finclude/omp_lib.mod
-%{_libdir}/gcc/i686-pc-mingw32/%{version}/finclude/omp_lib_kinds.mod
-%{_libexecdir}/gcc/i686-pc-mingw32/%{version}/f951
 
 
 %changelog
epienbro

epienbro

2011-10-08 22:46

reporter  

mingw32-gcc-without-libgomp.patch (3,514 bytes)
--- mingw32-gcc.spec.good	2011-10-08 17:55:52.245032242 +0200
+++ mingw32-gcc.spec	2011-10-08 22:09:30.404032857 +0200
@@ -5,7 +5,7 @@
 
 Name:           mingw32-gcc
 Version:        4.4.2
-Release:        3%{?dist}.1
+Release:        2%{?dist}.1
 Summary:        MinGW Windows cross-compiler (GCC) for C
 
 License:        GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions
@@ -47,7 +47,7 @@
 BuildRequires:  mingw32-binutils >= 2.19.51.0.14
 BuildRequires:  mingw32-runtime
 BuildRequires:  mingw32-w32api
-BuildRequires:  mingw32-pthreads
+#BuildRequires:  mingw32-pthreads
 BuildRequires:  gmp-devel
 BuildRequires:  mpfr-devel
 BuildRequires:  libgomp
@@ -62,7 +62,7 @@
 Requires:       mingw32-cpp
 # libgomp dll is linked with pthreads, but since we don't run the
 # automatic dependency scripts, it doesn't get picked up automatically.
-Requires:       mingw32-pthreads
+#Requires:       mingw32-pthreads
 
 # We don't run the automatic dependency scripts which would
 # normally detect and provide the following DLL:
@@ -168,7 +168,6 @@
   --with-gnu-as --with-gnu-ld --verbose \
   --without-newlib \
   --disable-multilib \
-  --enable-libgomp \
   --with-system-zlib \
   --disable-nls --without-included-gettext \
   --disable-win32-registry \
@@ -203,8 +202,8 @@
 mv $RPM_BUILD_ROOT%{_bindir}/libgcc_s_sjlj-1.dll \
   $RPM_BUILD_ROOT%{_mingw32_bindir}
 # Same goes for this DLL under _libdir.
-mv $RPM_BUILD_ROOT%{_libdir}/gcc/i686-pc-mingw32/bin/libgomp-1.dll \
-  $RPM_BUILD_ROOT%{_mingw32_bindir}
+#mv $RPM_BUILD_ROOT%{_libdir}/gcc/i686-pc-mingw32/bin/libgomp-1.dll \
+#  $RPM_BUILD_ROOT%{_mingw32_bindir}
 
 # Don't want the *.la files.
 find $RPM_BUILD_ROOT -name '*.la' -delete
@@ -232,9 +231,9 @@
 %{_libdir}/gcc/i686-pc-mingw32/%{version}/libgcc_eh.a
 %{_libdir}/gcc/i686-pc-mingw32/%{version}/libgcc_s.a
 %{_libdir}/gcc/i686-pc-mingw32/%{version}/libgcov.a
-%{_libdir}/gcc/i686-pc-mingw32/%{version}/libgomp.a
-%{_libdir}/gcc/i686-pc-mingw32/%{version}/libgomp.dll.a
-%{_libdir}/gcc/i686-pc-mingw32/%{version}/libgomp.spec
+#%{_libdir}/gcc/i686-pc-mingw32/%{version}/libgomp.a
+#%{_libdir}/gcc/i686-pc-mingw32/%{version}/libgomp.dll.a
+#%{_libdir}/gcc/i686-pc-mingw32/%{version}/libgomp.spec
 %{_libdir}/gcc/i686-pc-mingw32/%{version}/libssp.a
 %{_libdir}/gcc/i686-pc-mingw32/%{version}/libssp_nonshared.a
 %{_libdir}/gcc/i686-pc-mingw32/%{version}/libssp.dll.a
@@ -252,7 +251,7 @@
 %dir %{_libexecdir}/gcc/i686-pc-mingw32/%{version}/install-tools
 %{_libexecdir}/gcc/i686-pc-mingw32/%{version}/install-tools/*
 %{_mingw32_bindir}/libgcc_s_sjlj-1.dll
-%{_mingw32_bindir}/libgomp-1.dll
+#%{_mingw32_bindir}/libgomp-1.dll
 %{_mandir}/man1/i686-pc-mingw32-gcc.1*
 %{_mandir}/man1/i686-pc-mingw32-gcov.1*
 
@@ -298,10 +297,10 @@
 %{_libdir}/gcc/i686-pc-mingw32/%{version}/libgfortran.a
 %{_libdir}/gcc/i686-pc-mingw32/%{version}/libgfortranbegin.a
 %dir %{_libdir}/gcc/i686-pc-mingw32/%{version}/finclude
-%{_libdir}/gcc/i686-pc-mingw32/%{version}/finclude/omp_lib.f90
-%{_libdir}/gcc/i686-pc-mingw32/%{version}/finclude/omp_lib.h
-%{_libdir}/gcc/i686-pc-mingw32/%{version}/finclude/omp_lib.mod
-%{_libdir}/gcc/i686-pc-mingw32/%{version}/finclude/omp_lib_kinds.mod
+#%{_libdir}/gcc/i686-pc-mingw32/%{version}/finclude/omp_lib.f90
+#%{_libdir}/gcc/i686-pc-mingw32/%{version}/finclude/omp_lib.h
+#%{_libdir}/gcc/i686-pc-mingw32/%{version}/finclude/omp_lib.mod
+#%{_libdir}/gcc/i686-pc-mingw32/%{version}/finclude/omp_lib_kinds.mod
 %{_libexecdir}/gcc/i686-pc-mingw32/%{version}/f951
 
 
epienbro

epienbro

2011-10-08 22:46

reporter  

mingw32-runtime-dont-build-mingw10-dll.patch (941 bytes)
--- mingw32-runtime.spec.good	2011-10-08 18:42:48.884948929 +0200
+++ mingw32-runtime.spec	2011-10-08 21:48:33.222960525 +0200
@@ -6,7 +6,7 @@
 
 Name:           mingw32-runtime
 Version:        3.18
-Release:        1%{?dist}.1
+Release:        0%{?dist}.2
 Summary:        MinGW Windows cross-compiler runtime
 
 License:        Public Domain
@@ -17,6 +17,8 @@
 
 BuildArch:      noarch
 
+Patch0:         runtime-fix-bootstrap.patch
+
 BuildRequires:  mingw32-filesystem >= 49
 BuildRequires:  mingw32-binutils
 BuildRequires:  mingw32-gcc >= 4.4.0
@@ -33,11 +35,13 @@
 
 %prep
 %setup -q -n mingwrt-%{version}-mingw32
+%patch0 -p0
 
 
 %build
 MINGW32_CFLAGS="%{_mingw32_cflags} -I%{_mingw32_includedir}"
 %{_mingw32_configure}
+touch mingwthrd.def
 %{_mingw32_make}
 
 
@@ -57,7 +61,7 @@
 
 %files
 %defattr(-,root,root)
-%{_mingw32_bindir}/*
+#%{_mingw32_bindir}/*
 %{_mingw32_docdir}/*
 %{_mingw32_includedir}/*
 %{_mingw32_libdir}/*
epienbro

epienbro

2011-10-08 22:46

reporter  

mingw32-runtime-only-install-headers.patch (1,328 bytes)
--- mingw32-runtime.spec.good	2011-10-08 18:42:48.884948929 +0200
+++ mingw32-runtime.spec	2011-10-08 19:08:55.581962130 +0200
@@ -6,7 +6,7 @@
 
 Name:           mingw32-runtime
 Version:        3.18
-Release:        1%{?dist}.1
+Release:        0%{?dist}.1
 Summary:        MinGW Windows cross-compiler runtime
 
 License:        Public Domain
@@ -20,7 +20,7 @@
 BuildRequires:  mingw32-filesystem >= 49
 BuildRequires:  mingw32-binutils
 BuildRequires:  mingw32-gcc >= 4.4.0
-BuildRequires:  mingw32-w32api
+#BuildRequires:  mingw32-w32api
 
 # Once this is installed, mingw32-bootstrap (binary bootstrapper) is no
 # longer needed.
@@ -38,17 +38,13 @@
 %build
 MINGW32_CFLAGS="%{_mingw32_cflags} -I%{_mingw32_includedir}"
 %{_mingw32_configure}
-%{_mingw32_make}
 
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%{_mingw32_makeinstall}
-
-# make install places these in nonstandard locations, so move them.
-mkdir -p $RPM_BUILD_ROOT%{_mingw32_docdir}
-mv $RPM_BUILD_ROOT%{_mingw32_prefix}/doc/* $RPM_BUILD_ROOT%{_mingw32_docdir}/
+mkdir -p $RPM_BUILD_ROOT%{_mingw32_includedir}
+cp -Rv include/* $RPM_BUILD_ROOT%{_mingw32_includedir}
 
 
 %clean
@@ -57,11 +53,7 @@
 
 %files
 %defattr(-,root,root)
-%{_mingw32_bindir}/*
-%{_mingw32_docdir}/*
 %{_mingw32_includedir}/*
-%{_mingw32_libdir}/*
-%{_mingw32_mandir}/man3/*
 
 
 %changelog
epienbro

epienbro

2011-10-08 22:47

reporter  

mingw32-w32api-look-for-header-in-correct-path.patch (1,028 bytes)
--- mingw32-w32api.spec.good	2011-10-08 17:48:41.561948620 +0200
+++ mingw32-w32api.spec	2011-10-08 19:28:03.011950081 +0200
@@ -6,7 +6,7 @@
 
 Name:           mingw32-w32api
 Version:        3.14
-Release:        1%{?dist}.5
+Release:        0%{?dist}.5
 Summary:        Win32 header files and stubs
 
 
@@ -16,14 +16,16 @@
 Source0:        http://downloads.sourceforge.net/mingw/w32api-%{version}-mingw32-src.tar.gz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
+Patch0:         w32api-fix-bootstrap.patch
+
 BuildArch:      noarch
 
 BuildRequires:  mingw32-filesystem >= 49
 BuildRequires:  mingw32-binutils
 BuildRequires:  mingw32-gcc >= 4.4.0
-BuildRequires:  mingw32-runtime
+#BuildRequires:  mingw32-runtime
 
-Requires:       mingw32-runtime
+#Requires:       mingw32-runtime
 
 # Once this is installed, mingw32-bootstrap (binary bootstrapper) is no
 # longer needed.
@@ -36,6 +38,7 @@
 
 %prep
 %setup -q -n w32api-%{version}-mingw32
+%patch0 -p0
 
 %build
 %{_mingw32_configure}
epienbro

epienbro

2011-10-08 22:47

reporter  

runtime-fix-bootstrap.patch (799 bytes)
--- Makefile.in.orig	2011-10-08 21:15:31.482032635 +0200
+++ Makefile.in	2011-10-08 21:19:19.901032395 +0200
@@ -251,7 +251,8 @@
        libmingwthrd_old.a \
        libmingwthrd.a
 
-DLLS = $(THREAD_DLL_NAME)
+DLLS = 
+#$(THREAD_DLL_NAME)
 
 INSTDOCS = CONTRIBUTORS \
 	   DISCLAIMER \
@@ -308,9 +309,9 @@
                     $(DLL_OFILES) mingwthrd.def \
 		    -Lmingwex
 
-$(THREAD_DLL_NAME) mingwthrd.def: $(DLL_OFILES) Makefile $(SUBDIRS)
-	$(DLLTOOL) --as $(AS) --output-def mingwthrd.def $(DLL_OFILES)
-	$(CC) $(DLL_CC_STUFF) -o $(THREAD_DLL_NAME)
+#$(THREAD_DLL_NAME) mingwthrd.def: $(DLL_OFILES) Makefile $(SUBDIRS)
+#	$(DLLTOOL) --as $(AS) --output-def mingwthrd.def $(DLL_OFILES)
+#	$(CC) $(DLL_CC_STUFF) -o $(THREAD_DLL_NAME)
 
 libmingw32.a: $(MINGW_OBJS)
 	$(AR) rc $@ $(MINGW_OBJS)
epienbro

epienbro

2011-10-08 22:48

reporter  

w32api-fix-bootstrap.patch (438 bytes)
--- lib/directx/Makefile.in.orig	2011-10-08 19:06:43.727032859 +0200
+++ lib/directx/Makefile.in	2011-10-08 19:06:52.645949358 +0200
@@ -78,7 +78,7 @@
 EXTRA_INCLUDES = -I$(srcdir)/../../mingw/include
 endif
 
-INCLUDES = -I$(srcdir)/../include -I$(srcdir)/../include/directx $(EXTRA_INCLUDES)
+INCLUDES = -I$(srcdir)/../../include -I$(srcdir)/../include/directx $(EXTRA_INCLUDES)
 
 CFLAGS = @CFLAGS@
 ALL_CFLAGS = $(CFLAGS) $(INCLUDES)
kbsingh@karan.org

kbsingh@karan.org

2011-10-09 15:25

administrator   ~0013499

thanks for the very detailed setups. I will need to do a bit of work to make this happen in the buildsystem, but as an interm we can do rpms from the process manually and push them somewhere public ( testing repo ? ) for a wider set of people to eyeball results and perhaps test the result
kbsingh@karan.org

kbsingh@karan.org

2011-10-09 15:27

administrator   ~0013500

I'm going to add a few changelog entries to the modified spec files. I agree with your thinking that these bootstrap packages should not really be needed anywhere, but i suspect a few comments in there might help. Also, the way our buildsystem is setup, it wont let me rewind Release tag's without first doing some changelog entries.
kbsingh@karan.org

kbsingh@karan.org

2011-10-09 16:05

administrator   ~0013501

setup a local git repo at git clone git://nazar.karan.org/el6_misc/mingw32-bootstrap and will push changes there.

Issue History

Date Modified Username Field Change
2011-10-08 22:46 epienbro New Issue
2011-10-08 22:46 epienbro File Added: mingw32-gcc-minimal-gcc.patch
2011-10-08 22:46 epienbro File Added: mingw32-gcc-without-libgomp.patch
2011-10-08 22:46 epienbro File Added: mingw32-runtime-dont-build-mingw10-dll.patch
2011-10-08 22:46 epienbro File Added: mingw32-runtime-only-install-headers.patch
2011-10-08 22:47 epienbro File Added: mingw32-w32api-look-for-header-in-correct-path.patch
2011-10-08 22:47 epienbro File Added: runtime-fix-bootstrap.patch
2011-10-08 22:48 epienbro File Added: w32api-fix-bootstrap.patch
2011-10-08 22:51 toracat Status new => assigned
2011-10-09 15:25 kbsingh@karan.org Note Added: 0013499
2011-10-09 15:25 kbsingh@karan.org Status assigned => acknowledged
2011-10-09 15:27 kbsingh@karan.org Note Added: 0013500
2011-10-09 16:05 kbsingh@karan.org Note Added: 0013501