[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Mingw-cross-env-list] Solving the Pthreads issue
From: |
Volker Grabsch |
Subject: |
Re: [Mingw-cross-env-list] Solving the Pthreads issue |
Date: |
Sun, 9 May 2010 19:06:57 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Tony Theodore <address@hidden> schrieb:
> Attached is what I had in mind. It's basically the previous libgomp
> build steps with some unrecognised options removed.
That build file looks great. I especially like your idea to reuse
the gcc_XXX variables:
PKG := libgomp
$(PKG)_IGNORE :=
$(PKG)_VERSION := $(gcc_VERSION)
$(PKG)_CHECKSUM := $(gcc_CHECKSUM)
$(PKG)_SUBDIR := $(gcc_SUBDIR)
...
However, it contains two subtle bugs. First, you should also mirror
the $(PKG)_IGNORE variable, because you can't assume it will be
always empty. Second, you shouldn't assume that "gcc.mk" is included
before "libgomp.mk", although that might be true on most system due
to lexical ordering of the files to be included.
Let demonstrate the second issue on a simplified example. The following
Makefile will produce the output "4.5.0", as expected:
gcc_VERSION := 4.5.0
libgomp_VERSION := $(gcc_VERSION)
all:
@echo $(libgomp_VERSION)
However, if the variables are defined in a different order, the output
will be empty:
libgomp_VERSION := $(gcc_VERSION)
gcc_VERSION := 4.5.0
This issue is easy to fix by making the term "$(gcc_VERSION)" being
evaluated on demand rather at the definition of libgomp_VERSION. This
is achieved by using the "=" assignment instead of the ":=" assignment.
So in our example, the following code would again produce "4.5.0":
libgomp_VERSION = $(gcc_VERSION)
gcc_VERSION := 4.5.0
I fixed both issues in your build script, simplified it a bit, and
included it. I also fixed some GCC options:
http://hg.savannah.gnu.org/hgweb/mingw-cross-env/rev/21e55ff41607
In addition, I adjusted all other build scripts to which your idea
was applicable:
http://hg.savannah.gnu.org/hgweb/mingw-cross-env/rev/69b0700c68f3
> I notice that both host and target are specified and the prefix
> is just usr. Should these be:
>
> --host='$(TARGET)'
> --prefix='$(PREFIX)/$(TARGET)'
>
> like other cross builds?
That's a good question. I simply took exactly the options that
were passed by GCC's main configure/make. Those cause libgomp to
be installed to:
usr/lib/gcc/i686-pc-mingw32/4.5.0/include/omp.h
usr/lib/gcc/i686-pc-mingw32/4.5.0/libgomp.a
usr/lib/gcc/i686-pc-mingw32/4.5.0/libgomp.la
But your options are sensible, too, and would certainly work,
too. These would install libgomp to a more usual location.
However, since libgomp is a subpackage of GCC, I think we should
install it to the place designated by GCC. That is, we should
install it to the same position to which it would be installed
if it had been built directly in the GCC build.
Greets,
Volker
--
Volker Grabsch
---<<(())>>---
Administrator
NotJustHosting GbR
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, (continued)
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, Volker Grabsch, 2010/05/10
- [Mingw-cross-env-list] Support for Windows 95/98/ME? (was: Solving the Pthreads issue), Volker Grabsch, 2010/05/09
- Re: [Mingw-cross-env-list] Support for Windows 95/98/ME? (was: Solving the Pthreads issue), Martin Lambers, 2010/05/09
- Re: [Mingw-cross-env-list] Support for Windows 95/98/ME? (was: Solving the Pthreads issue), Volker Grabsch, 2010/05/12
- Re: [Mingw-cross-env-list] Support for Windows 95/98/ME? (was: Solving the Pthreads issue), Martin Gerhardy, 2010/05/13
- Re: [Mingw-cross-env-list] Support for Windows 95/98/ME? (was: Solving the Pthreads issue), Volker Grabsch, 2010/05/13
- Re: [Mingw-cross-env-list] Support for Windows 95/98/ME? (was: Solving the Pthreads issue), Tony Theodore, 2010/05/14
- Re: [Mingw-cross-env-list] Support for Windows 95/98/ME? (was: Solving the Pthreads issue), Gregory Smith, 2010/05/14
- Re: [Mingw-cross-env-list] Support for Windows 95/98/ME? (was: Solving the Pthreads issue), Tony Theodore, 2010/05/14
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, Tony Theodore, 2010/05/08
- Re: [Mingw-cross-env-list] Solving the Pthreads issue,
Volker Grabsch <=
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, Tony Theodore, 2010/05/10
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, Martin Lambers, 2010/05/10
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, Volker Grabsch, 2010/05/10
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, Martin Lambers, 2010/05/11
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, Tony Theodore, 2010/05/11
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, Volker Grabsch, 2010/05/11
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, Tony Theodore, 2010/05/11
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, Volker Grabsch, 2010/05/11
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, Martin Lambers, 2010/05/11
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, Volker Grabsch, 2010/05/16