From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 11 08:47:53 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3FD0F37B401 for ; Fri, 11 Apr 2003 08:47:53 -0700 (PDT) Received: from heron.mail.pas.earthlink.net (heron.mail.pas.earthlink.net [207.217.120.189]) by mx1.FreeBSD.org (Postfix) with ESMTP id B7C9943F93 for ; Fri, 11 Apr 2003 08:47:52 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from pool0023.cvx40-bradley.dialup.earthlink.net ([216.244.42.23] helo=mindspring.com) by heron.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 1940kk-0003hs-00; Fri, 11 Apr 2003 08:47:47 -0700 Message-ID: <3E96E351.DB4A4AB@mindspring.com> Date: Fri, 11 Apr 2003 08:46:25 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Gianmarco Giovannelli References: <5.2.0.9.2.20030411082040.02604e90@194.184.65.4> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a42cf4e1d08301924644b1856c9f577af1387f7b89c61deb1d350badd9bab72f9c350badd9bab72f9c cc: hackers@freebsd.org Subject: Re: gcc iussue or ... ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Apr 2003 15:47:53 -0000 Gianmarco Giovannelli wrote: > The problem is very simple. > I mantain a unix/linux port of a UO emulator which works really fine > natively under FreeBSD. > > The problem is that if I compile it under FreeBSD it is a binary of 19M, > while on linux (debian 3.0), same Makefile, is only 2MB. FreeBSD 5.0 and > OpenBSD 3.1 produce the (about) 19M file. > Mingw compiler under windows act like Linux. There are three possibilities. The first, and least likely, since the same compiler and linker is used on both FreeBSD and Linux, is that the uninitialized BSS handling for some large static/global declarations is being handled differently between the platforms. The second, which is more likely, is that there are some large static/global declaractions that get initialized on FreeBSD, but not on Linux. The way to find this is to search for platform "#ifdef"'s in the code. The third, and most likely, is that you are linking with dynamic libraries on Linux, but static libraries on FreeBSD; in other words, you have a FreeBSD Makefile error. To determine if this is the case, you should run "ldd" against the binaries on both platforms. The paths to the libraries are unimportant; the number, and which libraries you *don't* see on FreeBSD, are the important parts. -- Terry