From owner-freebsd-hackers Mon Nov 27 9:11:22 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from muncher.iss.net (muncher.iss.net [208.27.178.48]) by hub.freebsd.org (Postfix) with ESMTP id 8B82537B479 for ; Mon, 27 Nov 2000 09:11:18 -0800 (PST) Received: from iss.net (IDENT:ato@localhost [127.0.0.1]) by muncher.iss.net (8.9.3/8.9.3) with ESMTP id MAA21534; Mon, 27 Nov 2000 12:11:16 -0500 Message-ID: <3A2295B4.A23CA0C9@iss.net> Date: Mon, 27 Nov 2000 12:11:16 -0500 From: Andrew Otwell Organization: ISS X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.14-5.0 i686) X-Accept-Language: en MIME-Version: 1.0 To: Steve Kargl Cc: hackers@FreeBSD.ORG Subject: Re: porting Linux application to FreeBSD References: <200011271635.eARGZQw29552@troutmask.apl.washington.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG when I specify "-bloadmap" I get the following output.... int main() { printf("Hello World!!!!!!!\n"); } *Initialization*:1: warning: `__FreeBSD__' redefined *Initialization*:1: warning: this is the location of the previous definition # 1 "/var/tmp/ccWwDByf.i" gcc: installation problem, cannot exec `cc1': No such file or directory gcc: file path prefix `/usr/local/lib/gcc-lib/loadmap/2.95.2/' never used I then ran "locate cc1" and found a binary in /usr/libexec/cc1 "man -k cc1" yields "nothing appropriate". Steve Kargl wrote: > > Andrew Otwell wrote: > > > > A couple of you answered my first query which gave me.... > > > > gcc -nostdinc -I/includedir -nostdlib -L/libdir source.c > > > > This always failed with either.... > > > > ld: No reference to __DYNAMIC > > collect2: ld returned 1 exit status > > > > info gcc > > gcc -v -static -nostdinc -I/includedir -nostdlib source.c \ > -L/libdir -lfirstlib -lsecondlib .... -lc > > The -v flag will show you all aspects of the linking of > your program. The -static flags make gcc use static linking. > The -nostdlib suppress the normal linking of libraries > usually supplied by the system. This means you have to > explicitly list all libraries on the command including the > standard C library. > > -- > Steve -- Andrew Otwell, MSS Special Ops Recon/Surveillance/Developer desk 678.443.6271, aotwell@iss.net, http://www.iss.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message