[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patch #9467] Fix -export-symbols and -export-symbols-regex support on S
From: |
Bruno Haible |
Subject: |
[patch #9467] Fix -export-symbols and -export-symbols-regex support on Solaris 11.3 |
Date: |
Sat, 21 Oct 2017 08:40:54 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0 |
URL:
<http://savannah.gnu.org/patch/?9467>
Summary: Fix -export-symbols and -export-symbols-regex
support on Solaris 11.3
Project: GNU Libtool
Submitted by: haible
Submitted on: Sat 21 Oct 2017 02:40:53 PM CEST
Category: None
Priority: 7 - High
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
The build of GNU libffcall 2.0 (which uses the libtool -export-symbols-regex
option) fails on Solaris 11.3:
/bin/sh ../libtool --mode=link gcc -m64 -O2 -o libavcall.la -rpath
/export/home/bruno/prefix64/lib -no-undefined -export-symbols-regex
'^avcall_|^__builtin_avcall$' -version-info 1:0:0 avcall.lo avcall-libapi.lo
avcall-structcpy.lo avcall-compat.lo -L/export/home/bruno/prefix64/lib
libtool: link: /usr/bin/nm -p .libs/avcall-x86_64.o .libs/avcall-libapi.o
.libs/avcall-structcpy.o .libs/avcall-compat.o | | /usr/bin/gsed 's/.* //'
| sort | uniq > .libs/libavcall.exp
../libtool[1721]: eval: syntax error at line 1: `|' unexpected
*** Error code 3
make: Fatal error: Command failed for target `libavcall.la'
On Solaris 11.0 this works fine:
/bin/sh ../libtool --mode=link gcc -m64 -O2 -o libavcall.la -rpath
/home/bruno/prefix64/lib -no-undefined -export-symbols-regex
'^avcall_|^__builtin_avcall$' -version-info 1:0:0 avcall.lo avcall-libapi.lo
avcall-structcpy.lo avcall-compat.lo -L/home/bruno/prefix64/lib
libtool: link: /usr/bin/nm -p .libs/avcall-x86_64.o .libs/avcall-libapi.o
.libs/avcall-structcpy.o .libs/avcall-compat.o | sed -n -e 's/^.*[
]\([BDRT][BDRT]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' |
sed '/
__gnu_lto/d' | /usr/bin/gsed 's/.* //' | sort | uniq > .libs/libavcall.exp
libtool: link: /usr/bin/ggrep -E -e "^avcall_|^__builtin_avcall$"
".libs/libavcall.exp" > ".libs/libavcall.expT"
libtool: link: mv -f ".libs/libavcall.expT" ".libs/libavcall.exp"
libtool: link: echo "{ global:" > .libs/libavcall.so.1.0.0.exp
libtool: link: cat .libs/libavcall.exp | /usr/bin/gsed -e "s/\(.*\)/\1;/" >>
.libs/libavcall.so.1.0.0.exp
libtool: link: echo "local: *; };" >> .libs/libavcall.so.1.0.0.exp
libtool: link: gcc -m64 -O2 -shared -fPIC -DPIC -Wl,-z -Wl,text -Wl,-M
-Wl,.libs/libavcall.so.1.0.0.exp -Wl,-h -Wl,libavcall.so.1 -o
.libs/libavcall.so.1.0.0 .libs/avcall-x86_64.o .libs/avcall-libapi.o
.libs/avcall-structcpy.o .libs/avcall-compat.o -L/home/bruno/prefix64/lib
-lc -m64 -O2
libtool: link: rm -f .libs/libavcall.so.1.0.0.exp
libtool: link: (cd ".libs" && rm -f "libavcall.so.1" && ln -s
"libavcall.so.1.0.0" "libavcall.so.1")
libtool: link: (cd ".libs" && rm -f "libavcall.so" && ln -s
"libavcall.so.1.0.0" "libavcall.so")
libtool: link: ar cru .libs/libavcall.a avcall-x86_64.o avcall-libapi.o
avcall-structcpy.o avcall-compat.o
libtool: link: ranlib .libs/libavcall.a
libtool: link: ( cd ".libs" && rm -f "libavcall.la" && ln -s "../libavcall.la"
"libavcall.la" )
The reason for this error is that at configure time, we see
checking command to parse /usr/bin/nm -p output from gcc -m64 -O2 object...
failed
whereas on Solaris 11.0 it is
checking command to parse /usr/bin/nm -p output from gcc -m64 -O2 object...
ok
The reason for that is that the "/usr/bin/nm -p" output has slightly changed.
For the test program created by configure, it is:
conftest.o:
00000000000000000000 s
00000000000000000000 s
00000000000000000000 s
00000000000000000000 s
00000000000000000000 s
00000000000000000000 s
00000000000000000000 s
00000000000000000000 b
00000000000000000000 s
00000000000000000000 s
00000000000000000000 s
00000000000000000000 s
00000000000000000000 f conftest.c
00000000000000000000 T main
00000000000000000000 T nm_test_func
00000000000000000001 C nm_test_var
whereas on Solaris 11.0 it was using 'D' instead of 'C'.
With the attached patch, configure finds that the thing works, and the build
of libffcall succeeds.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Sat 21 Oct 2017 02:40:53 PM CEST Name:
0001-Fix-export-symbols-and-export-symbols-regex-support-.patch Size: 846B
By: haible
<http://savannah.gnu.org/patch/download.php?file_id=42205>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/patch/?9467>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [patch #9467] Fix -export-symbols and -export-symbols-regex support on Solaris 11.3,
Bruno Haible <=