On Tuesday, 21 August 2012 at 10:16:35 UTC, Johannes Pfau wrote:
I finally found some time to look install raspbian and have
another
look at this issue. Turns out --with-float=hard and
--with-fpu=vfp are
actually supported since gcc 4.5, even without patches. But
theses
switches require that the gnueabi (or armeabi) is used. Now
debian
uses "--target=arm-linux-gnueabihf" and although gnueabihf is
just
another name used by debian for gnueabi, gcc fails to recognize
this.
Debian distributes a patch with their sources to fix this. It's
the
armhf-triplet.diff patch. This is actually the last patch which
is
applied, so I guess some earlier patch failed and
armhf-triplet.diff
was not applied.
I actually had this issue: The debian package generates the
list of used patches automatically and it seems to produce a
wrong list
if the 'lsb-release' package is not installed. But I'm not
sure, it
could also be necessary to install the 'debhelper' package and
use
debian/build clean before patching.
So this is what fixed it for me:
---------------------------------------------
sudo apt-get install lsb-release debhelper
apt-get source gcc-4.7
cd gcc-4.7-4.7.1
edit debian/rules.patch: comment this line:
debian_patches += gcc-d-lang
so it should become
# debian_patches += gcc-d-lang
debian/rules clean
debian/rules patch
#clone gdc, checkout 4.7 branch
edit gcc/d/setup-gcc.sh: Edit this
-----
elif grep -q '^4\.7\.' gcc/BASE-VER; then
gcc_ver=4.7
-----
so it becomes:
-----
elif grep -q -E '^4\.7([^0-9]|$)' gcc/BASE-VER; then
gcc_ver=4.7
-----
(This should be fixed in the GDC repository, I'll open a pull
request
soon)
Then use
./update-gcc.sh --setup /home/pi/gcc-4.7-4.7.1/src
And configure & compile gcc as usual
BTW: I think you shouldn't use --enable-multiarch when
running ../configure. It seems to cause errors in the build
process and
as the system gcc didn't use it it's probably not necessary.
Yes, that seems to have solved it for me as well! It's nice to
wake up to a non-broken build for a change :-D
As I've been messing around a fair bit with my current image (not
just D-related) I think will try to install a fresh one tonight.
Do you think it would be useful for me to try and compile without
the debhelper package installed, as you seem to be not completely
sure it's needed?
Cheers,
Stefan