Sampo Ahokas
2009-08-27 15:02:12 UTC
Hi all,
Here's some minor patches to fix build on MinGW. Build with MSYS 1.0.11
/ MinGW GCC 4.4.0 completes without errors using the patched tree
(omniORB 4.1.4).
rebase.exe is not included in mingw installation, so rebasing the DLLs
was just disabled. We only use static libraries, and I am not certain
whether this causes some problems or performance hit with the dynamic libs.
The advapi32.lib linking was copied from src/lib/omniORB/orbcore/dir.mk
and applied also to ssl/dir.mk, which I haven't tested but obviously has
the same problem.
Best regards,
Sampo Ahokas
OpenTTCN Ltd
-------------- next part --------------
diff -ru omniORB-4.1.4-clean/include/omniORB4/linkHacks.h omniORB-4.1.4/include/omniORB4/linkHacks.h
--- omniORB-4.1.4-clean/include/omniORB4/linkHacks.h 2007-03-23 14:37:30.000000000 +0200
+++ omniORB-4.1.4/include/omniORB4/linkHacks.h 2009-08-26 17:02:06.000000000 +0300
@@ -69,7 +69,7 @@
return _omni_ ## modname ## _forcelink_; \
}
-#elif defined(__WIN32__)
+#elif defined(_MSC_VER)
// The Windows non-uniform memory model means that we cannot access
// the integer's value. Referring to its address is sufficient to
diff -ru omniORB-4.1.4-clean/src/lib/dir.mk omniORB-4.1.4/src/lib/dir.mk
--- omniORB-4.1.4-clean/src/lib/dir.mk 2003-03-23 23:02:54.000000000 +0200
+++ omniORB-4.1.4/src/lib/dir.mk 2009-08-26 17:12:33.000000000 +0300
@@ -16,8 +16,10 @@
ifndef EmbeddedSystem
ifdef Win32Platform
+ifndef MinGW32Build
export::
(cd $(EXPORT_TREE)/$(BINDIR); rebase.exe -b 0x68000000 -d *_rt.dll; )
(cd $(EXPORT_TREE)/$(BINDIR); rebase.exe -b 0x68000000 -d *_rtd.dll; )
endif
endif
+endif
diff -ru omniORB-4.1.4-clean/src/lib/omniORB/connections/dir.mk omniORB-4.1.4/src/lib/omniORB/connections/dir.mk
--- omniORB-4.1.4-clean/src/lib/omniORB/connections/dir.mk 2006-07-19 12:27:48.000000000 +0300
+++ omniORB-4.1.4/src/lib/omniORB/connections/dir.mk 2009-08-26 17:02:05.000000000 +0300
@@ -17,7 +17,7 @@
DIR_CPPFLAGS += -D"NTArchitecture"
vpath %.cc $(VPATH):$(VPATH:%=%/../orbcore)
SHARED_ONLY_OBJS = msvcdllstub.o
- EXTRA_LIBS = advapi32.lib
+ EXTRA_LIBS = $(patsubst %,$(LibNoDebugSearchPattern),advapi32)
MSVC_STATICLIB_CXXNODEBUGFLAGS += -D_WINSTATIC
MSVC_STATICLIB_CXXDEBUGFLAGS += -D_WINSTATIC
endif
diff -ru omniORB-4.1.4-clean/src/lib/omniORB/orbcore/ssl/dir.mk omniORB-4.1.4/src/lib/omniORB/orbcore/ssl/dir.mk
--- omniORB-4.1.4-clean/src/lib/omniORB/orbcore/ssl/dir.mk 2006-07-18 19:21:21.000000000 +0300
+++ omniORB-4.1.4/src/lib/omniORB/orbcore/ssl/dir.mk 2009-08-27 11:23:45.000000000 +0300
@@ -18,7 +18,7 @@
CXXSRCS = $(SSL_SRCS)
ifdef Win32Platform
-EXTRA_LIBS = $(SOCKET_LIB) advapi32.lib
+EXTRA_LIBS = $(SOCKET_LIB) $(patsubst %,$(LibNoDebugSearchPattern),advapi32)
SHARED_ONLY_OBJS = msvcdllstub.o
DIR_CPPFLAGS += -D"NTArchitecture"
MSVC_STATICLIB_CXXNODEBUGFLAGS += -D_WINSTATIC
Here's some minor patches to fix build on MinGW. Build with MSYS 1.0.11
/ MinGW GCC 4.4.0 completes without errors using the patched tree
(omniORB 4.1.4).
rebase.exe is not included in mingw installation, so rebasing the DLLs
was just disabled. We only use static libraries, and I am not certain
whether this causes some problems or performance hit with the dynamic libs.
The advapi32.lib linking was copied from src/lib/omniORB/orbcore/dir.mk
and applied also to ssl/dir.mk, which I haven't tested but obviously has
the same problem.
Best regards,
Sampo Ahokas
OpenTTCN Ltd
-------------- next part --------------
diff -ru omniORB-4.1.4-clean/include/omniORB4/linkHacks.h omniORB-4.1.4/include/omniORB4/linkHacks.h
--- omniORB-4.1.4-clean/include/omniORB4/linkHacks.h 2007-03-23 14:37:30.000000000 +0200
+++ omniORB-4.1.4/include/omniORB4/linkHacks.h 2009-08-26 17:02:06.000000000 +0300
@@ -69,7 +69,7 @@
return _omni_ ## modname ## _forcelink_; \
}
-#elif defined(__WIN32__)
+#elif defined(_MSC_VER)
// The Windows non-uniform memory model means that we cannot access
// the integer's value. Referring to its address is sufficient to
diff -ru omniORB-4.1.4-clean/src/lib/dir.mk omniORB-4.1.4/src/lib/dir.mk
--- omniORB-4.1.4-clean/src/lib/dir.mk 2003-03-23 23:02:54.000000000 +0200
+++ omniORB-4.1.4/src/lib/dir.mk 2009-08-26 17:12:33.000000000 +0300
@@ -16,8 +16,10 @@
ifndef EmbeddedSystem
ifdef Win32Platform
+ifndef MinGW32Build
export::
(cd $(EXPORT_TREE)/$(BINDIR); rebase.exe -b 0x68000000 -d *_rt.dll; )
(cd $(EXPORT_TREE)/$(BINDIR); rebase.exe -b 0x68000000 -d *_rtd.dll; )
endif
endif
+endif
diff -ru omniORB-4.1.4-clean/src/lib/omniORB/connections/dir.mk omniORB-4.1.4/src/lib/omniORB/connections/dir.mk
--- omniORB-4.1.4-clean/src/lib/omniORB/connections/dir.mk 2006-07-19 12:27:48.000000000 +0300
+++ omniORB-4.1.4/src/lib/omniORB/connections/dir.mk 2009-08-26 17:02:05.000000000 +0300
@@ -17,7 +17,7 @@
DIR_CPPFLAGS += -D"NTArchitecture"
vpath %.cc $(VPATH):$(VPATH:%=%/../orbcore)
SHARED_ONLY_OBJS = msvcdllstub.o
- EXTRA_LIBS = advapi32.lib
+ EXTRA_LIBS = $(patsubst %,$(LibNoDebugSearchPattern),advapi32)
MSVC_STATICLIB_CXXNODEBUGFLAGS += -D_WINSTATIC
MSVC_STATICLIB_CXXDEBUGFLAGS += -D_WINSTATIC
endif
diff -ru omniORB-4.1.4-clean/src/lib/omniORB/orbcore/ssl/dir.mk omniORB-4.1.4/src/lib/omniORB/orbcore/ssl/dir.mk
--- omniORB-4.1.4-clean/src/lib/omniORB/orbcore/ssl/dir.mk 2006-07-18 19:21:21.000000000 +0300
+++ omniORB-4.1.4/src/lib/omniORB/orbcore/ssl/dir.mk 2009-08-27 11:23:45.000000000 +0300
@@ -18,7 +18,7 @@
CXXSRCS = $(SSL_SRCS)
ifdef Win32Platform
-EXTRA_LIBS = $(SOCKET_LIB) advapi32.lib
+EXTRA_LIBS = $(SOCKET_LIB) $(patsubst %,$(LibNoDebugSearchPattern),advapi32)
SHARED_ONLY_OBJS = msvcdllstub.o
DIR_CPPFLAGS += -D"NTArchitecture"
MSVC_STATICLIB_CXXNODEBUGFLAGS += -D_WINSTATIC