From owner-freebsd-hackers Fri Aug 3 5:12:33 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by hub.freebsd.org (Postfix) with ESMTP id F391337B405 for ; Fri, 3 Aug 2001 05:12:29 -0700 (PDT) (envelope-from ticso@mail.cicely.de) Received: from mail.cicely.de (cicely20 [10.1.1.22]) by srv1.cosmo-project.de (8.11.0/8.11.0) with ESMTP id f73CCRV46321 for ; Fri, 3 Aug 2001 14:12:28 +0200 (CEST) Received: (from ticso@localhost) by mail.cicely.de (8.11.0/8.11.0) id f73CCQU03257 for freebsd-hackers@freebsd.org; Fri, 3 Aug 2001 14:12:26 +0200 (CEST) Date: Fri, 3 Aug 2001 14:12:25 +0200 From: Bernd Walter To: freebsd-hackers@freebsd.org Subject: linking WITH -lstdc++ makes executeables smaller? Message-ID: <20010803141225.A3246@cicely20.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i X-Operating-System: NetBSD cicely20.cicely.de 1.5 sparc Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I used a library which also needed -lstdc++. Now that I did not need them any more I removed them and was surprised that the resulting FreeBSD binary actually got bigger! On NetBSD the binary is slightly smaller as expected. Is there any logical explanation for this phaenomen? ticso@cicely8> cc -O -pipe -g -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Werror -Wreturn-type -Wswitch -o cbckd *.o -lm -lstdc++ ticso@cicely8> ls -al cbckd -rwxr-xr-x 1 ticso 1000 204628 Aug 3 14:02 cbckd ticso@cicely8> strip cbckd ticso@cicely8> ls -al cbckd -rwxr-xr-x 1 ticso 1000 41300 Aug 3 14:02 cbckd ticso@cicely8> cc -O -pipe -g -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Werror -Wreturn-type -Wswitch -o cbckd *.o -lm ticso@cicely8> ls -al cbckd -rwxr-xr-x 1 ticso 1000 228832 Aug 3 14:02 cbckd ticso@cicely8> strip cbckd ticso@cicely8> ls -al cbckd -rwxr-xr-x 1 ticso 1000 59636 Aug 3 14:02 cbckd -- B.Walter COSMO-Project http://www.cosmo-project.de ticso@cicely.de Usergroup info@cosmo-project.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message