LLVMにロゴがあったなんて知らなかった。
LLVM 2.7 がリリースされたけれど、X86-64の対応が甘いのは相変わらずっぽい。
自分で解決しろってことか…。
いろいろやってみよう
android_winusb.inf.patch
--- android_winusb.inf.orig 2010-04-17 22:36:28.789163200 +0900 +++ android_winusb.inf 2010-04-17 23:24:14.522073700 +0900 @@ -26,6 +26,9 @@ %ProviderName% = Google, NTx86, NTamd64 [Google.NTx86] +; Xperia X10 +%SingleAdbInterface% = USB_Install, USB\VID_0FCE&PID_D12E +%CompositeAdbInterface% = USB_Install, USB\VID_0FCE&PID_D12E&MI_01 ; HTC Dream %SingleAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C01 %CompositeAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C02&MI_01 @@ -44,6 +47,9 @@ %CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4E12&MI_01 [Google.NTamd64] +; Xperia X10 +%SingleAdbInterface% = USB_Install, USB\VID_0FCE&PID_D12E +%CompositeAdbInterface% = USB_Install, USB\VID_0FCE&PID_D12E&MI_01 ; HTC Dream %SingleAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C01 %CompositeAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C02&MI_01
systems.h
#include <io.h>
#include <windows.h>
#define UNLOCK_FILE(dbf) { \
HANDLE h = (HANDLE)_get_osfhandle(dbf->desc); \
if (INVALID_HANDLE_VALUE != h) { \
UnlockFile(h, 0, 0, (DWORD)-1, (DWORD)-1); \
} \
}
#define READLOCK_FILE(dbf) { \
HANDLE h = (HANDLE)_get_osfhandle(dbf->desc); \
if (INVALID_HANDLE_VALUE == h) { \
lock_val = -1; \
} else { \
OVERLAPPED over; \
ZeroMemory(&over, sizeof(over)); \
DWORD flags = LOCKFILE_FAIL_IMMEDIATELY; \
if (!LockFileEx(h, flags, 0, (DWORD)-1, (DWORD)-1, &over)) { \
lock_val = -1; \
} else { \
lock_val = 0; \
} \
} \
}
#define WRITELOCK_FILE(dbf) { \
HANDLE h = (HANDLE)_get_osfhandle(dbf->desc); \
if (INVALID_HANDLE_VALUE == h) { \
lock_val = -1; \
} else { \
OVERLAPPED over; \
ZeroMemory(&over, sizeof(over)); \
DWORD flags = LOCKFILE_FAIL_IMMEDIATELY | LOCKFILE_EXCLUSIVE_LOCK; \
if (!LockFileEx(h, flags, 0, (DWORD)-1, (DWORD)-1, &over)) { \
lock_val = -1; \
} else { \
lock_val = 0; \
} \
} \
}
$ g++ -static -shared -o hello.dll hello.cc world.cc -Wl,--out-implib,libhello.a
$ g++ -c hello.cc $ g++ -c world.cc $ g++ -mdll -o hello.dll.tmp -Wl,--base-file,hello.dll.base hello.o world.o $ dlltool -l libhello.a --dllname hello.dll --base-file hello.dll.base --output-exp hello.dll.exp --def hello.def $ g++ -mdll -o hello.dll -Wl,hello.dll.exp -static hello.o world.o