David Moore wrote:
>Hi,
>
>I have put together a few packages which package the mingw gcc compiler
>as a cross-compiler using ABS. I have one question about standard
>locations and one question about general ABS usage.
>
>
Replying to myself with the solution I found, in case anyone else is
ever faced with the same issue:
>[snip]
>2) This one is slightly more complicated. The problem with building a
>cross-compiler is there's a certain amount of bootstrapping that has to
>happen. The MinGW binutils cross-compile without a hitch, but building
>an initial compiler relies on all the right headers being in place, and
>building the extra languages requires an initial compiler, as it
>requires the mingw-runtimes and the win32api to already have been
>cross-compiled. I've managed to do this in the following packages, each
>of which depends on the last:
> mingw32-binutils: This holds the binutils
> mingw32-headers: This installs the headers for the win32api and the
>mingw runtimes
> mingw32-gcc-base: This installs gcc (just the C compiler), the
>win32api and the mingw runtimes
> mingw32-gcc: This installs the g++ and objc cross-compilers.
>
>The last three cumulatively do the same as the base/gcc package does for
>the native compiler in one package. It occurred to me that someone
>might have hit bootstrapping problems like this before, so I was
>wondering if anyone has any ideas of how to get those three packages
>down to one. Anyone? How was the first gcc built for Arch Linux?
>
>
OK, mingw32-binutils is a separate package, so that's not important.
For the other three packages, I used a combination of makedepends,
provides and conflicts PKGBUILD directives to get one package at the end
of the process. For instance, mingw32-gcc-base needs mingw32-headers
for building the package, so in mingw32-gcc-base is:
makedepends=('gcc' 'mingw32-headers')
provides=('mingw32-headers')
conflicts=('mingw32-headers')
The result of this: You need to install mingw32-headers, then you can
build mingw32-gcc-base (makedepends). When you install
mingw32-gcc-base, it uninstalls mingw32-headers (conflicts). If you
ever need to rebuild mingw32-gcc-base, it provides the necessary make
dependency (provides).
When repeated with mingw32-gcc-base and mingw32-gcc, you end up having
one package installed (mingw32-gcc) which provides mingw32-headers and
mingw32-gcc-base. At that stage, for future updates of mingw32-gcc,
that's the only package you have to rebuild and upgrade. If this was
ever to make its way into an official repository, only the mingw32-gcc
package would be necessary.
>[snip]
>TIA,
>David Moore
>
>
>
Hope this helps,
David Moore
_______________________________________________
arch mailing list
[email protected]
http://www.archlinux.org/mailman/listinfo/arch