Login | Register
My pages Projects Community openCollabNet

Discussions > SCons Development (OBSOLETE) > REVIEW: use smart C/C++ linking in the Intel tool chain (Dmitry Girgorenko and Gary Oberbrunner)

Project highlights:

14 Nov 2017: Release 3.0.1 is now available at the download page.

18 Sep 2017: Release 3.0.0 is now available at the download page.

03 Nov 2016: Release 2.5.1 is now available at the download page.

scons
Discussion topic

Back to topic list

REVIEW: use smart C/C++ linking in the Intel tool chain (Dmitry Girgorenko and Gary Oberbrunner)

Author stevenknight
Full name Steven Knight
Date 2007-03-06 11:32:38 PST
Message Gary, I decided to put Dmitry's test in a new test/Intel subdirectory.
I don't have the Intel compiler installed so I couldn't test it directly.
It looks pretty simple, but I'd appreciate it if you could validate it
and let me know if it needs a follow-on patch.

         --SK

*** /home/scons/scons/br​anch.0/branch.96/bas​eline/src/CHANGES.tx​t 2007-03-06 03:50:28.000000000 -0600
--- /home/knight/SCons/s​cons.0.96.C754/src/C​HANGES.txt 2007-03-06 12:26:15.000000000 -0600
***************
*** 10,15 ****
--- 10,19 ----

   RELEASE 0.96.96 - XXX

+ From Dmitry Grigorenko and Gary Oberbrunner:
+
+ - Use the Intel C++ compiler, not $CC, to link C++ source.
+
     From Steven Knight:

     - Back out (most of) the Windows registry installer patch, which
*** /home/scons/scons/br​anch.0/branch.96/bas​eline/src/engine/SCo​ns/Tool/intelc.py 2007-01-31 00:20:57.000000000 -0600
--- /home/knight/SCons/s​cons.0.96.C754/src/e​ngine/SCons/Tool/int​elc.py 2007-03-06 12:25:12.000000000 -0600
***************
*** 353,359 ****
       else:
           env['CC'] = 'icc'
           env['CXX'] = 'icpc'
! env['LINK'] = '$CC'
           env['AR'] = 'xiar'
           env['LD'] = 'xild' # not used by default

--- 353,361 ----
       else:
           env['CC'] = 'icc'
           env['CXX'] = 'icpc'
! # Don't reset LINK here;
! # use smart_link which should already be here from link.py.
! #env['LINK'] = '$CC'
           env['AR'] = 'xiar'
           env['LD'] = 'xild' # not used by default

*** /dev/null 2006-10-09 06:24:02.712960312 -0500
--- /home/knight/SCons/s​cons.0.96.C754/test/​Intel/icpc-link.py 2007-03-06 12:24:20.000000000 -0600
***************
*** 0 ****
--- 1,58 ----
+ #!/usr/bin/env python
+ #
+ # __COPYRIGHT__
+ #
+ # Permission is hereby granted, free of charge, to any person obtaining
+ # a copy of this software and associated documentation files (the
+ # "Software"), to deal in the Software without restriction, including
+ # without limitation the rights to use, copy, modify, merge, publish,
+ # distribute, sublicense, and/or sell copies of the Software, and to
+ # permit persons to whom the Software is furnished to do so, subject to
+ # the following conditions:
+ #
+ # The above copyright notice and this permission notice shall be included
+ # in all copies or substantial portions of the Software.
+ #
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ #
+
+ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+
+ """
+ Simple "Hello, world" test of linking with the Intel C++ compiler, icpc.
+
+ This tests for a bug (1415) where our initialization of the linker to
+ $CC prevented automatic linking of C++ source.
+ """
+
+ import TestSCons
+
+ test = TestSCons.TestSCons()
+
+ icpc = test.where_is('icpc')
+ if not icpc:
+ test.skip_test("Could not find 'icpc'; skipping test(s).\n")
+
+ test.write('SConstruct', """
+ env = Environment(tools=['default', 'intelc'])
+ env.Program('hw', 'hw.cpp')
+ """)
+
+ test.write('hw.cpp', """\
+ int
+ main()
+ {
+ std::cout<<"hw\\n";
+ return 0;
+ }
+ """)
+
+ test.run(arguments = '.')
+
+ test.pass_test()

« Previous message in topic | 1 of 8 | Next message in topic »

Messages

Show all messages in topic

REVIEW: use smart C/C++ linking in the Intel tool chain (Dmitry Girgorenko and Gary Oberbrunner) stevenknight Steven Knight 2007-03-06 11:32:38 PST
     RE: [scons-dev] REVIEW: use smart C/C++ linking in the Intel tool chain (Dmitry Girgorenko and Gary Oberbrunner) Sohail Somani <s dot somani at fincad dot com> Sohail Somani <s dot somani at fincad dot com> 2007-03-06 12:30:54 PST
     Re: [scons-dev] REVIEW: use smart C/C++ linking in the Intel tool chain (Dmitry Girgorenko and Gary Oberbrunner) garyo Gary Oberbrunner 2007-03-06 13:32:29 PST
         Re: [scons-dev] REVIEW: use smart C/C++ linking in the Intel tool chain (Dmitry Girgorenko and Gary Oberbrunner) stevenknight Steven Knight 2007-03-06 13:44:04 PST
             Re: [scons-dev] REVIEW: use smart C/C++ linking in the Intel tool chain (Dmitry Girgorenko and Gary Oberbrunner) garyo Gary Oberbrunner 2007-03-06 13:58:12 PST
     Suggestion for testing WAS: REVIEW: use smart C/C++ linking in the Intel tool chain (Dmitry Girgorenko and Gary Oberbrunner) mortenelo Morten Elo Petersen 2007-03-07 01:01:20 PST
         Re: [scons-dev] Suggestion for testing WAS: REVIEW: use smart C/C++ linking in the Intel tool chain (Dmitry Girgorenko and Gary Oberbrunner) stevenknight Steven Knight 2007-03-07 05:24:09 PST
             Re: [scons-dev] Suggestion for testing WAS: REVIEW: use smart C/C++ linking in the Intel tool chain (Dmitry Girgorenko and Gary Oberbrunner) garyo Gary Oberbrunner 2007-03-07 06:36:04 PST
Messages per page: