diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2014-03-26 19:21:20 +0000 |
---|---|---|
committer | <> | 2014-05-08 15:03:54 +0000 |
commit | fb123f93f9f5ce42c8e5785d2f8e0edaf951740e (patch) | |
tree | c2103d76aec5f1f10892cd1d3a38e24f665ae5db /tools | |
parent | 58ed4748338f9466599adfc8a9171280ed99e23f (diff) | |
download | VirtualBox-fb123f93f9f5ce42c8e5785d2f8e0edaf951740e.tar.gz |
Imported from /home/lorry/working-area/delta_VirtualBox/VirtualBox-4.3.10.tar.bz2.HEADVirtualBox-4.3.10master
Diffstat (limited to 'tools')
-rw-r--r-- | tools/CommonFetch.kmk | 2 | ||||
-rw-r--r-- | tools/Makefile-ose.kmk | 2 | ||||
-rw-r--r-- | tools/bin/gen-slickedit-workspace.cmd | 86 | ||||
-rw-r--r-- | tools/bin/gen-slickedit-workspace.sh | 63 | ||||
-rw-r--r-- | tools/bin/retry.cmd | 45 | ||||
-rw-r--r-- | tools/kBuildTools/VBoxXGccAmd64LinuxGnu.kmk | 155 | ||||
-rw-r--r-- | tools/kBuildTools/VBoxXGccX86RedHatLinux.kmk | 154 |
7 files changed, 453 insertions, 54 deletions
diff --git a/tools/CommonFetch.kmk b/tools/CommonFetch.kmk index ee380ff5..13f7fe76 100644 --- a/tools/CommonFetch.kmk +++ b/tools/CommonFetch.kmk @@ -5,7 +5,7 @@ # # -# Copyright (C) 2006-2007 Oracle Corporation +# Copyright (C) 2006-2012 Oracle Corporation # # This file is part of VirtualBox Open Source Edition (OSE), as # available from http://www.virtualbox.org. This file is free software; diff --git a/tools/Makefile-ose.kmk b/tools/Makefile-ose.kmk index 922f48e6..16dd8ab9 100644 --- a/tools/Makefile-ose.kmk +++ b/tools/Makefile-ose.kmk @@ -4,7 +4,7 @@ # # -# Copyright (C) 2006-2007 Oracle Corporation +# Copyright (C) 2006-2010 Oracle Corporation # # This file is part of VirtualBox Open Source Edition (OSE), as # available from http://www.virtualbox.org. This file is free software; diff --git a/tools/bin/gen-slickedit-workspace.cmd b/tools/bin/gen-slickedit-workspace.cmd index bcd6cca1..716c81ec 100644 --- a/tools/bin/gen-slickedit-workspace.cmd +++ b/tools/bin/gen-slickedit-workspace.cmd @@ -1,43 +1,43 @@ -@echo off -rem $Id: gen-slickedit-workspace.cmd $ -rem rem @file -rem Windows NT batch script for launching gen-slickedit-workspace.sh -rem - -rem -rem Copyright (C) 2009-2011 Oracle Corporation -rem -rem This file is part of VirtualBox Open Source Edition (OSE), as -rem available from http://www.virtualbox.org. This file is free software; -rem you can redistribute it and/or modify it under the terms of the GNU -rem General Public License (GPL) as published by the Free Software -rem Foundation, in version 2 as it comes in the "COPYING" file of the -rem VirtualBox OSE distribution. VirtualBox OSE is distributed in the -rem hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. -rem - - -setlocal ENABLEEXTENSIONS -setlocal - -rem -rem gen-slickedit-workspace.sh should be in the same directory as this script. -rem -set MY_SCRIPT=%~dp0gen-slickedit-workspace.sh -if exist "%MY_SCRIPT%" goto found -echo gen-slickedit-workspace.cmd: failed to find gen-slickedit-workspace.sh in "%~dp0". -goto end - -rem -rem Found it, convert slashes and tell kmk_ash to interpret it. -rem -:found -set MY_SCRIPT=%MY_SCRIPT:\=/% -set MY_ARGS=%* -if ".%MY_ARGS%." NEQ ".." set MY_ARGS=%MY_ARGS:\=/% -kmk_ash %MY_SCRIPT% --windows-host %MY_ARGS% - -:end -endlocal -endlocal - +@echo off
+rem $Id: gen-slickedit-workspace.cmd $
+rem rem @file
+rem Windows NT batch script for launching gen-slickedit-workspace.sh
+rem
+
+rem
+rem Copyright (C) 2009-2011 Oracle Corporation
+rem
+rem This file is part of VirtualBox Open Source Edition (OSE), as
+rem available from http://www.virtualbox.org. This file is free software;
+rem you can redistribute it and/or modify it under the terms of the GNU
+rem General Public License (GPL) as published by the Free Software
+rem Foundation, in version 2 as it comes in the "COPYING" file of the
+rem VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+rem hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+rem
+
+
+setlocal ENABLEEXTENSIONS
+setlocal
+
+rem
+rem gen-slickedit-workspace.sh should be in the same directory as this script.
+rem
+set MY_SCRIPT=%~dp0gen-slickedit-workspace.sh
+if exist "%MY_SCRIPT%" goto found
+echo gen-slickedit-workspace.cmd: failed to find gen-slickedit-workspace.sh in "%~dp0".
+goto end
+
+rem
+rem Found it, convert slashes and tell kmk_ash to interpret it.
+rem
+:found
+set MY_SCRIPT=%MY_SCRIPT:\=/%
+set MY_ARGS=%*
+if ".%MY_ARGS%." NEQ ".." set MY_ARGS=%MY_ARGS:\=/%
+kmk_ash %MY_SCRIPT% --windows-host %MY_ARGS%
+
+:end
+endlocal
+endlocal
+
diff --git a/tools/bin/gen-slickedit-workspace.sh b/tools/bin/gen-slickedit-workspace.sh index e4c19d97..239baa82 100644 --- a/tools/bin/gen-slickedit-workspace.sh +++ b/tools/bin/gen-slickedit-workspace.sh @@ -5,7 +5,7 @@ # # -# Copyright (C) 2009-2011 Oracle Corporation +# Copyright (C) 2009-2012 Oracle Corporation # # This file is part of VirtualBox Open Source Edition (OSE), as # available from http://www.virtualbox.org. This file is free software; @@ -49,6 +49,8 @@ out/win.amd64/debug \ out/win.x86/debug \ out/darwin.amd64/debug \ out/darwin.x86/debug \ +out/haiku.amd64/debug \ +out/haiku.x86/debug \ out/solaris.amd64/debug \ out/solaris.x86/debug"; @@ -63,6 +65,7 @@ MY_WS_NAME="VirtualBox.vpw" MY_DBG="" MY_WINDOWS_HOST="" MY_OPT_MINIMAL="" +MY_OPT_USE_WILDCARDS="yes" #MY_KBUILD_PATH="${KBUILD_PATH}" #test -z "${MY_KBUILD_PATH}" && MY_KBUILD_PATH="${PATH_KBUILD}" @@ -110,6 +113,7 @@ my_get_name() # # @param $1 The output file name base. # @param $2 The file name. +# @param $3 Optional folder override. my_file() { # sort and filter by file type. @@ -125,7 +129,7 @@ my_file() ;; # by extension. - *.c|*.cpp|*.m|*.mm|*.pl|*.py|*.as|*.c.h|*.cpp.h) + *.c|*.cpp|*.m|*.mm|*.pl|*.py|*.as|*.c.h|*.cpp.h|*.java) MY_FOLDER="$1-Sources.lst" ;; @@ -141,6 +145,10 @@ my_file() MY_FOLDER="$1-Others.lst" ;; esac + if test -n "$3"; + then + MY_FOLDER="$1-$3.lst" + fi ## @todo only files which are in subversion. # if ${MY_SVN} info "${2}" > /dev/null 2>&1; then @@ -150,10 +158,22 @@ my_file() } ## +# Generate file entry for the specified file if it was found to be of interest. +# +# @param $1 The output file name base. +# @param $2 The wildcard spec. +my_wildcard() +{ + EXCLUDES="*.log;*.kup;*~;*.pyc;*.exe;*.sys;*.dll;*.o;*.obj;*.lib;*.a;*.ko;*.class;.svn/*" + echo ' <F N="'"${2}"'/*" Recurse="1" Excludes="'"${EXCLUDES}"'"/>' >> "$1-All.lst" +} + +## # Generate file entries for the specified sub-directory tree. # # @param $1 The output filename. # @param $2 The sub-directory. +# @param $3 Optional folder override. my_sub_tree() { if test -n "$MY_DBG"; then echo "dbg: my_sub_tree: ${2}"; fi @@ -170,9 +190,9 @@ my_sub_tree() do if test -d "${f}"; then - my_sub_tree "${1}" "${f}" + my_sub_tree "${1}" "${f}" "${3}" else - my_file "${1}" "${f}" + my_file "${1}" "${f}" "${3}" fi done return 0; @@ -190,6 +210,7 @@ my_generate_folder() shift # Zap existing file collections. + > "${MY_FILE}-All.lst" > "${MY_FILE}-Sources.lst" > "${MY_FILE}-Headers.lst" > "${MY_FILE}-Assembly.lst" @@ -203,7 +224,18 @@ my_generate_folder() do if test -d "${f}"; then - my_sub_tree "${MY_FILE}" "${f}" + if test -z "${MY_OPT_USE_WILDCARDS}"; + then + my_sub_tree "${MY_FILE}" "${f}" + else + case "${f}" in + ${MY_ROOT_DIR}/include*) + my_sub_tree "${MY_FILE}" "${f}" "Headers" + ;; + *) my_wildcard "${MY_FILE}" "${f}" + ;; + esac + fi else my_file "${MY_FILE}" "${f}" fi @@ -212,6 +244,10 @@ my_generate_folder() done # Generate the folders. + if test -s "${MY_FILE}-All.lst"; + then + ${MY_SORT} "${MY_FILE}-All.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}" + fi if test -s "${MY_FILE}-Sources.lst"; then echo ' <Folder Name="Sources" Filters="*.c;*.cpp;*.cpp.h;*.c.h;*.m;*.mm;*.pl;*.py;*.as">' >> "${MY_FILE}" @@ -220,7 +256,12 @@ my_generate_folder() fi if test -s "${MY_FILE}-Headers.lst"; then - echo ' <Folder Name="Headers" Filters="*.h;*.hpp">' >> "${MY_FILE}" + if test -z "${MY_OPT_USE_WILDCARDS}"; + then + echo ' <Folder Name="Headers" Filters="*.h;*.hpp">' >> "${MY_FILE}" + else + echo ' <Folder Name="Headers" Filters="">' >> "${MY_FILE}" + fi ${MY_SORT} "${MY_FILE}-Headers.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}" echo ' </Folder>' >> "${MY_FILE}" fi @@ -244,7 +285,8 @@ my_generate_folder() fi # Cleanup - ${MY_RM} "${MY_FILE}-Sources.lst" "${MY_FILE}-Headers.lst" "${MY_FILE}-Assembly.lst" "${MY_FILE}-Testcases.lst" "${MY_FILE}-Others.lst" + ${MY_RM} "${MY_FILE}-All.lst" "${MY_FILE}-Sources.lst" "${MY_FILE}-Headers.lst" "${MY_FILE}-Assembly.lst" \ + "${MY_FILE}-Testcases.lst" "${MY_FILE}-Others.lst" } @@ -773,7 +815,7 @@ my_generate_project "VMM" "src/VBox/VMM" --be "include/VBox/vmm/em.h" \ "include/VBox/vmm/gmm.*" \ "include/VBox/vmm/gvm.*" \ - "include/VBox/vmm/hw*.*" \ + "include/VBox/vmm/hm*.*" \ "include/VBox/vmm/iom.h" \ "include/VBox/vmm/mm.h" \ "include/VBox/vmm/patm.*" \ @@ -805,6 +847,7 @@ my_generate_project "Add-freebsd" "src/VBox/Additions/freebsd" --be my_generate_project "Add-linux" "src/VBox/Additions/linux" --begin-incs "include" "src/VBox/Additions/linux" --end-includes "src/VBox/Additions/linux" my_generate_project "Add-os2" "src/VBox/Additions/os2" --begin-incs "include" "src/VBox/Additions/os2" --end-includes "src/VBox/Additions/os2" my_generate_project "Add-solaris" "src/VBox/Additions/solaris" --begin-incs "include" "src/VBox/Additions/solaris" --end-includes "src/VBox/Additions/solaris" +my_generate_project "Add-haiku" "src/VBox/Additions/haiku" --begin-incs "include" "src/VBox/Additions/haiku" --end-includes "src/VBox/Additions/haiku" my_generate_project "Add-win" "src/VBox/Additions/WINNT" --begin-incs "include" "src/VBox/Additions/WINNT" --end-includes "src/VBox/Additions/WINNT" test -z "$MY_OPT_MINIMAL" && \ my_generate_project "Add-x11" "src/VBox/Additions/x11" --begin-incs "include" "src/VBox/Additions/x11" --end-includes "src/VBox/Additions/x11" @@ -906,7 +949,7 @@ my_generate_project "bldprogs" "src/bldprogs" --be my_generate_project "zlib" "src/libs/zlib-1.2.6" --begin-incs "include" --end-includes "src/libs/zlib-1.2.6/*.c" "src/libs/zlib-1.2.6/*.h" my_generate_project "liblzf" "src/libs/liblzf-3.4" --begin-incs "include" --end-includes "src/libs/liblzf-3.4" my_generate_project "libpng" "src/libs/libpng-1.2.8" --begin-incs "include" --end-includes "src/libs/libpng-1.2.8/*.c" "src/libs/libpng-1.2.8/*.h" -my_generate_project "openssl" "src/libs/openssl-0.9.8t" --begin-incs "include" "src/libs/openssl-0.9.8t/crypto" --end-includes "src/libs/openssl-0.9.8t" +my_generate_project "openssl" "src/libs/openssl-0.9.8y" --begin-incs "include" "src/libs/openssl-0.9.8y/crypto" --end-includes "src/libs/openssl-0.9.8y" my_generate_project "kStuff" "src/libs/kStuff" --begin-incs "include" "src/libs/kStuff/kStuff/include" --end-includes "src/libs/kStuff" @@ -935,6 +978,8 @@ for d in \ "out/linux.x86/debug/bin/sdk/bindings/xpcom" \ "out/darwin.amd64/debug/dist/sdk/bindings/xpcom" \ "out/darwin.x86/debug/bin/dist/bindings/xpcom" \ + "out/haiku.amd64/debug/bin/sdk/bindings/xpcom" \ + "out/haiku.x86/debug/bin/sdk/bindings/xpcom" \ "out/solaris.amd64/debug/bin/sdk/bindings/xpcom" \ "out/solaris.x86/debug/bin/sdk/bindings/xpcom"; do diff --git a/tools/bin/retry.cmd b/tools/bin/retry.cmd new file mode 100644 index 00000000..c712985c --- /dev/null +++ b/tools/bin/retry.cmd @@ -0,0 +1,45 @@ +@echo off
+rem $Id: retry.cmd $
+rem rem @file
+rem Windows NT batch script that retries a command 5 times.
+rem
+
+rem
+rem Copyright (C) 2009-2013 Oracle Corporation
+rem
+rem This file is part of VirtualBox Open Source Edition (OSE), as
+rem available from http://www.virtualbox.org. This file is free software;
+rem you can redistribute it and/or modify it under the terms of the GNU
+rem General Public License (GPL) as published by the Free Software
+rem Foundation, in version 2 as it comes in the "COPYING" file of the
+rem VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+rem hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+rem
+
+rem
+rem Note! We're using %ERRORLEVEL% here instead of the classic
+rem IF ERRORLEVEL 0 GOTO blah because the latter cannot handle
+rem the complete range or status codes while the former can.
+rem
+rem Note! SET changes ERRORLEVEL on XP+, so we have to ECHO
+rem before incrementing the counter.
+rem
+set /a retry_count = 1
+:retry
+%*
+if %ERRORLEVEL% == 0 goto success
+if %retry_count% GEQ 5 goto give_up
+echo retry.cmd: Attempt %retry_count% FAILED(%ERRORLEVEL%), retrying: %*
+set /a retry_count += 1
+goto retry
+
+:give_up
+echo retry.cmd: Attempt %retry_count% FAILED(%ERRORLEVEL%), giving up: %*
+set retry_count=
+exit /b 1
+
+:success
+if %retry_count% NEQ 1 echo retry.cmd: Success after %retry_count% tries: %*!
+set retry_count=
+exit /b 0
+
diff --git a/tools/kBuildTools/VBoxXGccAmd64LinuxGnu.kmk b/tools/kBuildTools/VBoxXGccAmd64LinuxGnu.kmk new file mode 100644 index 00000000..e082123e --- /dev/null +++ b/tools/kBuildTools/VBoxXGccAmd64LinuxGnu.kmk @@ -0,0 +1,155 @@ +# $Id: VBoxXGccAmd64LinuxGnu.kmk $ +## @file +# VBox kBuild Tool Config - GCC Cross compiler for Debian 4.0 AMD64. +# + +# +# Copyright (C) 2013 Oracle Corporation +# +# This file is part of VirtualBox Open Source Edition (OSE), as +# available from http://www.virtualbox.org. This file is free software; +# you can redistribute it and/or modify it under the terms of the GNU +# General Public License (GPL) as published by the Free Software +# Foundation, in version 2 as it comes in the "COPYING" file of the +# VirtualBox OSE distribution. VirtualBox OSE is distributed in the +# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. +# + +TOOL_VBoxXGccAmd64LinuxGnu := GCC Cross compiler for Debian 4.0. + +# Tool Specific Properties: +ifndef TOOL_VBoxXGccAmd64LinuxGnu_PREFIX + TOOL_VBoxXGccAmd64LinuxGnu_PREFIX := x86_64-linux-gnu- +endif +ifndef PATH_TOOL_VBoxXGccAmd64LinuxGnu + PATH_TOOL_VBoxXGccAmd64LinuxGnu := $(lastword $(wildcard $(KBUILD_DEVTOOLS_HST)/x86_64-linux-gnu/*)) + ifeq ($(PATH_TOOL_VBoxXGccAmd64LinuxGnu),) + PATH_TOOL_VBoxXGccAmd64LinuxGnu := $(lastword $(sort $(wildcard $(KBUILD_DEVTOOLS_HST_ALT)/x86_64-linux-gnu/*))) + endif +endif +TOOL_VBoxXGccAmd64LinuxGnu_PREFIX := $(PATH_TOOL_VBoxXGccAmd64LinuxGnu)/usr/bin/$(TOOL_VBoxXGccAmd64LinuxGnu_PREFIX) + +TOOL_VBoxXGccAmd64LinuxGnu_CC ?= $(TOOL_VBoxXGccAmd64LinuxGnu_PREFIX)gcc-4.1$(HOSTSUFF_EXE) +TOOL_VBoxXGccAmd64LinuxGnu_CXX ?= $(TOOL_VBoxXGccAmd64LinuxGnu_PREFIX)g++-4.1$(HOSTSUFF_EXE) +TOOL_VBoxXGccAmd64LinuxGnu_AS ?= $(TOOL_VBoxXGccAmd64LinuxGnu_PREFIX)gcc-4.1$(HOSTSUFF_EXE) +TOOL_VBoxXGccAmd64LinuxGnu_AR ?= $(TOOL_VBoxXGccAmd64LinuxGnu_PREFIX)ar$(HOSTSUFF_EXE) +TOOL_VBoxXGccAmd64LinuxGnu_LD ?= $(TOOL_VBoxXGccAmd64LinuxGnu_PREFIX)gcc-4.1$(HOSTSUFF_EXE) +TOOL_VBoxXGccAmd64LinuxGnu_LD_SYSMOD ?= $(TOOL_VBoxXGccAmd64LinuxGnu_PREFIX)ld$(HOSTSUFF_EXE) + +TOOL_VBoxXGccAmd64LinuxGnu_LD_SONAME ?= -Wl,-soname=$(firstword $($(1)_SONAME.$(KBUILD_TARGET).$(KBUILD_TYPE)) $($(1)_SONAME.$(KBUILD_TARGET)) $($(1)_SONAME.$(KBUILD_TYPE)) $($(1)_SONAME) $(notdir $(2))) +TOOL_VBoxXGccAmd64LinuxGnu_LD_MAP ?= -Wl,-Map -Wl,$(1) +TOOL_VBoxXGccAmd64LinuxGnu_LD_SYSMOD_MAP ?= -Map $(1) +TOOL_VBoxXGccAmd64LinuxGnu_LDFLAGS.dll ?= -shared +TOOL_VBoxXGccAmd64LinuxGnu_LDFLAGS.sysmod ?= -r + +ifdef SLKRUNS +TOOL_VBoxXGccAmd64LinuxGnu_CC += -fmessage-length=0 +TOOL_VBoxXGccAmd64LinuxGnu_CXX += -fmessage-length=0 +endif + +# General Properties used by kBuild: +TOOL_VBoxXGccAmd64LinuxGnu_COBJSUFF ?= .o +TOOL_VBoxXGccAmd64LinuxGnu_CFLAGS ?= -g +TOOL_VBoxXGccAmd64LinuxGnu_CFLAGS.debug ?= -O0 +TOOL_VBoxXGccAmd64LinuxGnu_CFLAGS.release ?= -O2 +TOOL_VBoxXGccAmd64LinuxGnu_CFLAGS.profile ?= -O2 +TOOL_VBoxXGccAmd64LinuxGnu_CINCS ?= +TOOL_VBoxXGccAmd64LinuxGnu_CDEFS ?= + +TOOL_VBoxXGccAmd64LinuxGnu_CXXOBJSUFF ?= .o +TOOL_VBoxXGccAmd64LinuxGnu_CXXOBJSUFF ?= .o +TOOL_VBoxXGccAmd64LinuxGnu_CXXFLAGS ?= -g +TOOL_VBoxXGccAmd64LinuxGnu_CXXFLAGS.debug ?= -O0 +TOOL_VBoxXGccAmd64LinuxGnu_CXXFLAGS.release ?= -O2 +TOOL_VBoxXGccAmd64LinuxGnu_CXXFLAGS.profile ?= -O2 +TOOL_VBoxXGccAmd64LinuxGnu_CXXINCS ?= +TOOL_VBoxXGccAmd64LinuxGnu_CXXDEFS ?= + +TOOL_VBoxXGccAmd64LinuxGnu_ASFLAGS ?= -g -x assembler-with-cpp +TOOL_VBoxXGccAmd64LinuxGnu_ASOBJSUFF ?= .o + +TOOL_VBoxXGccAmd64LinuxGnu_ARFLAGS ?= cr +TOOL_VBoxXGccAmd64LinuxGnu_ARLIBSUFF ?= .a + +TOOL_VBoxXGccAmd64LinuxGnu_LDFLAGS ?= +TOOL_VBoxXGccAmd64LinuxGnu_LDFLAGS.debug ?= -g +TOOL_VBoxXGccAmd64LinuxGnu_LDFLAGS.release ?= -s + +TOOL_VBoxXGccAmd64LinuxGnu_COMPILE_C_OUTPUT = +TOOL_VBoxXGccAmd64LinuxGnu_COMPILE_C_DEPEND = +TOOL_VBoxXGccAmd64LinuxGnu_COMPILE_C_DEPORD = +define TOOL_VBoxXGccAmd64LinuxGnu_COMPILE_C_CMDS + $(QUIET)$(TOOL_VBoxXGccAmd64LinuxGnu_CC) -c \ + $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs)) \ + -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP \ + -o $(obj) \ + $(abspath $(source)) +endef + +TOOL_VBoxXGccAmd64LinuxGnu_COMPILE_CXX_OUTPUT = +TOOL_VBoxXGccAmd64LinuxGnu_COMPILE_CXX_DEPEND = +TOOL_VBoxXGccAmd64LinuxGnu_COMPILE_CXX_DEPORD = +define TOOL_VBoxXGccAmd64LinuxGnu_COMPILE_CXX_CMDS + $(QUIET)$(TOOL_VBoxXGccAmd64LinuxGnu_CXX) -c \ + $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs)) \ + -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP \ + -o $(obj) \ + $(abspath $(source)) +endef + +TOOL_VBoxXGccAmd64LinuxGnu_COMPILE_AS_OUTPUT = +TOOL_VBoxXGccAmd64LinuxGnu_COMPILE_AS_DEPEND = +TOOL_VBoxXGccAmd64LinuxGnu_COMPILE_AS_DEPORD = +define TOOL_VBoxXGccAmd64LinuxGnu_COMPILE_AS_CMDS + $(QUIET)$(TOOL_VBoxXGccAmd64LinuxGnu_AS) -c \ + $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs)) \ + -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP \ + -o $(obj) \ + $(abspath $(source)) +endef + +TOOL_VBoxXGccAmd64LinuxGnu_LINK_LIBRARY_OUTPUT = $(out).ar-script +TOOL_VBoxXGccAmd64LinuxGnu_LINK_LIBRARY_DEPEND = $(othersrc) +TOOL_VBoxXGccAmd64LinuxGnu_LINK_LIBRARY_DEPORD = +define TOOL_VBoxXGccAmd64LinuxGnu_LINK_LIBRARY_CMDS + $(QUIET)$(APPEND) $(out).ar-script 'CREATE $(out)' + $(QUIET)$(APPEND) -n $(out).ar-script \ + $(foreach o,$(objs), 'ADDMOD $(o)') \ + $(foreach o,$(othersrc), 'ADDLIB $(o)') + $(QUIET)$(APPEND) $(out).ar-script 'SAVE' + $(QUIET)$(APPEND) $(out).ar-script 'END' + $(QUIET)$(REDIRECT) -rti $(out).ar-script -- $(TOOL_VBoxXGccAmd64LinuxGnu_AR) -M +endef + +TOOL_VBoxXGccAmd64LinuxGnu_LINK_PROGRAM_OUTPUT = $(outbase).map +TOOL_VBoxXGccAmd64LinuxGnu_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) +TOOL_VBoxXGccAmd64LinuxGnu_LINK_PROGRAM_DEPORD = +define TOOL_VBoxXGccAmd64LinuxGnu_LINK_PROGRAM_CMDS + $(QUIET)$(TOOL_VBoxXGccAmd64LinuxGnu_LD) $(flags) -o $(out) $(objs) \ + $(foreach p,$(libpath), -L$(p)) \ + $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib))) \ + $(call TOOL_VBoxXGccAmd64LinuxGnu_LD_MAP,$(outbase).map) +endef + +TOOL_VBoxXGccAmd64LinuxGnu_LINK_DLL_OUTPUT = $(outbase).map +TOOL_VBoxXGccAmd64LinuxGnu_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) +TOOL_VBoxXGccAmd64LinuxGnu_LINK_DLL_DEPORD = +define TOOL_VBoxXGccAmd64LinuxGnu_LINK_DLL_CMDS + $(QUIET)$(TOOL_VBoxXGccAmd64LinuxGnu_LD) $(TOOL_VBoxXGccAmd64LinuxGnu_LDFLAGS.dll) $(flags) -o $(out) \ + $(if $(filter-out win32 os2, $(KBUILD_TARGET)),$(call TOOL_VBoxXGccAmd64LinuxGnu_LD_SONAME,$(target),$(out))) \ + $(objs) \ + $(foreach p,$(libpath), -L$(p)) \ + $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib))) \ + $(call TOOL_VBoxXGccAmd64LinuxGnu_LD_MAP,$(outbase).map) +endef + +TOOL_VBoxXGccAmd64LinuxGnu_LINK_SYSMOD_OUTPUT = $(outbase).map +TOOL_VBoxXGccAmd64LinuxGnu_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) +TOOL_VBoxXGccAmd64LinuxGnu_LINK_SYSMOD_DEPORD = +define TOOL_VBoxXGccAmd64LinuxGnu_LINK_SYSMOD_CMDS + $(QUIET)$(TOOL_VBoxXGccAmd64LinuxGnu_LD_SYSMOD) $(TOOL_VBoxXGccAmd64LinuxGnu_LDFLAGS.sysmod) $(flags) -o $(out) $(objs) \ + $(foreach p,$(libpath), -L$(p)) \ + $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib))) \ + $(call TOOL_VBoxXGccAmd64LinuxGnu_LD_SYSMOD_MAP,$(outbase).map) +endef + diff --git a/tools/kBuildTools/VBoxXGccX86RedHatLinux.kmk b/tools/kBuildTools/VBoxXGccX86RedHatLinux.kmk new file mode 100644 index 00000000..d2340712 --- /dev/null +++ b/tools/kBuildTools/VBoxXGccX86RedHatLinux.kmk @@ -0,0 +1,154 @@ +# $Id: VBoxXGccX86RedHatLinux.kmk $ +## @file +# kBuild Tool Config - GCC Cross compiler for CentOS 3 x86. +# + +# +# Copyright (C) 2013 Oracle Corporation +# +# This file is part of VirtualBox Open Source Edition (OSE), as +# available from http://www.virtualbox.org. This file is free software; +# you can redistribute it and/or modify it under the terms of the GNU +# General Public License (GPL) as published by the Free Software +# Foundation, in version 2 as it comes in the "COPYING" file of the +# VirtualBox OSE distribution. VirtualBox OSE is distributed in the +# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. +# + +TOOL_VBoxXGccX86RedHatLinux := GCC Cross compiler for CentOS 3 x86. + +# Tool Specific Properties: +ifndef TOOL_VBoxXGccX86RedHatLinux_PREFIX + TOOL_VBoxXGccX86RedHatLinux_PREFIX := i386-redhat-linux- +endif +ifndef PATH_TOOL_VBoxXGccX86RedHatLinux + PATH_TOOL_VBoxXGccX86RedHatLinux := $(lastword $(sort $(wildcard $(KBUILD_DEVTOOLS_HST)/i386-redhat-linux/*))) + ifeq ($(PATH_TOOL_VBoxXGccX86RedHatLinux),) + PATH_TOOL_VBoxXGccX86RedHatLinux := $(lastword $(sort $(wildcard $(KBUILD_DEVTOOLS_HST_ALT)/i386-redhat-linux/*))) + endif +endif +TOOL_VBoxXGccX86RedHatLinux_PREFIX := $(REDIRECT) -E COMPILER_PATH=$(PATH_TOOL_VBoxXGccX86RedHatLinux)/bin/ -- $(PATH_TOOL_VBoxXGccX86RedHatLinux)/bin/$(TOOL_VBoxXGccX86RedHatLinux_PREFIX) + +TOOL_VBoxXGccX86RedHatLinux_CC ?= $(TOOL_VBoxXGccX86RedHatLinux_PREFIX)gcc$(HOSTSUFF_EXE) +TOOL_VBoxXGccX86RedHatLinux_CXX ?= $(TOOL_VBoxXGccX86RedHatLinux_PREFIX)g++$(HOSTSUFF_EXE) +TOOL_VBoxXGccX86RedHatLinux_AS ?= $(TOOL_VBoxXGccX86RedHatLinux_PREFIX)gcc$(HOSTSUFF_EXE) +TOOL_VBoxXGccX86RedHatLinux_AR ?= $(TOOL_VBoxXGccX86RedHatLinux_PREFIX)ar$(HOSTSUFF_EXE) +TOOL_VBoxXGccX86RedHatLinux_LD ?= $(TOOL_VBoxXGccX86RedHatLinux_PREFIX)g++$(HOSTSUFF_EXE) -Wl,-rpath-link,$(PATH_TOOL_VBoxXGccX86RedHatLinux)/i386-redhat-linux/lib +TOOL_VBoxXGccX86RedHatLinux_LD_SYSMOD ?= $(TOOL_VBoxXGccX86RedHatLinux_PREFIX)ld$(HOSTSUFF_EXE) + +TOOL_VBoxXGccX86RedHatLinux_LD_SONAME ?= -Wl,-soname=$(firstword $($(1)_SONAME.$(KBUILD_TARGET).$(KBUILD_TYPE)) $($(1)_SONAME.$(KBUILD_TARGET)) $($(1)_SONAME.$(KBUILD_TYPE)) $($(1)_SONAME) $(notdir $(2))) +TOOL_VBoxXGccX86RedHatLinux_LD_MAP ?= -Wl,-Map -Wl,$(1) -Wl,--cref +TOOL_VBoxXGccX86RedHatLinux_LD_SYSMOD_MAP ?= -Map $(1) --cref +TOOL_VBoxXGccX86RedHatLinux_LDFLAGS.dll ?= -shared +TOOL_VBoxXGccX86RedHatLinux_LDFLAGS.sysmod ?= -r + +ifdef SLKRUNS +TOOL_VBoxXGccX86RedHatLinux_CC += -fmessage-length=0 +TOOL_VBoxXGccX86RedHatLinux_CXX += -fmessage-length=0 +endif + +# General Properties used by kBuild: +TOOL_VBoxXGccX86RedHatLinux_COBJSUFF ?= .o +TOOL_VBoxXGccX86RedHatLinux_CFLAGS ?= -g +TOOL_VBoxXGccX86RedHatLinux_CFLAGS.debug ?= -O0 +TOOL_VBoxXGccX86RedHatLinux_CFLAGS.release ?= -O2 +TOOL_VBoxXGccX86RedHatLinux_CFLAGS.profile ?= -O2 +TOOL_VBoxXGccX86RedHatLinux_CINCS ?= +TOOL_VBoxXGccX86RedHatLinux_CDEFS ?= + +TOOL_VBoxXGccX86RedHatLinux_CXXOBJSUFF ?= .o +TOOL_VBoxXGccX86RedHatLinux_CXXOBJSUFF ?= .o +TOOL_VBoxXGccX86RedHatLinux_CXXFLAGS ?= -g +TOOL_VBoxXGccX86RedHatLinux_CXXFLAGS.debug ?= -O0 +TOOL_VBoxXGccX86RedHatLinux_CXXFLAGS.release ?= -O2 +TOOL_VBoxXGccX86RedHatLinux_CXXFLAGS.profile ?= -O2 +TOOL_VBoxXGccX86RedHatLinux_CXXINCS ?= +TOOL_VBoxXGccX86RedHatLinux_CXXDEFS ?= + +TOOL_VBoxXGccX86RedHatLinux_ASFLAGS ?= -g -x assembler-with-cpp +TOOL_VBoxXGccX86RedHatLinux_ASOBJSUFF ?= .o + +TOOL_VBoxXGccX86RedHatLinux_ARFLAGS ?= cr +TOOL_VBoxXGccX86RedHatLinux_ARLIBSUFF ?= .a +TOOL_VBoxXGccX86RedHatLinux_LDFLAGS ?= +TOOL_VBoxXGccX86RedHatLinux_LDFLAGS.debug ?= -g +TOOL_VBoxXGccX86RedHatLinux_LDFLAGS.release ?= -s + +TOOL_VBoxXGccX86RedHatLinux_COMPILE_C_OUTPUT = +TOOL_VBoxXGccX86RedHatLinux_COMPILE_C_DEPEND = +TOOL_VBoxXGccX86RedHatLinux_COMPILE_C_DEPORD = +define TOOL_VBoxXGccX86RedHatLinux_COMPILE_C_CMDS + $(QUIET)$(TOOL_VBoxXGccX86RedHatLinux_CC) -c \ + $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs)) \ + -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP \ + -o $(obj) \ + $(abspath $(source)) +endef + +TOOL_VBoxXGccX86RedHatLinux_COMPILE_CXX_OUTPUT = +TOOL_VBoxXGccX86RedHatLinux_COMPILE_CXX_DEPEND = +TOOL_VBoxXGccX86RedHatLinux_COMPILE_CXX_DEPORD = +define TOOL_VBoxXGccX86RedHatLinux_COMPILE_CXX_CMDS + $(QUIET)$(TOOL_VBoxXGccX86RedHatLinux_CXX) -c \ + $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs)) \ + -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP \ + -o $(obj) \ + $(abspath $(source)) +endef + +TOOL_VBoxXGccX86RedHatLinux_COMPILE_AS_OUTPUT = +TOOL_VBoxXGccX86RedHatLinux_COMPILE_AS_DEPEND = +TOOL_VBoxXGccX86RedHatLinux_COMPILE_AS_DEPORD = +define TOOL_VBoxXGccX86RedHatLinux_COMPILE_AS_CMDS + $(QUIET)$(TOOL_VBoxXGccX86RedHatLinux_AS) -c \ + $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs)) \ + -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP \ + -o $(obj) \ + $(abspath $(source)) +endef + +TOOL_VBoxXGccX86RedHatLinux_LINK_LIBRARY_OUTPUT = $(out).ar-script +TOOL_VBoxXGccX86RedHatLinux_LINK_LIBRARY_DEPEND = $(othersrc) +TOOL_VBoxXGccX86RedHatLinux_LINK_LIBRARY_DEPORD = +define TOOL_VBoxXGccX86RedHatLinux_LINK_LIBRARY_CMDS + $(QUIET)$(APPEND) $(out).ar-script 'CREATE $(out)' + $(QUIET)$(APPEND) -n $(out).ar-script \ + $(foreach o,$(objs), 'ADDMOD $(o)') \ + $(foreach o,$(othersrc), 'ADDLIB $(o)') + $(QUIET)$(APPEND) $(out).ar-script 'SAVE' + $(QUIET)$(APPEND) $(out).ar-script 'END' + $(QUIET)$(REDIRECT) -rti $(out).ar-script -- $(TOOL_VBoxXGccX86RedHatLinux_AR) -M +endef + +TOOL_VBoxXGccX86RedHatLinux_LINK_PROGRAM_OUTPUT = $(outbase).map +TOOL_VBoxXGccX86RedHatLinux_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) +TOOL_VBoxXGccX86RedHatLinux_LINK_PROGRAM_DEPORD = +define TOOL_VBoxXGccX86RedHatLinux_LINK_PROGRAM_CMDS + $(QUIET)$(TOOL_VBoxXGccX86RedHatLinux_LD) $(flags) -o $(out) $(objs) \ + $(foreach p,$(libpath), -L$(p)) \ + $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib))) \ + $(call TOOL_VBoxXGccX86RedHatLinux_LD_MAP,$(outbase).map) +endef + +TOOL_VBoxXGccX86RedHatLinux_LINK_DLL_OUTPUT = $(outbase).map +TOOL_VBoxXGccX86RedHatLinux_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) +TOOL_VBoxXGccX86RedHatLinux_LINK_DLL_DEPORD = +define TOOL_VBoxXGccX86RedHatLinux_LINK_DLL_CMDS + $(QUIET)$(TOOL_VBoxXGccX86RedHatLinux_LD) $(TOOL_VBoxXGccX86RedHatLinux_LDFLAGS.dll) $(flags) -o $(out) \ + $(if $(filter-out win32 os2, $(KBUILD_TARGET)),$(call TOOL_VBoxXGccX86RedHatLinux_LD_SONAME,$(target),$(out))) \ + $(objs) \ + $(foreach p,$(libpath), -L$(p)) \ + $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib))) \ + $(call TOOL_VBoxXGccX86RedHatLinux_LD_MAP,$(outbase).map) +endef + +TOOL_VBoxXGccX86RedHatLinux_LINK_SYSMOD_OUTPUT = $(outbase).map +TOOL_VBoxXGccX86RedHatLinux_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) +TOOL_VBoxXGccX86RedHatLinux_LINK_SYSMOD_DEPORD = +define TOOL_VBoxXGccX86RedHatLinux_LINK_SYSMOD_CMDS + $(QUIET)$(TOOL_VBoxXGccX86RedHatLinux_LD_SYSMOD) $(TOOL_VBoxXGccX86RedHatLinux_LDFLAGS.sysmod) $(flags) -o $(out) $(objs) \ + $(foreach p,$(libpath), -L$(p)) \ + $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib))) \ + $(call TOOL_VBoxXGccX86RedHatLinux_LD_SYSMOD_MAP,$(outbase).map) +endef + |