public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/58900] New: parsing bug: undefined reference for libraries, specified before source files
@ 2013-10-28  4:24 nick87720z at gmail dot com
  2013-10-28  4:38 ` [Bug other/58900] " nick87720z at gmail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: nick87720z at gmail dot com @ 2013-10-28  4:24 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58900

            Bug ID: 58900
           Summary: parsing bug: undefined reference for libraries,
                    specified before source files
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: nick87720z at gmail dot com

Just an example. I have simple hand-written makefile, which builds executable
with one line. These commands will fail:
$ gcc ${common_flags} ${GTK_FLAGS} -o file_loader file_loader.c
file_loader_callbacks.c
$ gcc -o file_loader ${common_flags} ${GTK_FLAGS} file_loader.c
file_loader_callbacks.c

And only this works:
$ gcc -o file_loader file_loader.c file_loader_callbacks.c ${common_flags}
${GTK_FLAGS}

Strongest trick is that it breaks automatic rules from working (when you just
specify standard things like CC,CFLAGS,LDFLAGS and specify targets with
requirements, not specifying exact commands for each target).

Versions.
OS - ubuntu 12.04. Specified version is gcc-4.8 (Ubuntu 4.8.1-2ubuntu1~12.04)
4.8.1. But it also happens with
* gcc-4.6 (Ubuntu/Linaro 4.6.4-1ubuntu1~12.04) 4.6.4
* gcc-4.7 (Ubuntu/Linaro 4.7.3-2ubuntu1~12.04) 4.7.3 (this i have set default
for now)


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-10-31  7:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-28  4:24 [Bug other/58900] New: parsing bug: undefined reference for libraries, specified before source files nick87720z at gmail dot com
2013-10-28  4:38 ` [Bug other/58900] " nick87720z at gmail dot com
2013-10-28  4:46 ` nick87720z at gmail dot com
2013-10-31  7:17 ` nick87720z at gmail dot com
2013-10-31  7:36 ` nick87720z at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).