From: "'gregkh@linuxfoundation.org'" <gregkh@linuxfoundation.org>
To: "Du, ChangbinX" <changbinx.du@intel.com>
Cc: "'mina86@mina86.com'" <mina86@mina86.com>,
"Fleming, Matt" <matt.fleming@intel.com>,
"'balbi@ti.com'" <balbi@ti.com>,
"'hpa@zytor.com'" <hpa@zytor.com>,
"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>,
"'linux-usb@vger.kernel.org'" <linux-usb@vger.kernel.org>
Subject: Re: [Resend PATCH] tools/usb: fix a makefile bug
Date: Sun, 13 May 2012 21:20:51 -0700 [thread overview]
Message-ID: <20120514042051.GC9750@kroah.com> (raw)
In-Reply-To: <0C18FE92A7765D4EB9EE5D38D86A563A0629F2@SHSMSX101.ccr.corp.intel.com>
On Mon, May 14, 2012 at 03:17:42AM +0000, Du, ChangbinX wrote:
> I try to compile tools/usb foler, but got below error(gcc version
> 4.6.3):
> tools/usb/testusb.c:516: undefined reference to `pthread_create'
> tools/usb/testusb.c:541: undefined reference to `pthread_join'
> The reason is the makefile puts source files behind of compiler option
> "-l". For gcc(and clang), it reads compiler options in order from left
> to right. When compiler gets a source file, it starts parsing it and try
> to resolve all symbols invoked. If compiler can not resolve a symbol, it
> will read --remain-- options and try get a definition of the symbol. So,
> if we put source file behind of "-l" option, the specified library will
> not work.
>
> Signed-off-by: Du Changbin <changbinx.du@intel.com>
I think that's a regression in your version of gcc, as 4.6.2 here works
just fine with no errors.
What distro's version of gcc are you using here? What changed between
4.6.2 and 4.6.3 that would do this?
I just tried 4.5.3 and it worked just fine as well.
I'm thinking something might be messed up on your end here, and this
patch isn't really needed.
thanks,
greg k-h
prev parent reply other threads:[~2012-05-14 4:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-14 3:17 [Resend PATCH] tools/usb: fix a makefile bug Du, ChangbinX
2012-05-14 4:20 ` 'gregkh@linuxfoundation.org' [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120514042051.GC9750@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=balbi@ti.com \
--cc=changbinx.du@intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=matt.fleming@intel.com \
--cc=mina86@mina86.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.