Gitweb links:

...log 
http://git.netsurf-browser.org/buildsystem.git/shortlog/520dd9740ce60ffd0778d9565f8779c31b8a2acb
...commit 
http://git.netsurf-browser.org/buildsystem.git/commit/520dd9740ce60ffd0778d9565f8779c31b8a2acb
...tree 
http://git.netsurf-browser.org/buildsystem.git/tree/520dd9740ce60ffd0778d9565f8779c31b8a2acb

The branch, ashmew2/kolibri-cross has been created
        at  520dd9740ce60ffd0778d9565f8779c31b8a2acb (commit)

- Log -----------------------------------------------------------------
commitdiff 
http://git.netsurf-browser.org/buildsystem.git/commit/?id=520dd9740ce60ffd0778d9565f8779c31b8a2acb
commit 520dd9740ce60ffd0778d9565f8779c31b8a2acb
Author: Ashish Gupta <[email protected]>
Commit: Ashish Gupta <[email protected]>

    Patch Makefile.tools to support cross compiling from Linux to KolibriOS

diff --git a/makefiles/Makefile.tools b/makefiles/Makefile.tools
index 86fac4c..6567840 100644
--- a/makefiles/Makefile.tools
+++ b/makefiles/Makefile.tools
@@ -29,7 +29,6 @@
 ###############################################################################
 # Sanity checks
 ###############################################################################
-
 ifeq ($(COMPONENT_TYPE),)
   $(error COMPONENT_TYPE not set)
 endif
@@ -55,8 +54,13 @@ NSTESTTOOLS := $(NSSHARED)/testtools
 # Bootstrap default tooling
 ###############################################################################
 
-BUILD_CC ?= cc
+ifeq ($(HOST),kolibrios)
+     BUILD_CC := kos32-gcc
+     CC := kos32-gcc
+     BUILD := Linux
+endif
 
+BUILD_CC ?= cc
 ###############################################################################
 # Host/build platform detection
 ###############################################################################
@@ -125,8 +129,10 @@ else
   CC__ := $(CC)
   # Improve our guess at the identity of CC
   # (only if CC was not specified by the user)
-  ifeq ($(origin CC),default)
-    CC__ := $(HOST)-gcc
+  ifneq ($(HOST),kolibrios)
+    ifeq ($(origin CC),default)
+      CC__ := $(HOST)-gcc
+    endif
   endif
 
   # Search the path for the compiler
@@ -140,6 +146,11 @@ else
     CC__ := $(realpath $(toolpath_))
     toolpath_ := $(dir $(CC__))
     toolprefix_ := $(subst :,/,$(dir $(subst -,/,$(subst /,:,$(CC__)))))
+
+    ifeq ($(HOST),kolibrios)
+       toolprefix_ := $(subst kos32/,kos32,$(toolprefix_))
+    endif
+
     ifeq ($(origin AR),default)
       AR__ := $(toolprefix_)-ar
     endif
@@ -242,6 +253,24 @@ else
 
     PREFIX ?= $(GCCSDK_INSTALL_ENV)
   endif
+
+  ifeq ($(HOST),kolibrios)
+    #Cross compiling for KolibriOS from Linux
+    #expat was added for libdom.
+    #SDL was added for libnsfb.
+    #Both of them should probably be moved to respective library Makefiles.
+    CFLAGS := $(CFLAGS) -c -Wno-error=undef -Wno-error=char-subscripts 
-Wno-error=pedantic -U__STRICT_ANSI__ -I 
$(HOME)/kolibrios/contrib/sdk/sources/newlib/libc/include -I 
$(HOME)/kolibrios/contrib/sdk/sources/newlib/libc/include/machine -I 
$(HOME)/kolibrios/contrib/sdk/sources/SDL-1.2.2/include 
-I$(HOME)/kolibrios/contrib/sdk/sources/expat/lib \
+            -std=c99 -g -U_Win32 -U_WIN32 -U__MINGW32__ \
+             -U__BSD_VISIBLE -D_BSD_SOURCE -D_DEFAULT_SOURCE 
-D_XOPEN_SOURCE=700 \
+            -D_POSIX_C_SOURCE=200809L -D_NETBSD_SOURCE
+
+    CXXFLAGS := $(CXXFLAGS) -U__STRICT_ANSI__ 
-I$(GCCSDK_INSTALL_ENV)/newlib/libc/include
+
+    LDFLAGS := $(LDFLAGS) -T$(GCCSDK_INSTALL_ENV)/newlib/libc/static.lds 
-nostdlib -static \
+               -image-base 0 -L/home/autobuild/tools/win32/mingw32/lib -lgcc \
+              /home/autobuild/tools/win32/lib/libz.a 
/home/autobuild/tools/win32/lib/libdll.a \
+              /home/autobuild/tools/win32/lib/libapp.a 
/home/autobuild/tools/win32/lib/libc.dll.a
+  endif
 endif
 
 # Default prefix


-----------------------------------------------------------------------


-- 
NetSurf Project build system

_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org

Reply via email to