Closed Bug 1288625 Opened 3 years ago Closed 3 years ago

Allow compiling ipc/chromium for Android 64-bit

Categories

(Core :: IPC, defect)

Unspecified
Android
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla51
Tracking Status
firefox50 --- affected
firefox51 --- fixed

People

(Reporter: m_kato, Assigned: m_kato)

Details

Attachments

(2 files)

Android 64-bit has no pthread_cond_timedwait_monotonic_np.  Also, time64.h doesn't allow on 64-bit version.


In /usr/include/pthread.h
...
#if !defined(__LP64__)

// Bionic additions that are deprecated even in the 32-bit ABI.
...
int pthread_cond_timedwait_monotonic_np(pthread_cond_t*, pthread_mutex_t*, const struct timespec*);
...


/usr/include/time64.h
...
#if defined(__LP64__)

#error Your time_t is already 64-bit.
...
Attachment #8773634 - Flags: review?(wmccloskey) → review+
Comment on attachment 8773634 [details]
Bug 1288625 - Part 1. Allow compiling of ipc/chromium for Android 64-bit.

https://reviewboard.mozilla.org/r/66374/#review64220

::: ipc/chromium/src/base/condition_variable_posix.cc:71
(Diff revision 1)
>    absolute_time.tv_nsec += relative_time.tv_nsec;
>    absolute_time.tv_sec += absolute_time.tv_nsec / Time::kNanosecondsPerSecond;
>    absolute_time.tv_nsec %= Time::kNanosecondsPerSecond;
>    DCHECK_GE(absolute_time.tv_sec, now.tv_sec);  // Overflow paranoia
>  
> -#if defined(OS_ANDROID)
> +#if defined(OS_ANDROID) && !defined(__LP64__)

Can you please make the code look more like this:
http://searchfox.org/mozilla-central/rev/cb74fc1327028e13bb1f66817da07ca09e4edcec/security/sandbox/chromium/base/synchronization/condition_variable_posix.cc#98

This is a more recent import from the Chromium sources.
https://reviewboard.mozilla.org/r/66374/#review64220

> Can you please make the code look more like this:
> http://searchfox.org/mozilla-central/rev/cb74fc1327028e13bb1f66817da07ca09e4edcec/security/sandbox/chromium/base/synchronization/condition_variable_posix.cc#98
> 
> This is a more recent import from the Chromium sources.

Since we don't build security/sandbox/chromium/base/ on Android builder, these don't cause build break.  Becasue we don't define HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC and don't check it, we should add check it on old-configure.in.  pthread_condattr_setclock isn't defined on old-android (It will be from 21+).  I will add it on next patch.
Comment on attachment 8784300 [details]
Bug 1288625 - Part 2. Check pthread_cond_timedwait_monotonic_np.

https://reviewboard.mozilla.org/r/73808/#review71946
Attachment #8784300 - Flags: review?(mh+mozilla) → review+
Pushed by m_kato@ga2.so-net.ne.jp:
https://hg.mozilla.org/integration/autoland/rev/605ef7faa292
Part 1. Allow compiling of ipc/chromium for Android 64-bit. r=billm
https://hg.mozilla.org/integration/autoland/rev/56b6178056e9
Part 2. Check pthread_cond_timedwait_monotonic_np. r=glandium
https://hg.mozilla.org/mozilla-central/rev/605ef7faa292
https://hg.mozilla.org/mozilla-central/rev/56b6178056e9
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in before you can comment on or make changes to this bug.