Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 296964 - Patch dev-libs/gmp-4.3.1 to build with Clang
Summary: Patch dev-libs/gmp-4.3.1 to build with Clang
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High enhancement (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-14 23:24 UTC by Andrew Jeffery
Modified: 2009-12-15 11:14 UTC (History)
0 users

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


Attachments
Fix the configure ANSI compiler check (gmp-4.3.1-fix-broken-ansi-check.patch,239 bytes, patch)
2009-12-14 23:25 UTC, Andrew Jeffery
Details | Diff
New ebuild for ANSI check patch (gmp-4.3.1.ebuild,2.14 KB, text/plain)
2009-12-14 23:28 UTC, Andrew Jeffery
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Jeffery 2009-12-14 23:24:04 UTC
I've been playing around trying to build the system set with Clang[1]. dev-libs/gmp fails a configure check out of the box causing it not to build. The build error is related to converting the source using ansi2knr; the call to ansi2knr is missing in the commandline, making the build fail. The configure check controlling ansi/knr compile modes is failing due to some over-eager style checks by clang, erroring on the main function signature (argv is declared char *argv, not char **argv).

[1] http://clang.llvm.org/

Reproducible: Always

Steps to Reproduce:
1. $ CC=/path/to/clang emerge -av --oneshot dev-libs/gmp
Actual Results:  
libgmp fails to build, with a bad command for ansi2knr conversion.

Expected Results:  
libgmp to be built and installed successfully

Patch and a new ebuild to fix this are attached. Note the patch doesn't address the missing call the ansi2knr, it instead fixes the configure script to make clang pass the ANSI test.
Comment 1 Andrew Jeffery 2009-12-14 23:25:22 UTC
Created attachment 213047 [details, diff]
Fix the configure ANSI compiler check
Comment 2 Andrew Jeffery 2009-12-14 23:28:46 UTC
Created attachment 213049 [details]
New ebuild for ANSI check patch
Comment 3 SpanKY gentoo-dev 2009-12-15 11:14:32 UTC
the real bug is lack of quoting in acinclude.m4.  it tries to use *argv[], but the [] is consumed by m4.

gmp upstream has fixed this already in their mercurial repo:
http://gmplib.org:8000/gmp/rev/43784518850d

when posting ebuilds, please attach diffs and not entire files

http://sources.gentoo.org/dev-libs/gmp/gmp-4.3.1.ebuild?r1=1.9&r2=1.10