[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Support for the Intel C++ compiler is broken
From: |
Roberto Bagnara |
Subject: |
Re: Support for the Intel C++ compiler is broken |
Date: |
Mon, 19 Apr 2004 17:54:24 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040116 |
Gary V. Vaughan wrote:
Roberto Bagnara wrote:
|
| Support for the Intel C++ compiler under GNU/Linux used to work,
| starting from libtool 1.5, with version 7.1-x of the compiler. With
| version 8.0-x of Intel C++ things no longer work and upgrading to
| libtool 1.5.2 does not help.
|
| The command
|
| /bin/sh ./libtool --mode=link icpc -g -O2 -o libfoo.la \
| -rpath /usr/local/lib -no-undefined foo.lo -lm
|
| is translated into the (incredibly hairy) command
|
| icpc -shared /usr/lib/crti.o /opt/intel_cc_80/lib/crtxi.o
.libs/foo.o \
| -L/opt/intel_cc_80/lib -L/usr/lib -limf -lm -lcprts -lcxa -lunwind \
| -lc -lirc /opt/intel_cc_80/lib/crtxn.o /usr/lib/crtn.o
-Wl,-soname \
| -Wl,libfoo.so.0 -o .libs/libfoo.so.0.0.0
My bet is that a manual invocation of:
~ icpc -shared .libs/foo.o -lm -Wl,-soname -Wl,libfoo.so.0 \
~ -o .libs/libfoo.so.0.0.0
will work.
It does, indeed.
It seems that icpc-8.0-x is adding the predep_ and postdep_objects itself,
where icpc-7.1-x did not. Is there a --version equivalent that can be used
to distinguish the two flavours?
Yes: both version 7.1 and version 8.0 support `-V':
$ /opt/intel/compiler70/ia32/bin/icpc -V
Intel(R) C++ Compiler for 32-bit applications, Version 7.1 Build 20030909Z
Copyright (C) 1985-2003 Intel Corporation. All rights reserved.
FOR NON-COMMERCIAL USE ONLY
GNU ld version 2.13.90.0.18 20030206
Supported emulations:
elf_i386
i386linux
/usr/lib/crt1.o(.text+0x18): In function `_start':
../sysdeps/i386/elf/start.S:77: undefined reference to `main'
$
$ /opt/intel_cc_80/bin/icpc -V
Intel(R) C++ Compiler for 32-bit applications, Version 8.0 Build 20040211Z
Package ID: l_cc_pc_8.0.058_pe060
Copyright (C) 1985-2004 Intel Corporation. All rights reserved.
FOR NON-COMMERCIAL USE ONLY
icpc: Command line error: no files specified; for help type "icpc -help"
$
In addition, version 8.0 supports `--version':
$ /opt/intel/compiler70/ia32/bin/icpc --version
icpc: Command line warning: ignoring unknown option '-fversion'
/usr/lib/crt1.o(.text+0x18): In function `_start':
../sysdeps/i386/elf/start.S:77: undefined reference to `main'
$
$ /opt/intel_cc_80/bin/icpc --version
8.0
$
To check my diagnosis, please edit your generated project libtool script,
search down for '# ### BEGIN LIBTOOL TAG CONFIG: CXX' (without the quotes),
and then below that for '# Commands used to build a shared archive.'. Then
remove '\$predep_objects' and '\$postdep_objects' from the assignments to
archive_cmds and archive_expsym_cmds just below that comment. Without
reconfiguring (to make sure your libtool edits aren't overwritten) retry
your make command and see whether the shorter link line above is used, and
whether it works.
It works perfectly!
I can commit a proper patch to the development tree based on the results of
the above.
Great! Please, let me know when you have done it: I will test everything
again also on larger projects and let you know how it goes.
Thanks a lot,
Roberto
--
Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:address@hidden
- Support for the Intel C++ compiler is broken, Roberto Bagnara, 2004/04/16
- Re: {SPAM 03.3} Support for the Intel C++ compiler is broken, Gary V. Vaughan, 2004/04/16
- Re: {SPAM 03.3} Support for the Intel C++ compiler is broken, Roberto Bagnara, 2004/04/17
- Re: {SPAM 03.3} Re: {SPAM 03.3} Support for the Intel C++ compiler is broken, Gary V . Vaughan, 2004/04/19
- Re: Support for the Intel C++ compiler is broken, Roberto Bagnara, 2004/04/20
- Re: {SPAM 03.3} Re: Support for the Intel C++ compiler is broken, Gary V . Vaughan, 2004/04/20
- Re: Support for the Intel C++ compiler is broken, Roberto Bagnara, 2004/04/21
- Re: Support for the Intel C++ compiler is broken, Gary V. Vaughan, 2004/04/23
- Re: Support for the Intel C++ compiler is broken, Roberto Bagnara, 2004/04/24
- Re: {SPAM 03.3} Re: Support for the Intel C++ compiler is broken, Gary V . Vaughan, 2004/04/24
Re: Support for the Intel C++ compiler is broken,
Roberto Bagnara <=