On Fri, Aug 16, 2013 at 4:51 PM, Hans de Goede <hdego...@redhat.com> wrote:
> On 08/16/2013 05:34 AM, Xiaofan Chen wrote:
>>> diff --git a/libusb/Makefile.am b/libusb/Makefile.am
>>> index 33a609a..a20fdb5 100644
>>> --- a/libusb/Makefile.am
>>> +++ b/libusb/Makefile.am
>>> @@ -5,5 +5,5 @@ libusb_la_SOURCES = core.c usbi.h
>>>   libusb_la_CFLAGS = -fvisibility=hidden $(AM_CFLAGS)
>>> $(LIBUSB_1_0_CFLAGS)
>>>   libusb_la_LIBADD = $(LIBUSB_1_0_LIBS)
>>>   libusb_la_LDFLAGS = -version-info $(LT_MAJOR):$(LT_REVISION):$(LT_AGE)
>>> \
>>> -       -release 0.1
>>> +       -release 0.1 -Wl,-z -Wl,nodelete
>>>
>>
>> Just wondering if this is applicable for other OS as well
>> (eg: Mac OS X).
>
>
> I'm not sure.
>

It breaks Mac OS X. I tried both Apple cc (clang) and Apple gcc.

Apple gcc:

libtool: link: gcc -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -o
.libs/libusb-0.1.4.dylib  .libs/libusb_la-core.o
-L/usr/local/Cellar/libusb/1.0.9/lib -lusb-1.0  -O2 -Wl,-z
-Wl,nodelete   -install_name  /usr/local/lib/libusb-0.1.4.dylib
-compatibility_version 9 -current_version 9.4 -Wl,-single_module
ld: unknown option: -z
collect2: ld returned 1 exit status

Apple cc (clang)

libtool: link: cc -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -o
.libs/libusb-0.1.4.dylib  .libs/libusb_la-core.o
-L/usr/local/Cellar/libusb/1.0.9/lib -lusb-1.0  -O2 -Wl,-z
-Wl,nodelete   -install_name  /usr/local/lib/libusb-0.1.4.dylib
-compatibility_version 9 -current_version 9.4 -Wl,-single_module
ld: unknown option: -z
clang: error: linker command failed with exit code 1 (use -v to see invocation)

mymacmini:libusb-compat-0.1 xiaofanc$ gcc -v
Using built-in specs.
Target: i686-apple-darwin11
Configured with:
/private/var/tmp/llvmgcc42/llvmgcc42-2336.11~182/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~182/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)

mymacmini:libusb-compat-0.1 xiaofanc$ cc -v
Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin11.4.2
Thread model: posix

-- 
Xiaofan

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to