This is the mail archive of the
mailing list for the GCC project.
Re: gcc -Os option
- From: Ian Lance Taylor <iant at google dot com>
- To: wizard00 <sys_eng00 at yahoo dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: 24 Aug 2006 18:03:53 -0700
- Subject: Re: gcc -Os option
- References: <firstname.lastname@example.org>
wizard00 <email@example.com> writes:
> gcc try.c -o try would give me linking problem
> /tmp/ccQOkXtu.o: In function `serial_echo_print':
> try.c:(.text+0x31e): undefined reference to `__inb'
> try.c:(.text+0x34a): undefined reference to `__outb'
> try.c:(.text+0x360): undefined reference to `__inb'
> try.c:(.text+0x387): undefined reference to `__outb'
> collect2: ld returned 1 exit status
> but gcc -Os try.c -o try would be OK /w no error
> what's this -Os option? I thought it's only for optimization.
> from upper error it seems as if missing library. I wouldn't make the
> connection between
This message is appropriate for firstname.lastname@example.org, not for
email@example.com. Please direct any followups to gcc-help (only).
Most likely the functions are defined in a header file. When using
-Os they are inlined. When not using optimization they are not
inlined, and must be found in some library.