Re: [Samba] Lightweight build of smbclient only
- Date: Fri, 16 Nov 2018 22:01:34 +1300
- From: Andrew Bartlett via samba <samba@xxxxxxxxxxxxxxx>
- Subject: Re: [Samba] Lightweight build of smbclient only
On Thu, 2018-11-15 at 02:24 +0000, Craig McQueen via samba wrote:
> I'm interested in using smbclient in an embedded Linux system, to copy files to a Windows file share. I don't need the entire samba suite. I'd like to get a smbclient compile that is reasonably small (less than 3 MB ideally).
> I'm building the embedded Linux system cross-compiled for an ARM based platform using Yocto. Yocto has support for building samba. But it is aimed at the complete samba suite, whereas I really only want smbclient. In the past I've been able to cut it down reasonably to just the smbclient. But in the last year, changes to samba and the Yocto samba package have made it more difficult to cut it down to a minimal smbclient.
> What would the samba team recommend for cross-compiling a small smbclient suitable for embedded Linux?
It probably still won't be small, but you can try:
This would give you a single static binary.
I did try and to work to have a Samba build that then used global
optimization and linker flags to remove unused code, but those patches
never went anywhere. They were posted to samba-technical under a
thread title of 'making samba small again' a couple of years ago.
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
Samba Developer, Catalyst IT http://catalyst.net.nz/services/samba
To unsubscribe from this list go to the following URL and read the