[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[MiNT] math.h
Hello.
Miro Kropacek wrote:
> gcc is OK with its built-in stuff from
> mpfr (try to list libgcc.a with 'nm' -- a lot of math functions here),
> it needs libm / pml for nothing (tested -- I had no math lib installed
> during compilation).
I was surprised about this, because I had problems without a libm, then the
problem disappeared. It might be related to some GCC versions... but it was not.
Today I tried to rebuild GCC 4.4.0 with the latest MiNTLib, and it failed
because of some math stuff. This is what triggered the behavior change:
In CVS :
> mintlib/include/MISCFILES
> Date : 2009/4/28 15:45:26
> Author : 'alanh'
> Description :
> We shouldn't install pml's math.h. Leave it up to pml installation or
> fdlibm to install their math.h.
So the key of that mystery is math.h, not libm.a
And we have a dependency problem.
math.h is required to build the MiNTLib (included in various sources)
I guess it is the reason why math.h is included in the MiNTLib sources.
But math.h is not installed by the MiNTLib, because it is a foreign file.
math.h is required to build libstdc++-v3 (bundled with gcc)
libstdc++-v3/include/cmath:46:18: error: math.h: No such file or directory
So when math.h was (abnormally) installed by the MiNTLib, it worked.
The solution here is to build and install some math library after the
MiNTLib and before libstdc++-v3 (what I was doing in my previous build scripts).
But there is a bad smell, the MiNTLib should not depend on a private file
(math.h) and don't install it...
We should clean up the dependencies. How ?
--
Vincent Rivière