On Tue, Oct 16, 2012 at 3:07 PM, Greg Kroah-Hartman
<gre...@linuxfoundation.org> wrote:
> On Tue, Oct 16, 2012 at 09:57:16AM +0800, Xiaofan Chen wrote:
>> I only need one fix for Mac OS X as Apple's gcc compiler does
>> not like --as-needed.
>
> I didn't think Apple used gcc anymore.  How about testing to see if this
> is a valid option before trying to use it instead of just removing it?

Apple calls its compiler gcc. But yes it is llvm based.

mymacmini:usbutils xiaofanc$ gcc -v
Using built-in specs.
Target: i686-apple-darwin11
Configured with:
/private/var/tmp/llvmgcc42/llvmgcc42-2336.11~67/src/configure
--disable-checking --enable-werror
--prefix=/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2
--mandir=/share/man --enable-languages=c,objc,c++,obj-c++
--program-prefix=llvm-
--program-transform-name=/^[cg][^.-]*$/s/$/-4.2/
--with-slibdir=/usr/lib --build=i686-apple-darwin11
--enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.11~67/dst-llvmCore/Developer/usr/local
--program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11
--target=i686-apple-darwin11
--with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)

I see what you mean. I do not know how to do that though since
I know very little of autotools.

>> mymacmini:usbutils xiaofanc$ git diff
>> diff --git a/Makefile.am b/Makefile.am
>> index 4e53e45..e8cb002 100644
>> --- a/Makefile.am
>> +++ b/Makefile.am
>> @@ -1,8 +1,7 @@
>>  SUBDIRS = \
>>         usbhid-dump
>>
>> -AM_LDFLAGS = \
>> -       -Wl,--as-needed
>
> You also just dropped -Wl, any reason why?

I see. The following patch will still work for Mac OS X.
But I think you want a better patch. Hopefully someone
more capable can come out with a better patch.

mymacmini:usbutils xiaofanc$ git diff
diff --git a/Makefile.am b/Makefile.am
index 4e53e45..f534bc8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,7 +2,7 @@ SUBDIRS = \
        usbhid-dump

 AM_LDFLAGS = \
-       -Wl,--as-needed
+       -Wl

 data_DATA =

-- 
Xiaofan

------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to