Date: Mon, 7 Feb 2000 20:13:19 +0100 From: "Marco van de Voort" <marcov@stack.nl> To: John Polstra <jdp@polstra.com> Cc: hackers@freebsd.org Subject: Re: how to compile without libc (so not static) Message-ID: <20000207191543.E365F2E802@hermes.tue.nl> In-Reply-To: <200002071703.JAA70677@vashon.polstra.com> References: <20000204161324.B2DE396D7@toad.stack.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
> I suspect that "gcc" isn't the standard FreeBSD C compiler in your > case. Try "which gcc" and find out. It works fine for me on both > -stable and -current with "cc": It is an older one indeed. > blake$ cc -v -nostdlib hello.c > Using builtin specs. > gcc version 2.95.2 19991024 (release) > /usr/libexec/cpp -lang-c -v -D__GNUC__=2 -D__GNUC_MINOR__=95 -Di386 -Dunix -D__FreeBSD__=4 -D__FreeBSD_cc_version=400004 -D__i386__ -D__unix__ -D__FreeBSD__=4 -D__FreeBSD_cc_version=400004 -D__i386 -D__unix -Acpu(i386) -Amachine(i386) -Asystem(unix) -Asystem(FreeBSD) -Acpu(i386) - Amachine(i386) -Di386 -D__i386 -D__i386__ -D__ELF__ hello.c /tmp/cciRD216.i > GNU CPP version 2.95.2 19991024 (release) (i386 FreeBSD/ELF) > #include "..." search starts here: > #include <...> search starts here: > /usr/include > /usr/include > End of search list. > The following default directories have been omitted from the search path: > /usr/include/g++ > End of omitted list. > /usr/libexec/cc1 /tmp/cciRD216.i -quiet -dumpbase hello.c -version -o /tmp/ccbyU216.s > GNU C version 2.95.2 19991024 (release) (i386-unknown-freebsd) compiled by GNU C version 2.95.2 19991024 (release). > /usr/libexec/elf/as -v -o /tmp/ccWvs216.o /tmp/ccbyU216.s > GNU assembler version 2.9.1 (i386-unknown-freebsdelf), using BFD version 2.9.1 > /usr/libexec/elf/ld -m elf_i386 -dynamic-linker /usr/libexec/ld-elf.so.1 -L/usr/libexec/elf -L/usr/libexec -L/usr/lib /tmp/ccWvs216.o > /usr/libexec/elf/ld: warning: cannot find entry symbol _start; defaulting to 08048074 > /tmp/ccWvs216.o: In function `main': > /tmp/ccWvs216.o(.text+0xf): undefined reference to `printf' Still doesn't work though with the newer one :-) (try some arithmetic to see if that works. Marco van de Voort (MarcoV@Stack.nl) <http://www.stack.nl/~marcov/xtdlib.htm> To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000207191543.E365F2E802>