From owner-freebsd-current Mon Mar 1 10: 7:28 1999 Delivered-To: freebsd-current@freebsd.org Received: from ix.netcom.com (sil-wa15-25.ix.netcom.com [207.93.148.25]) by hub.freebsd.org (Postfix) with ESMTP id 709C3154EA for ; Mon, 1 Mar 1999 10:07:14 -0800 (PST) (envelope-from tomdean@ix.netcom.com) Received: (from tomdean@localhost) by ix.netcom.com (8.9.3/8.8.8) id KAA56314; Mon, 1 Mar 1999 10:06:58 -0800 (PST) (envelope-from tomdean) Date: Mon, 1 Mar 1999 10:06:58 -0800 (PST) Message-Id: <199903011806.KAA56314@ix.netcom.com> From: Thomas Dean To: freebsd-current@freebsd.org Subject: egcs and gcc Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I installed egcs from the port. eg++ produces larger binaries than g++. From this trivial example, I would expect these files to be very similar in size. obj_size exe_size strip_exe_size -------- -------- -------------- g++ 972 7150 5464 eg++ 1188 299547 76792 eg++ seems to produce faster executables. tomdean == the code ========================================== #! /bin/sh doit() { echo "# $1" $1 } == the output ========================================== # g++ --version 2.7.2.1 # g++ -m486 -O2 -c hello.cc # ls -l hello.o -rw-r--r-- 1 tomdean users 972 Mar 1 09:33 hello.o # g++ -m486 -O2 hello.cc -o hello # ls -l hello -rwxr-xr-x 1 tomdean users 7150 Mar 1 09:33 hello # file hello hello: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), \ dynamically linked, not stripped # strip hello # ls -l hello -rwxr-xr-x 1 tomdean users 5464 Mar 1 10:02 hello # file hello hello: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), \ dynamically linked, stripped # time hello Hello, world. 0.07 real 0.05 user 0.02 sys # eg++ --version egcs-2.91.60 # eg++ -m486 -O2 -c hello.cc # ls -l hello.o -rw-r--r-- 1 tomdean users 1188 Mar 1 09:33 hello.o # eg++ -m486 -O2 hello.cc -o hello # ls -l hello -rwxr-xr-x 1 tomdean users 299547 Mar 1 09:33 hello # file hello hello: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), \ dynamically linked, not stripped # strip hello # ls -l hello -rwxr-xr-x 1 tomdean users 76792 Mar 1 10:02 hello # file hello hello: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), \ dynamically linked, stripped # time hello Hello, world. 0.02 real 0.00 user 0.02 sys To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message