Mac OS X and Wine Build System [2]

Pierre d'Herbemont stegefin at free.fr
Tue Nov 25 14:02:54 CST 2003


Hi!

There are only three issues left, and after that Wine could be built on 
a Mac OS X/Darwin from WineHQ's CVS.
When building dynamic library (shared object) object files, the 
-fno-common flag must be specified because Mac OS X's linker doesn't 
allow common symbols in shared library. So I added a LIBFLAGS var which 
can be specfied to add the -fno-common flag to the CFLAGS.
Please Notice that the static lib libwine_wpp mustn't have a 
-fno-common, whereas libwine_port must have one. To handle the 
different cases, libs which need -fno-common receive a @COMMONFLAG@ 
defined in the configure.ac.

Thanks,

Pierre.

ChangeLog
Add Support for /libs building on Darwin/Mac OS X.
-------------- next part --------------
Index: configure.ac
===================================================================
RCS file: /home/wine/wine/configure.ac,v
retrieving revision 1.211
diff -u -r1.211 configure.ac
--- configure.ac	25 Nov 2003 03:31:26 -0000	1.211
+++ configure.ac	25 Nov 2003 19:57:10 -0000
@@ -841,6 +841,7 @@
 AC_SUBST(DLLFLAGS,"-D_REENTRANT")
 AC_SUBST(DLLIBS,"")
 AC_SUBST(LDSHARED,"")
+AC_SUBST(COMMONFLAGS,"")
 AC_SUBST(LDDLL,"")
 AC_SUBST(LIBEXT,"so")
 AC_SUBST(IMPLIBEXT,"def")
@@ -926,6 +927,7 @@
             LIBEXT="dylib"
             LDDLL="\$(CC) -bundle -flat_namespace -undefined suppress"
             LDSHARED="\$(CC) -dynamiclib"
+            COMMONFLAGS="-fno-common"
             CFLAGS="$CFLAGS -ffixed-r13 -no-cpp-precomp"
           fi
         fi
Index: Make.rules.in
===================================================================
RCS file: /home/wine/wine/Make.rules.in,v
retrieving revision 1.163
diff -u -r1.163 Make.rules.in
--- Make.rules.in	11 Oct 2003 01:05:18 -0000	1.163
+++ Make.rules.in	25 Nov 2003 19:57:52 -0000
@@ -55,7 +55,7 @@
 LINTFLAGS = @LINTFLAGS@
 INCLUDES     = -I$(SRCDIR) -I. -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include $(EXTRAINCL)
 EXTRACFLAGS  = @EXTRACFLAGS@
-ALLCFLAGS    = $(INCLUDES) $(DEFS) $(DLLFLAGS) $(EXTRACFLAGS) $(CPPFLAGS) $(CFLAGS)
+ALLCFLAGS    = $(INCLUDES) $(DEFS) $(DLLFLAGS) $(LIBFLAGS) $(EXTRACFLAGS) $(CPPFLAGS) $(CFLAGS)
 ALLLINTFLAGS = $(INCLUDES) $(DEFS) $(LINTFLAGS)
 IDLFLAGS     = $(INCLUDES) $(DEFS) $(EXTRAIDLFLAGS)
 MKINSTALLDIRS= $(TOPSRCDIR)/tools/mkinstalldirs -m 755
Index: libs/port/Makefile.in
===================================================================
RCS file: /home/wine/wine/libs/port/Makefile.in,v
retrieving revision 1.8
diff -u -r1.8 Makefile.in
--- libs/port/Makefile.in	12 Nov 2003 03:16:00 -0000	1.8
+++ libs/port/Makefile.in	25 Nov 2003 19:58:57 -0000
@@ -1,5 +1,6 @@
 DEFS      = -D__WINESRC__
 DLLFLAGS  = @DLLFLAGS@
+LIBFLAGS  = @COMMONFLAGS@
 TOPSRCDIR = @top_srcdir@
 TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
Index: libs/unicode/Makefile.in
===================================================================
RCS file: /home/wine/wine/libs/unicode/Makefile.in,v
retrieving revision 1.6
diff -u -r1.6 Makefile.in
--- libs/unicode/Makefile.in	15 Oct 2003 20:52:28 -0000	1.6
+++ libs/unicode/Makefile.in	25 Nov 2003 19:58:58 -0000
@@ -4,6 +4,7 @@
 VPATH     = @srcdir@
 LIBRARY   = wine_unicode
 SOVERSION = 1
+LIBFLAGS  = @COMMONFLAGS@
 EXTRADEFS = -D__WINESRC__ -DNO_LIBWINE_PORT
 
 CODEPAGES = \
Index: libs/wine/Makefile.in
===================================================================
RCS file: /home/wine/wine/libs/wine/Makefile.in,v
retrieving revision 1.6
diff -u -r1.6 Makefile.in
--- libs/wine/Makefile.in	11 Nov 2003 22:21:29 -0000	1.6
+++ libs/wine/Makefile.in	25 Nov 2003 20:02:00 -0000
@@ -4,6 +4,7 @@
 VPATH     = @srcdir@
 LIBRARY   = wine
 SOVERSION = 1
+LIBFLAGS  = @COMMONFLAGS@
 EXTRADEFS = -D__WINESRC__ -DBINDIR="\"$(bindir)\"" -DDLLDIR="\"$(dlldir)\""
 EXTRALIBS = $(LIBPORT) @DLLIBS@ @CRTLIBS@
 


More information about the wine-patches mailing list