Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Apr 2003 08:46:25 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Gianmarco Giovannelli <gmarco@giovannelli.it>
Cc:        hackers@freebsd.org
Subject:   Re: gcc iussue or ... ?
Message-ID:  <3E96E351.DB4A4AB@mindspring.com>
References:  <5.2.0.9.2.20030411082040.02604e90@194.184.65.4>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E96E351.DB4A4AB>