diff options
author | qouyang <qouyang@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-08-04 03:17:05 +0000 |
---|---|---|
committer | qouyang <qouyang@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-08-04 03:17:05 +0000 |
commit | 8f7f05d5271f155668d67dc127bf2cc82a977dd3 (patch) | |
tree | 274b608131fa1e107bf886aca362e5ece91e70c9 | |
parent | 2cc02cdb5187e77f9bf4d9e0272899c943ae224c (diff) | |
download | edk2-platforms-8f7f05d5271f155668d67dc127bf2cc82a977dd3.tar.xz |
Fix EDKT140(CompressDll.dll does not build under cygwin gcc).
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1188 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | Tools/Source/TianoTools/CompressDll/CompressDll.c | 3 | ||||
-rw-r--r-- | Tools/Source/TianoTools/CompressDll/CompressDll.h | 1 | ||||
-rw-r--r-- | Tools/Source/TianoTools/CompressDll/build.xml | 7 | ||||
-rw-r--r-- | Tools/Source/TianoTools/Pccts/antlr/makefile.cygwin | 4 | ||||
-rw-r--r-- | Tools/Source/TianoTools/Pccts/dlg/makefile.cygwin | 4 | ||||
-rw-r--r-- | Tools/Source/TianoTools/build.xml | 2 | ||||
-rw-r--r-- | edksetup.sh | 14 |
7 files changed, 28 insertions, 7 deletions
diff --git a/Tools/Source/TianoTools/CompressDll/CompressDll.c b/Tools/Source/TianoTools/CompressDll/CompressDll.c index 3c6fc8cb4d..cc06f26c05 100644 --- a/Tools/Source/TianoTools/CompressDll/CompressDll.c +++ b/Tools/Source/TianoTools/CompressDll/CompressDll.c @@ -11,6 +11,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
+#if defined(__GNUC__)
+typedef long long __int64;/*For cygwin build*/
+#endif
#include "CompressDll.h"
#include "EfiCompress.h"
diff --git a/Tools/Source/TianoTools/CompressDll/CompressDll.h b/Tools/Source/TianoTools/CompressDll/CompressDll.h index 3b0fbb2cee..fa3b83cd10 100644 --- a/Tools/Source/TianoTools/CompressDll/CompressDll.h +++ b/Tools/Source/TianoTools/CompressDll/CompressDll.h @@ -1,4 +1,5 @@ /* DO NOT EDIT THIS FILE - it is machine generated */
+
#include <jni.h>
/* Header for class org_tianocore_frameworktasks_Compress */
diff --git a/Tools/Source/TianoTools/CompressDll/build.xml b/Tools/Source/TianoTools/CompressDll/build.xml index ff80a6c4ed..1aa5fb6ac8 100644 --- a/Tools/Source/TianoTools/CompressDll/build.xml +++ b/Tools/Source/TianoTools/CompressDll/build.xml @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2006, Intel Corporation
All rights reserved. This program and the accompanying materials
@@ -49,10 +49,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>
<includepath path="${PACKAGE_DIR}/Common"/>
<includepath path="${env.JAVA_HOME}/include"/>
- <includepath path="${env.JAVA_HOME}/include/linux" if="cyglinux"/>
+ <includepath path="${env.JAVA_HOME}/include/linux" if="gcc"/>
+ <includepath path="${env.JAVA_HOME}/include/win32" if="cygwin"/>
<includepath path="${env.JAVA_HOME}/include/win32" if="msft"/>
<libset dir="${LIB_DIR}" libs="CommonTools"/>
<syslibset libs="kernel32" if="msft"/>
+ <linkerarg value="-mno-cygwin" if="cygwin"/>
+ <linkerarg value="--add-stdcall-alias" if="cygwin"/>
</cc>
<copy file="${result}" tofile="${BIN_DIR}/CompressDll.dll"/>
<chmod file="${BIN_DIR}/CompressDll.dll" perm="ugo+x"/>
diff --git a/Tools/Source/TianoTools/Pccts/antlr/makefile.cygwin b/Tools/Source/TianoTools/Pccts/antlr/makefile.cygwin index cc590e47e5..956de0be07 100644 --- a/Tools/Source/TianoTools/Pccts/antlr/makefile.cygwin +++ b/Tools/Source/TianoTools/Pccts/antlr/makefile.cygwin @@ -167,7 +167,7 @@ PCCTS_H=../h BIN_DIR=../../../../bin
CC=gcc
COPT=-O
-ANTLR=${BIN_DIR}/antlr.exe
+ANTLR=$(BIN_DIR)/antlr.exe
DLG=${BIN_DIR}/dlg.exe
OBJ_EXT=o
OUT_OBJ = -o
@@ -180,7 +180,7 @@ OBJ=antlr.o scan.o err.o bits.o build.o fset2.o fset.o gen.o \ globals.o hash.o lex.o main.o misc.o set.o pred.o egman.o mrhoist.o fcache.o
antlr : $(OBJ) $(SRC)
- $(CC) $(CFLAGS) -o ${BIN_DIR}/antlr.exe $(OBJ)
+ $(CC) $(CFLAGS) -o $(BIN_DIR)/antlr.exe $(OBJ)
# what files does PCCTS generate (both ANTLR and DLG)
PCCTS_GEN=antlr.c scan.c err.c tokens.h mode.h parser.dlg stdpccts.h remap.h
diff --git a/Tools/Source/TianoTools/Pccts/dlg/makefile.cygwin b/Tools/Source/TianoTools/Pccts/dlg/makefile.cygwin index 02e4c8994a..bbba820d13 100644 --- a/Tools/Source/TianoTools/Pccts/dlg/makefile.cygwin +++ b/Tools/Source/TianoTools/Pccts/dlg/makefile.cygwin @@ -117,7 +117,7 @@ PCCTS_H=../h BIN_DIR=../../../../bin
CC=cc
COPT=-O
-ANTLR=${BIN_DIR}/antlr.exe
+ANTLR=$(BIN_DIR)/antlr.exe
DLG=${BIN_DIR}/dlg.exe
CFLAGS= $(COPT) -I. -I$(SET) -I$(PCCTS_H) -DUSER_ZZSYN -DZZLEXBUFSIZE=65536
OBJ_EXT=o
@@ -126,7 +126,7 @@ OBJ = dlg_p.o dlg_a.o main.o err.o set.o support.o output.o \ relabel.o automata.o
dlg : $(OBJ) $(SRC)
- $(CC) $(CFLAGS) -o ${BIN_DIR}/dlg.exe $(OBJ)
+ $(CC) $(CFLAGS) -o $(BIN_DIR)/dlg.exe $(OBJ)
SRC = dlg_p.c dlg_a.c main.c err.c $(SET)/set.c support.c output.c \
relabel.c automata.c
diff --git a/Tools/Source/TianoTools/build.xml b/Tools/Source/TianoTools/build.xml index d304f0a014..d172292809 100644 --- a/Tools/Source/TianoTools/build.xml +++ b/Tools/Source/TianoTools/build.xml @@ -158,7 +158,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. <condition property="cyglinux">
<or>
- <istrue value="linux"/>
+ <istrue value="${linux}"/>
<istrue value="${cygwin}"/>
</or>
</condition>
diff --git a/edksetup.sh b/edksetup.sh index 08e62bc877..7a3fe33a8f 100644 --- a/edksetup.sh +++ b/edksetup.sh @@ -28,10 +28,22 @@ if [ "$XMLBEANS_HOME" == "" ] then echo "Please set XMLBEANS_HOME before sourcing this script." else + +case "`uname`" in + CYGWIN*) + # Convert paths to unix format. + # This is to remove possible wrong path when converting CLASSPATH back to windows format + export WORKSPACE=`cygpath -u $WORKSPACE` + export ANT_HOME=`cygpath -u $ANT_HOME` + export XMLBEANS_HOME=`cygpath -u $XMLBEANS_HOME` + export FRAMEWORK_TOOLS_PATH=`cygpath -u $FRAMEWORK_TOOLS_PATH` + ;; +esac # These should be ok as they are. export CLASSPATH=$WORKSPACE/Tools/Jars/SurfaceArea.jar:$WORKSPACE/Tools/Jars/frameworktasks.jar:$WORKSPACE/Tools/Jars/cpptasks.jar:$WORKSPACE/Tools/Jars/PcdTools.jar:$WORKSPACE/Tools/Jars/GenBuild.jar:$XMLBEANS_HOME/lib/resolver.jar:$XMLBEANS_HOME/lib/xbean.jar:$XMLBEANS_HOME/lib/xmlpublic.jar:$XMLBEANS_HOME/lib/jsr173_1.0_api.jar:$XMLBEANS_HOME/lib/saxon8.jar:$XMLBEANS_HOME/lib/xbean_xpath.jar export CLASSPATH=$CLASSPATH:$WORKSPACE/Tools/Jars/Common.jar +export CLASSPATH=$CLASSPATH:$WORKSPACE/Tools/Jars/PcdTools.jar export CLASSPATH=$CLASSPATH:$WORKSPACE/Tools/Bin/FrameworkWizard.jar export FRAMEWORK_TOOLS_PATH=$WORKSPACE/Tools/bin export PATH=$FRAMEWORK_TOOLS_PATH:$ANT_HOME/bin:$JAVA_HOME/bin:$PATH @@ -45,6 +57,8 @@ case "`uname`" in CYGWIN*) # Convert paths to windows format. export WORKSPACE=`cygpath -w $WORKSPACE` + export ANT_HOME=`cygpath -w -p $ANT_HOME` + export XMLBEANS_HOME=`cygpath -w -p $XMLBEANS_HOME` export CLASSPATH=`cygpath -w -p $CLASSPATH` export FRAMEWORK_TOOLS_PATH=`cygpath -w -p $FRAMEWORK_TOOLS_PATH` ;; |