Last Comment Bug 715930 - Use stdc++compat.cpp on OS X too
: Use stdc++compat.cpp on OS X too
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: unspecified
: x86 Mac OS X
: -- normal (vote)
: mozilla12
Assigned To: Rafael Ávila de Espíndola (:espindola) (not reading bugmail)
:
:
Mentors:
Depends on: 729926
Blocks: 715397
  Show dependency treegraph
 
Reported: 2012-01-06 09:31 PST by Rafael Ávila de Espíndola (:espindola) (not reading bugmail)
Modified: 2012-02-23 07:15 PST (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Use stdc++compat.cpp on OS X too (3.10 KB, patch)
2012-01-06 09:37 PST, Rafael Ávila de Espíndola (:espindola) (not reading bugmail)
no flags Details | Diff | Splinter Review
Use stdc++compat.cpp on OS X too (3.99 KB, patch)
2012-01-06 13:04 PST, Rafael Ávila de Espíndola (:espindola) (not reading bugmail)
mh+mozilla: review+
Details | Diff | Splinter Review
Use stdc++compat.cpp on OS X too (4.01 KB, patch)
2012-01-10 08:58 PST, Rafael Ávila de Espíndola (:espindola) (not reading bugmail)
mh+mozilla: review+
Details | Diff | Splinter Review

Description Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2012-01-06 09:31:16 PST

    
Comment 1 Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2012-01-06 09:37:00 PST
Created attachment 586461 [details] [diff] [review]
Use stdc++compat.cpp on OS X too

https://tbpl.mozilla.org/?tree=Try&rev=e4eaf44c614e
Comment 2 Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2012-01-06 13:04:35 PST
Created attachment 586539 [details] [diff] [review]
Use stdc++compat.cpp on OS X too

https://tbpl.mozilla.org/?tree=Try&rev=0ba8251cf623
Comment 3 Ted Mielczarek [:ted.mielczarek] 2012-01-10 05:39:10 PST
Comment on attachment 586539 [details] [diff] [review]
Use stdc++compat.cpp on OS X too

Review of attachment 586539 [details] [diff] [review]:
-----------------------------------------------------------------

I'm going to punt this to glandium.
Comment 4 Mike Hommey [:glandium] 2012-01-10 05:44:31 PST
What is the need for this?
Comment 5 Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2012-01-10 06:04:04 PST
At a higher level the bug it blocks:
https://bugzilla.mozilla.org/show_bug.cgi?id=715397

More specifically, to be able to build with the 10.6 SDK and run the binary on 10.5.
See 
https://tbpl.mozilla.org/php/getParsedLog.php?id=8360973&tree=Try&full=1#error0 for an example of what this fix.
Comment 6 Mike Hommey [:glandium] 2012-01-10 06:12:16 PST
Comment on attachment 586539 [details] [diff] [review]
Use stdc++compat.cpp on OS X too

Review of attachment 586539 [details] [diff] [review]:
-----------------------------------------------------------------

::: build/autoconf/libstdcxx.py
@@ +69,5 @@
>  
>  if __name__ == '__main__':
> +    if os.uname()[0] == 'Darwin':
> +        sdk_dir = os.environ['MACOS_SDK_DIR']
> +        if 'MacOSX10.5.sdk' in sdk_dir:

Wouldn't it be better to use MACOSX_DEPLOYMENT_TARGET?

::: build/stdc++compat.cpp
@@ +56,5 @@
>      /* Instantiate these templates to avoid GLIBCXX_3.4.9 symbol versions */
>      template ostream& ostream::_M_insert(double);
>      template ostream& ostream::_M_insert(long);
>      template ostream& ostream::_M_insert(unsigned long);
> +    template ostream& ostream::_M_insert(const void*);

That part is in bug 702158, and I guess it can be #ifdef DEBUG like there.
Comment 7 Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2012-01-10 06:20:15 PST
> >  if __name__ == '__main__':
> > +    if os.uname()[0] == 'Darwin':
> > +        sdk_dir = os.environ['MACOS_SDK_DIR']
> > +        if 'MacOSX10.5.sdk' in sdk_dir:
> 
> Wouldn't it be better to use MACOSX_DEPLOYMENT_TARGET?

No, that is the OS version we are targeting, not the SDK we are using. In particular, using that would cause the build to fail in the current setup (10.5 MACOSX_DEPLOYMENT_TARGET and 10.5 SDK).

> ::: build/stdc++compat.cpp
> @@ +56,5 @@
> >      /* Instantiate these templates to avoid GLIBCXX_3.4.9 symbol versions */
> >      template ostream& ostream::_M_insert(double);
> >      template ostream& ostream::_M_insert(long);
> >      template ostream& ostream::_M_insert(unsigned long);
> > +    template ostream& ostream::_M_insert(const void*);
> 
> That part is in bug 702158, and I guess it can be #ifdef DEBUG like there.

Maybe. I will try and let you know.
Comment 8 Mike Hommey [:glandium] 2012-01-10 08:23:59 PST
Comment on attachment 586539 [details] [diff] [review]
Use stdc++compat.cpp on OS X too

r+ modulo the part that is covered in bug 702158.
Comment 9 Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2012-01-10 08:58:32 PST
Created attachment 587337 [details] [diff] [review]
Use stdc++compat.cpp on OS X too

https://tbpl.mozilla.org/?tree=Try&rev=939ebaabe1a2
Comment 10 Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2012-01-10 12:02:51 PST
https://tbpl.mozilla.org/?tree=Mozilla-Inbound&rev=d377d38a23d3
Comment 11 Ed Morley [:emorley] 2012-01-10 18:48:42 PST
https://hg.mozilla.org/mozilla-central/rev/d377d38a23d3

Note You need to log in before you can comment on or make changes to this bug.