Can you try:

 

$ (unalias ar; CC=tcc ./configure --enable-shared=no)

 

From: Tinycc-devel [mailto:[email protected]] On 
Behalf Of James Mills
Sent: Saturday, November 28, 2020 12:44
To: [email protected]; [email protected]
Subject: Re: [Tinycc-devel] Building sudo?

 

I did and it fails the same way.

 

cheers

 

James



James Mills / prologic

E:  <mailto:[email protected]> [email protected]

W:  <mailto:https://prologic.shortcircuit.net.au> prologic.shortcircuit.net.au

Blog:   <https://prologic.blog/> Read my Blog

Twtxt:  <https://twtxt.net/user/prologic> Follow me on twtxt.net

 

 

On Sun, Nov 22, 2020 at 3:43 AM Christian Jullien <[email protected]> wrote:

James,

Have you tried "CC=tcc ./configure --enable-shared=no" as I said.
It works ROOTB with sudo-1.9.3p1.tar.gz on both arm (RPi) and x64

w.o. --enable-shared=no it fails because tcc does not support or recognize 
-Wl,--version-script, maybe tcc should simply ignore this option.

-----Original Message-----
From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis 
<mailto:tinycc-devel-bounces%2Beligis> [email protected]] On Behalf Of 
Michael Matz
Sent: Friday, November 20, 2020 20:37
To: [email protected]
Subject: Re: [Tinycc-devel] Building sudo?

Hello,

On Fri, 20 Nov 2020, James Mills wrote:

> Are you saying if I don't alias ar to tcc -ar it will build?

If you have another POSIX compatible ar, I suspect so, yes.

> What am I missing? I need to alias ar to tcc -ar for other builds to 
> work :)

Well, it seems that sudo, as part of its default build process, wants to 
extract archives it built itself.  tcc -ar simply is incapable of that (right 
now), it only supports creating archives.  So, if you don't want to hack sudo's 
build system then you need an 'ar' that can extract archives. 
If you then do have such 'ar' (in $PATH), then not aliasing 'ar' to 'tcc -ar' 
will do the right thing.

If you don't have any such 'ar', but only tcc, then you can't make it work 
except by changing sudo's build system or implementing the missing 
functionality in tcc -ar.

It's may for instance be possible to build binutils (at least parts of it) with 
tcc, then you would have a capable 'ar' program available.


Ciao,
Michael.

> 
> cheers
> James
> 
> James Mills / prologic
> 
> E: [email protected]: prologic.shortcircuit.net.au
> Blog:  Read my Blog
> Twtxt: Follow me on twtxt.net
> 
> 
> On Thu, Nov 19, 2020 at 5:28 AM Michael Matz <[email protected]> wrote:
>       Hello,
>
>       On Tue, 17 Nov 2020, James Mills wrote:
>
>       > Hi guys,
>       > Tried to build sudo with tcc and it fails with:
>       >
>       > libtool: link: (cd .libs/sudoers.lax/libparsesudoers.a && 
> arx"/usr/ports/sudo/build/src/sudo-1.9.3p1/plugins/sudoers/./.libs/libparsesu
>       d
>       > oers.a")
>       > usage: tcc -ar [rcsv] lib file...
>       > create library ([abdioptxN] not supported).
>       > make[1]: *** [Makefile:277: sudoers.la] Error 1
>       > make[1]: Leaving directory
>       > '/usr/ports/sudo/build/src/sudo-1.9.3p1/plugins/sudoers'
>       > make: *** [Makefile:108: all] Error 2
>       > #
>
>       TCCs own 'ar' functionality is very limited, it's not a full
>       replacement.
>
>       > Is tcc missing a feature needed here? Is there a work-around?
>
>       Yes, don't alias 'ar' to 'tcc -ar'.
> 
>
>       Ciao,
>       Michael.
>
>       _______________________________________________
>       Tinycc-devel mailing list
>       [email protected]
>       https://lists.nongnu.org/mailman/listinfo/tinycc-devel
> 
> 
>


_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to