Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 377442 Details for
Bug 511036
dev-util/scons: rework patches for ppc-aix Prefix platform
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
scons-2.3.1-aix-xlc_r-is-for-threads.patch: mainline patch backported to scons-2.3.1
scons-2.3.1-aix-xlc_r-is-for-threads.patch (text/plain), 5.45 KB, created by
Michael Haubenwallner (RETIRED)
on 2014-05-22 13:33:43 UTC
(
hide
)
Description:
scons-2.3.1-aix-xlc_r-is-for-threads.patch: mainline patch backported to scons-2.3.1
Filename:
MIME Type:
Creator:
Michael Haubenwallner (RETIRED)
Created:
2014-05-22 13:33:43 UTC
Size:
5.45 KB
patch
obsolete
>changeset: 3117:b5b8b68377f3 >parent: 3116:3b35f7c65a8b >parent: 3105:66fce660c01a >user: Gary Oberbrunner <garyo@oberbrunner.com> >date: Sun May 18 19:51:34 2014 -0400 >summary: Merged in haubi/scons/aix-xlc_r-is-for-threads (pull request #140) > >diff -r 3b35f7c65a8b -r b5b8b68377f3 src/engine/SCons/Action.py >--- a/src/engine/SCons/Action.py Sun May 18 19:49:36 2014 -0400 >+++ b/src/engine/SCons/Action.py Sun May 18 19:51:34 2014 -0400 >@@ -685,6 +685,7 @@ > class f(object): > def read(self): return '' > def readline(self): return '' >+ def __iter__(self): return iter(()) > stdout = stderr = f() > return dummyPopen(e) > >diff -r 3b35f7c65a8b -r b5b8b68377f3 src/engine/SCons/Platform/aix.py >--- a/src/engine/SCons/Platform/aix.py Sun May 18 19:49:36 2014 -0400 >+++ b/src/engine/SCons/Platform/aix.py Sun May 18 19:51:34 2014 -0400 >@@ -33,10 +33,14 @@ > __revision__ = "src/engine/SCons/Platform/aix.py 2014/03/02 14:18:15 garyo" > > import os >+import subprocess > > import posix > >-def get_xlc(env, xlc=None, xlc_r=None, packages=[]): >+import SCons.Util >+import SCons.Action >+ >+def get_xlc(env, xlc=None, packages=[]): > # Use the AIX package installer tool lslpp to figure out where a > # given xl* compiler is installed and what version it is. > xlcPath = None >@@ -44,18 +48,30 @@ > > if xlc is None: > xlc = env.get('CC', 'xlc') >- if xlc_r is None: >- xlc_r = xlc + '_r' >+ if SCons.Util.is_List(xlc): >+ xlc = xlc[0] > for package in packages: >- cmd = "lslpp -fc " + package + " 2>/dev/null | egrep '" + xlc + "([^-_a-zA-Z0-9].*)?$'" >- line = os.popen(cmd).readline() >- if line: >- v, p = line.split(':')[1:3] >- xlcVersion = v.split()[1] >- xlcPath = p.split()[0] >- xlcPath = xlcPath[:xlcPath.rindex('/')] >- break >- return (xlcPath, xlc, xlc_r, xlcVersion) >+ # find the installed filename, which may be a symlink as well >+ pipe = SCons.Action._subproc(env, ['lslpp', '-fc', package], >+ stdin = 'devnull', >+ stderr = 'devnull', >+ stdout = subprocess.PIPE) >+ # output of lslpp is something like this: >+ # #Path:Fileset:File >+ # /usr/lib/objrepos:vac.C 6.0.0.0:/usr/vac/exe/xlCcpp >+ # /usr/lib/objrepos:vac.C 6.0.0.0:/usr/vac/bin/xlc_r -> /usr/vac/bin/xlc >+ for line in pipe.stdout: >+ if xlcPath: >+ continue # read everything to let lslpp terminate >+ fileset, filename = line.split(':')[1:3] >+ filename = filename.split()[0] >+ if ('/' in xlc and filename == xlc) \ >+ or ('/' not in xlc and filename.endswith('/' + xlc)): >+ xlcVersion = fileset.split()[1] >+ xlcPath, sep, xlc = filename.rpartition('/') >+ pass >+ pass >+ return (xlcPath, xlc, xlcVersion) > > def generate(env): > posix.generate(env) >diff -r 3b35f7c65a8b -r b5b8b68377f3 src/engine/SCons/Tool/aixc++.py >--- a/src/engine/SCons/Tool/aixc++.py Sun May 18 19:49:36 2014 -0400 >+++ b/src/engine/SCons/Tool/aixc++.py Sun May 18 19:51:34 2014 -0400 >@@ -43,8 +43,7 @@ > > def get_xlc(env): > xlc = env.get('CXX', 'xlC') >- xlc_r = env.get('SHCXX', 'xlC_r') >- return SCons.Platform.aix.get_xlc(env, xlc, xlc_r, packages) >+ return SCons.Platform.aix.get_xlc(env, xlc, packages) > > def smart_cxxflags(source, target, env, for_signature): > build_dir = env.GetBuildPath() >@@ -55,20 +54,20 @@ > def generate(env): > """Add Builders and construction variables for xlC / Visual Age > suite to an Environment.""" >- path, _cxx, _shcxx, version = get_xlc(env) >- if path: >+ path, _cxx, version = get_xlc(env) >+ if path and _cxx: > _cxx = os.path.join(path, _cxx) >- _shcxx = os.path.join(path, _shcxx) >+ >+ if 'CXX' not in env: >+ env['CXX'] = _cxx > > cplusplus.generate(env) > >- env['CXX'] = _cxx >- env['SHCXX'] = _shcxx >- env['CXXVERSION'] = version >- env['SHOBJSUFFIX'] = '.pic.o' >+ if version: >+ env['CXXVERSION'] = version > > def exists(env): >- path, _cxx, _shcxx, version = get_xlc(env) >+ path, _cxx, version = get_xlc(env) > if path and _cxx: > xlc = os.path.join(path, _cxx) > if os.path.exists(xlc): >diff -r 3b35f7c65a8b -r b5b8b68377f3 src/engine/SCons/Tool/aixcc.py >--- a/src/engine/SCons/Tool/aixcc.py Sun May 18 19:49:36 2014 -0400 >+++ b/src/engine/SCons/Tool/aixcc.py Sun May 18 19:51:34 2014 -0400 >@@ -42,25 +42,25 @@ > > def get_xlc(env): > xlc = env.get('CC', 'xlc') >- xlc_r = env.get('SHCC', 'xlc_r') >- return SCons.Platform.aix.get_xlc(env, xlc, xlc_r, packages) >+ return SCons.Platform.aix.get_xlc(env, xlc, packages) > > def generate(env): > """Add Builders and construction variables for xlc / Visual Age > suite to an Environment.""" >- path, _cc, _shcc, version = get_xlc(env) >- if path: >+ path, _cc, version = get_xlc(env) >+ if path and _cc: > _cc = os.path.join(path, _cc) >- _shcc = os.path.join(path, _shcc) >+ >+ if 'CC' not in env: >+ env['CC'] = _cc > > cc.generate(env) > >- env['CC'] = _cc >- env['SHCC'] = _shcc >- env['CCVERSION'] = version >+ if version: >+ env['CCVERSION'] = version > > def exists(env): >- path, _cc, _shcc, version = get_xlc(env) >+ path, _cc, version = get_xlc(env) > if path and _cc: > xlc = os.path.join(path, _cc) > if os.path.exists(xlc): >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 511036
:
377436
|
377438
| 377442 |
377444