UnixPkg: Fix build for Linux
UnixPkg/UnixSnpDxe is currently BSD/OS X specific. Therefore we only build it if "-D NETWORK_SUPPORT" is used on the build command line. UnixPkg/build.sh and UnixPkg/build64.sh are updated to automatically define NETWORK_SUPPORT if building on OS X. <net/if_dl.h> and <net/bpf.h> are also only included in UnixPkg/Include/Common/UnixInclude.h if __APPLE__ is defined. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11346 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -41,6 +41,7 @@ fi
|
||||
# Pick a default tool type for a given OS
|
||||
#
|
||||
TARGET_TOOLS=MYTOOLS
|
||||
NETWORK_SUPPORT=
|
||||
case `uname` in
|
||||
CYGWIN*) echo Cygwin not fully supported yet. ;;
|
||||
Darwin*)
|
||||
@@ -52,6 +53,7 @@ case `uname` in
|
||||
else
|
||||
TARGET_TOOLS=XCODE32
|
||||
fi
|
||||
NETWORK_SUPPORT="-D NETWORK_SUPPORT"
|
||||
;;
|
||||
Linux*) TARGET_TOOLS=ELFGCC ;;
|
||||
|
||||
@@ -115,6 +117,6 @@ done
|
||||
#
|
||||
echo $PATH
|
||||
echo `which build`
|
||||
build -p $WORKSPACE/UnixPkg/UnixPkg.dsc -a IA32 -t $TARGET_TOOLS -n 3 $1 $2 $3 $4 $5 $6 $7 $8
|
||||
build -p $WORKSPACE/UnixPkg/UnixPkg.dsc -a IA32 -t $TARGET_TOOLS $NETWORK_SUPPORT -n 3 $1 $2 $3 $4 $5 $6 $7 $8
|
||||
exit $?
|
||||
|
||||
|
Reference in New Issue
Block a user