Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 186624 - dev-libs/{mpfr,gmp} & media-libs/freetype fails to build on armv3
Summary: dev-libs/{mpfr,gmp} & media-libs/freetype fails to build on armv3
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: ARM Linux
: High normal (vote)
Assignee: Gentoo ARM Porters
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-25 21:27 UTC by Alan Hourihane
Modified: 2012-12-11 14:32 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Hourihane 2007-07-25 21:27:55 UTC
Trying to build dev-libs/gmp-4.2.1-r1 on arm results in the following output.

I'm using gcc-3.4.6-r2 and binutils-2.17 (but have tried 2.16 and gcc 3.4.4) with the same troubles.

tmp_mul-1.s: Assembler messages:
tmp_mul-1.s:70: Error: selected processor does not support `umull r9,r12,r14,r3`

I'm compiling with -march=armv3 -mtune=strongarm110

Reproducible: Always
Comment 1 Alan Hourihane 2007-07-25 21:35:00 UTC
Oh, I know this is because I'm using -march=armv3, but the Acorn RiscPC has a strongarm CPU, but it doesn't support half-word, so using armv3 is the best route.

Comment 2 Alan Hourihane 2007-07-25 21:45:33 UTC
I guess I can workaround this by disabling fortran, and it'll avoid gcc pulling in mpfr and thus gmp.
Comment 3 SpanKY gentoo-dev 2007-08-25 23:01:39 UTC
arm3 is not supported and i dont ever plan on supporting it [directly]

you're free to post patches and if they're OK i'll merge them, but that's it
Comment 4 Alan Hourihane 2009-07-08 09:22:19 UTC
O.k. so the fortran hack no longer works, so I'll re-open this given you said you'd support patches if they're o.k.

So I could use a little help on the best way to integrate this.

I have a solution where all that needs to happen is remove the offending files from the build when CFLAGS has armv3 defined and gmp builds with the generic code.

Is there a way in portage to detect what's in CFLAGS and adjust accordingly ?
Comment 5 Alan Hourihane 2009-07-08 13:12:15 UTC
This is all I need to do in src_unpack()....

rm -f mpn/arm/{mul_1.asm,addmul_1.asm,invert_limb.asm,submul_1.asm}
sed -i -e 's/#if 1/#if 0/' longlong.h

Comment 6 Alan Hourihane 2009-07-08 14:51:23 UTC
Also, had to do this to mpfr-2.4.1_p1.ebuild....

sed -i -e 's/#if 1/#if 0/' mpfr-longlong.h

again in src_unpack().
Comment 7 Alan Hourihane 2009-08-26 12:39:59 UTC
Any help ?
Comment 8 Alan Hourihane 2009-09-07 15:21:55 UTC
Also freetype also needs a fix that I guess depends on -march=armv3 in CFLAGS.

Can this be achieved ???
Comment 9 Alan Hourihane 2009-11-25 17:46:30 UTC
vapier - any help on this ? 
Comment 10 SpanKY gentoo-dev 2010-01-08 13:36:58 UTC
you could change the '#if 1 ...' to:
#if (!defined(__ARM_ARCH_2__) && !defined(__ARM_ARCH_3__)) ...
Comment 11 Alan Hourihane 2010-03-04 16:53:15 UTC
I guess that'd be o.k. for mpfr, but given I need to delete some files from gmp, I guess this should be o.k. too...

if is-flags -march=armv3; then...
 ...do stuff...
fi

Is that acceptable in an ebuild ?
Comment 12 Alan Hourihane 2010-03-10 11:40:06 UTC
(In reply to comment #8)
> Also freetype also needs a fix that I guess depends on -march=armv3 in CFLAGS.

For freetype we need this...

if is-flags -march=armv3; then
  enable_option FT_CONFIG_OPTION_NO_ASSEMBLER
fi
Comment 13 Alan Hourihane 2010-04-03 09:04:57 UTC
ping vapier ?
Comment 14 Alan Hourihane 2010-06-02 09:12:52 UTC
another ping .
Comment 15 SpanKY gentoo-dev 2010-08-30 17:23:17 UTC
i'm looking for a fix to go in the packages themselves, not be worked around in the ebuild.  we cant send that upstream.
Comment 16 Alan Hourihane 2012-12-11 14:32:08 UTC
Closing this as the Acorn RiscPC can use armv3m instead, which supports these instructions.