Bug 49930 - Need some adjustments for bionic
Summary: Need some adjustments for bionic
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: other (show other bugs)
Version: 4.6.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-01 07:10 UTC by Mike Hommey
Modified: 2011-09-07 08:54 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Patch (611 bytes, patch)
2011-08-01 07:10 UTC, Mike Hommey
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Hommey 2011-08-01 07:10:19 UTC
Created attachment 24879 [details]
Patch

The following things are bionic specificities that the gcc source code doesn't handle well:
- sincos is not supported
- getpagesize is defined as an inline in the headers
- prctl is defined with the prototype as per the linux manual page:
  int prctl(int option, unsigned long arg2, unsigned long arg3,
            unsigned long arg4, unsigned long arg5)
  and not prctl(int option, ...) as in glibc headers.

With the attached patch, I was able to build gcc 4.6.1 for use with the Android NDK.
Comment 1 Andrew Pinski 2011-08-02 05:40:59 UTC
The libiberty patch is not needed anymore as it is not built for the target.
Comment 2 Michael Hope 2011-09-07 02:30:14 UTC
Note that sincos() was introduced with Android 2.3.  The initial version calls sin() then calls cos() so there's no immediate advantage.
Comment 3 Loïc Minier 2011-09-07 08:28:57 UTC
So just the getpagesize remains?
Comment 4 Mike Hommey 2011-09-07 08:54:11 UTC
(In reply to comment #3)
> So just the getpagesize remains?

getpagesize is in libiberty, it shouldn't matter anymore

(In reply to comment #2)
> Note that sincos() was introduced with Android 2.3.  The initial version calls
> sin() then calls cos() so there's no immediate advantage.

As you say, sincos() was introduced with Android 2.3, which means you can build native binaries for that target without the patch, but you can't build native binaries for older targets. There are too many Android < 2.3 devices out there to just ignore the problem.