help-libtasn1
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libtasn1 ./configure gets capabilities mixed up of cc and ld


From: Simon Josefsson
Subject: Re: libtasn1 ./configure gets capabilities mixed up of cc and ld
Date: Thu, 25 Aug 2022 19:05:31 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

John Scott <jscott@posteo.net> writes:

> Hello,
>
> I'm not able to build libtasn1 with the Tiny C Compiler
> (git://repo.or.cz/tinycc.git), and I suspect the configure script is to blame.
>
> When just building libtasn1 normally with it, it recognizes tcc is not gcc 
> but 
> says
> checking for non-GNU ld... /bin/ld
> checking if the linker (/bin/ld) is GNU ld... yes
> checking whether the /home/john/tiny-tcc-crypto/prefix/bin/tcc linker 
> (/bin/ld 
> -m elf_x86_64) supports shared libraries... yes
> checking if LD -Wl,--version-script works... no
>
> So it noticed that --version-script doesn't work, but at build-time ld isn't 
> invoked at all but instead tcc is used, which still doesn't support -version-
> script with a single hyphen:
>
> libtool: link:  /home/john/tiny-tcc-crypto/prefix/bin/tcc -shared  -fPIC 
> -DPIC  
> .libs/ASN1.o .libs/coding.o .libs/decoding.o .libs/element.o .libs/errors.o 
> .libs/gstr.o .libs/parser_aux.o .libs/structure.o .libs/version.o  -Wl,--
> whole-archive gl/.libs/libgnu.a -Wl,--no-whole-archive  -lc  -g   -Wl,-soname 
> -Wl,libtasn1.so.6 -Wl,-version-script -Wl,.libs/libtasn1.ver -o .libs/
> libtasn1.so.6.6.0
> tcc: error: unsupported linker option '-version-script'
>
> It also seems like a bad assumption that the /bin/ld it found was the same 
> linker that would be invoked by the C compiler. ./configure --help doesn't 
> show 
> any ways I can override this. Even with --without-gnu-ld the configure script 
> still finds that there is a GNU ld and nothing changes.

Interesting, I added a CI/CD check for tcc with lld, which seems to work
for static builds:

https://gitlab.com/gnutls/libtasn1/-/jobs/2926864043

Can you solve your problem by specifying LD=...?

I think the problem is actually that libtool translates
-export-symbols-regex '^(asn1|libtasn1_).*' into a -version-script
parameter internally, which fails.  Can you confirm by showing the lines
before what you posted?  It should invoke libtool with a
-export-symbols-regex parameter.  Why libtool does that is not clear to
me, maybe report this to the libtool list?

Libtasn1 is a fairly low-level and widely used library, so having it
build on weird compilers and linkers may be useful.

/Simon

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]