diff options
author | AJFISH <AJFISH@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-08-26 21:08:05 +0000 |
---|---|---|
committer | AJFISH <AJFISH@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-08-26 21:08:05 +0000 |
commit | c719e02c1476f2b0adb313a3dd06d53ff34aa2e9 (patch) | |
tree | 6467b5d6120d269d4842e39483a10c1655450272 /BaseTools/Bin | |
parent | badd7e61a86feb50421a3a1aec9ea8b651c3ede8 (diff) | |
download | edk2-platforms-c719e02c1476f2b0adb313a3dd06d53ff34aa2e9.tar.xz |
Adding a python script to enable RVCT 3.1 (ARM ARM compiler) to run in cygwin. The build system passes cygpaths and the Windows tool can not deal with that. The python converts paths to C:\ to make RVCT 3.1 happy. This has been fixed in RVCT 4.0. The ARM processor does not support instructions like divide, so compiler specific intrinsics are required. The .libs are checked in here and referenced from the tools_def.template file, so they are automatically included when the compiler is invoked. The souce to these .lib files will be checkin soon in a new ArmPkg.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9201 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Bin')
-rw-r--r-- | BaseTools/Bin/CYGWIN_NT-5.1-i686/Arm/DEBUG_RVCT31CYGWIN/CompilerIntrinsicsLib.lib | bin | 0 -> 7280 bytes | |||
-rw-r--r-- | BaseTools/Bin/CYGWIN_NT-5.1-i686/Arm/RELEASE_RVCT31CYGWIN/CompilerIntrinsicsLib.lib | bin | 0 -> 7296 bytes | |||
-rwxr-xr-x | BaseTools/Bin/CYGWIN_NT-5.1-i686/armcc_wrapper.py | 88 | ||||
-rw-r--r-- | BaseTools/Bin/Darwin-i386/Arm/DEBUG_XCODE31/CompilerIntrinsicsLib.lib | bin | 0 -> 36072 bytes | |||
-rw-r--r-- | BaseTools/Bin/Darwin-i386/Arm/DEBUG_XCODE32/CompilerIntrinsicsLib.lib | bin | 0 -> 36072 bytes | |||
-rw-r--r-- | BaseTools/Bin/Darwin-i386/Arm/RELEASE_XCODE31/CompilerIntrinsicsLib.lib | bin | 0 -> 11504 bytes | |||
-rw-r--r-- | BaseTools/Bin/Darwin-i386/Arm/RELEASE_XCODE32/CompilerIntrinsicsLib.lib | bin | 0 -> 11504 bytes | |||
-rw-r--r-- | BaseTools/Bin/Win32/Arm/DEBUG_RVCT31/CompilerIntrinsicsLib.lib | bin | 0 -> 7240 bytes | |||
-rw-r--r-- | BaseTools/Bin/Win32/Arm/RELEASE_RVCT31/CompilerIntrinsicsLib.lib | bin | 0 -> 7252 bytes |
9 files changed, 88 insertions, 0 deletions
diff --git a/BaseTools/Bin/CYGWIN_NT-5.1-i686/Arm/DEBUG_RVCT31CYGWIN/CompilerIntrinsicsLib.lib b/BaseTools/Bin/CYGWIN_NT-5.1-i686/Arm/DEBUG_RVCT31CYGWIN/CompilerIntrinsicsLib.lib Binary files differnew file mode 100644 index 0000000000..5f149545f6 --- /dev/null +++ b/BaseTools/Bin/CYGWIN_NT-5.1-i686/Arm/DEBUG_RVCT31CYGWIN/CompilerIntrinsicsLib.lib diff --git a/BaseTools/Bin/CYGWIN_NT-5.1-i686/Arm/RELEASE_RVCT31CYGWIN/CompilerIntrinsicsLib.lib b/BaseTools/Bin/CYGWIN_NT-5.1-i686/Arm/RELEASE_RVCT31CYGWIN/CompilerIntrinsicsLib.lib Binary files differnew file mode 100644 index 0000000000..d3efae3d88 --- /dev/null +++ b/BaseTools/Bin/CYGWIN_NT-5.1-i686/Arm/RELEASE_RVCT31CYGWIN/CompilerIntrinsicsLib.lib diff --git a/BaseTools/Bin/CYGWIN_NT-5.1-i686/armcc_wrapper.py b/BaseTools/Bin/CYGWIN_NT-5.1-i686/armcc_wrapper.py new file mode 100755 index 0000000000..4d91a264ba --- /dev/null +++ b/BaseTools/Bin/CYGWIN_NT-5.1-i686/armcc_wrapper.py @@ -0,0 +1,88 @@ +#!/usr/bin/env python +# +# Copyright (c) 2008 - 2009, Apple Inc. All rights reserved. +# +# All rights reserved. This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# + +# +# ARMCC tools do not support cygwin paths. Ths script converts cygwin paths to DOS paths +# in any arguments. +# +# armcc_wrapper.py ToolToExec [command line to convert] +# +# anthing with the / will be converted via cygpath cygwin call or manually. +# -I/cygpath/c/example is a special case as you can not pass -I to cygpath +# +# ExceptionList if a tool takes an argument with a / add it to the exception list +# +import sys +import os +import subprocess + +# +# Convert using cygpath command line tool +# Currently not used, but just in case we need it in the future +# +def ConvertCygPathToDosViacygpath(CygPath): + p = subprocess.Popen("cygpath -m " + CygPath, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, close_fds=True) + return p.stdout.read().strip() + +# +# +# +def ConvertCygPathToDos(CygPath): + if CygPath.find("/cygdrive/") == 0: + # convert /cygdrive/c/Xyz to c:/Xyz + DosPath = CygPath[10] + ':' + CygPath[11:] + else: + DosPath = CygPath + + # need the extra \\ as we are making a string to pass to a command + return DosPath.replace('/','\\\\') + + +def main(argv): + + # use 1st argument as name of tool to call + Command = sys.argv[1] + + ExceptionList = ["/interwork"] + + for arg in argv: + if arg.find('/') == -1: + # if we don't need to convert just add to the command line + Command = Command + ' ' + arg + elif arg in ExceptionList: + # if it is in the list, then don't do a cygpath + # assembler stuff after --apcs has the /. + Command = Command + ' ' + arg + else: + if ((arg[0] == '-') and (arg[1] == 'I' or arg[1] == 'i')): + CygPath = arg[0] + arg[1] + ConvertCygPathToDos(arg[2:]) + else: + CygPath = ConvertCygPathToDos(arg) + + Command = Command + ' ' + CygPath + + # call the real tool with the converted paths + return subprocess.call(Command, shell=True) + + +if __name__ == "__main__": + try: + ret = main(sys.argv[2:]) + + except: + print "exiting: exception from " + sys.argv[0] + ret = 2 + + sys.exit(ret) + diff --git a/BaseTools/Bin/Darwin-i386/Arm/DEBUG_XCODE31/CompilerIntrinsicsLib.lib b/BaseTools/Bin/Darwin-i386/Arm/DEBUG_XCODE31/CompilerIntrinsicsLib.lib Binary files differnew file mode 100644 index 0000000000..79964fe1b6 --- /dev/null +++ b/BaseTools/Bin/Darwin-i386/Arm/DEBUG_XCODE31/CompilerIntrinsicsLib.lib diff --git a/BaseTools/Bin/Darwin-i386/Arm/DEBUG_XCODE32/CompilerIntrinsicsLib.lib b/BaseTools/Bin/Darwin-i386/Arm/DEBUG_XCODE32/CompilerIntrinsicsLib.lib Binary files differnew file mode 100644 index 0000000000..79964fe1b6 --- /dev/null +++ b/BaseTools/Bin/Darwin-i386/Arm/DEBUG_XCODE32/CompilerIntrinsicsLib.lib diff --git a/BaseTools/Bin/Darwin-i386/Arm/RELEASE_XCODE31/CompilerIntrinsicsLib.lib b/BaseTools/Bin/Darwin-i386/Arm/RELEASE_XCODE31/CompilerIntrinsicsLib.lib Binary files differnew file mode 100644 index 0000000000..c82c915b8e --- /dev/null +++ b/BaseTools/Bin/Darwin-i386/Arm/RELEASE_XCODE31/CompilerIntrinsicsLib.lib diff --git a/BaseTools/Bin/Darwin-i386/Arm/RELEASE_XCODE32/CompilerIntrinsicsLib.lib b/BaseTools/Bin/Darwin-i386/Arm/RELEASE_XCODE32/CompilerIntrinsicsLib.lib Binary files differnew file mode 100644 index 0000000000..c82c915b8e --- /dev/null +++ b/BaseTools/Bin/Darwin-i386/Arm/RELEASE_XCODE32/CompilerIntrinsicsLib.lib diff --git a/BaseTools/Bin/Win32/Arm/DEBUG_RVCT31/CompilerIntrinsicsLib.lib b/BaseTools/Bin/Win32/Arm/DEBUG_RVCT31/CompilerIntrinsicsLib.lib Binary files differnew file mode 100644 index 0000000000..90dd1193b7 --- /dev/null +++ b/BaseTools/Bin/Win32/Arm/DEBUG_RVCT31/CompilerIntrinsicsLib.lib diff --git a/BaseTools/Bin/Win32/Arm/RELEASE_RVCT31/CompilerIntrinsicsLib.lib b/BaseTools/Bin/Win32/Arm/RELEASE_RVCT31/CompilerIntrinsicsLib.lib Binary files differnew file mode 100644 index 0000000000..fbce5c0e70 --- /dev/null +++ b/BaseTools/Bin/Win32/Arm/RELEASE_RVCT31/CompilerIntrinsicsLib.lib |