From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2690 Path: news.gmane.org!not-for-mail From: Alexander Stadler Newsgroups: gmane.linux.lib.musl.general Subject: Re: Bug in include/netinet/in.h Date: Tue, 29 Jan 2013 18:37:54 +0100 Message-ID: <510808F2.9030002@univie.ac.at> References: <51001259.8040602@univie.ac.at> <510016A5.2000903@barfooze.de> <20130123171138.GT20323@brightrain.aerifal.cx> <510189DB.6070106@univie.ac.at> <51019D9B.2040300@barfooze.de> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1359481075 26696 80.91.229.3 (29 Jan 2013 17:37:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Jan 2013 17:37:55 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2691-gllmg-musl=m.gmane.org@lists.openwall.com Tue Jan 29 18:38:11 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1U0F8M-0005a3-CD for gllmg-musl@plane.gmane.org; Tue, 29 Jan 2013 18:38:10 +0100 Original-Received: (qmail 9392 invoked by uid 550); 29 Jan 2013 17:37:51 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 9383 invoked from network); 29 Jan 2013 17:37:51 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=univie.ac.at; s=rev2; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:References:Subject:To:MIME-Version:From:Date:Message-ID; bh=GH2fxuU5yyKgSLQkiT+pAnu96+flKBRjIRTZyaQySm4=; b=AwfHDX81+CTAGYa7PN2rAX26g8WRp9qu0nNKa4B+4yaY8Y3+HM4DbMhAFuhd5NTUROSDqM8WJh+8UWRJ833uwfGkvVglNigK9Lps2ZvPyMZOv5uGG5vZvjTCol2WJqUJJ7eCGikkmW7f0Iy9JYvKjAhabMR2Q7jqjWtI35kfZuw=; User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20 In-Reply-To: <51019D9B.2040300@barfooze.de> X-Univie-Virus-Scan: scanned by ClamAV on joan.univie.ac.at Xref: news.gmane.org gmane.linux.lib.musl.general:2690 Archived-At: Am 24.01.2013 21:46, schrieb John Spencer: > On 01/24/2013 08:22 PM, Alexander Stadler wrote: >> >> I removed -Werror from CMakeLists.txt of netifd, after that it compiled (with warnings ;-) ). >> Thank you! >> >> (only size shocked me - 450KB (one day before with uClibc 50KB :-/ )) >> > probably something went wrong here, usually musl-linked binaries are a good bit smaller than their uclibc-linked counterparts. > some guesses: > - uclibc binary is linked dynamically, but the musl one statically > - debug mode (-g) was used for the musl binary > - uclibc binary was stripped (-s) but musl one wasn't > > i'd try to use strip tool on both binaries and compare > additionally comparing the used CFLAGS used by the compiler might give hints (compile both in verbose mode and compare build logs) > for smallest binary size, usually -flto -fwhole-program -s -Os give the best results with gcc >= 4.5.0 (however lto makes the build notably slower) > Thanks for the answer. And the optimization parameters, I propably will play with them at some time. https://dev.openwrt.org/changeset/34427 disables sstrip when musl is used, but does not select strip instead. Unfortunately I don't know why sstrip got disabled. But after enabling strip instead the size reaches comparable values (same too a bit larger most of the time).