patchGNU Libtool - Patches: patch #9467, Fix -export-symbols and...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #9467: Fix -export-symbols and -export-symbols-regex support on Solaris 11.3

Submitter:  Bruno Haible <haible>
Submitted:  Sat 21 Oct 2017 12:40:53 PM UTC
   
 
Category:  None Priority:  7 - High
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open

Sun 05 Feb 2023 03:39:37 PM UTC, comment #1: 

This patch is also needed for Solaris 11.4.

Bruno Haible <haible>
Sat 21 Oct 2017 12:40:53 PM UTC, original submission:  

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.

Bruno Haible <haible>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by haible (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-10-21 haible Attached File- Added 0001-Fix-export-symbols-and-export-symbols-regex-support-.patch, #42206
    2017-10-21 haible Attached File- Added 0001-Fix-export-symbols-and-export-symbols-regex-support-.patch, #42205

    Back to the top

    Powered by Savane 3.14-8eb0.
    Corresponding source code