forked from freebsd/uefi-edk2
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
213 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
%rename cpp old_cpp | ||
|
||
*cpp: | ||
%(cpp_subtarget) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2021 OmniOS Community Edition (OmniOSce) Association. | ||
|
||
usage() { | ||
cat <<- EOM | ||
Usage: $0 [-bov] [-j <jobs>] <clean|RELEASE|DEBUG> | ||
-b - Build BHYVE firmware (default) | ||
-o - Build OVMF firmware (for Propolis) | ||
-p - Apply patches and exit | ||
-j jobs - Set parallelism - jobs defaults to 1 or the value of \$JOBS | ||
-v - Verbose output | ||
'clean' will clean up the directory any remove old build remnants | ||
RELEASE|DEBUG specify the firmware variant to be built | ||
EOM | ||
exit 1 | ||
} | ||
|
||
: "${GCCVER:=14}" | ||
: "${GCCPATH:=/opt/gcc-$GCCVER}" | ||
: "${GCC:=$GCCPATH/bin/gcc}" | ||
: "${GXX:=$GCCPATH/bin/g++}" | ||
: "${GMAKE:=/usr/bin/gmake}" | ||
: "${GPATCH:=/usr/bin/gpatch}" | ||
: "${GAS:=/usr/bin/gas}" | ||
: "${GAR:=/usr/bin/gar}" | ||
: "${GLD:=/usr/bin/gld}" | ||
: "${GOBJCOPY:=/usr/bin/gobjcopy}" | ||
|
||
export GCCVER GCCPATH GCC GXX GMAKE GPATCH GAS GAR GLD GOBJCOPY | ||
|
||
verbose=0 | ||
stock=0 | ||
patch=0 | ||
: "${JOBS:=1}" | ||
|
||
while [[ "$1" = -* ]]; do | ||
case "$1" in | ||
-csm) | ||
echo "This branch does not support building the CSM variant" | ||
exit 1 | ||
;; | ||
-v) verbose=1 ;; | ||
-b) stock=0 ;; | ||
-o) stock=1 ;; | ||
-p) patch=1 ;; | ||
-j) | ||
[ $# -ge 2 ] || usage | ||
JOBS="$2" | ||
shift | ||
;; | ||
*) usage ;; | ||
esac | ||
shift | ||
done | ||
|
||
for p in patches/*; do | ||
[[ -f "$p" ]] || continue | ||
$GPATCH --force --forward --strip=1 < $p | ||
done | ||
|
||
((patch)) && exit 0 | ||
|
||
clean=0 | ||
case "$1" in | ||
DEBUG) flavour=DEBUG | ||
;; | ||
RELEASE) flavour=RELEASE | ||
;; | ||
clean) clean=1 ;; | ||
*) usage ;; | ||
esac | ||
shift | ||
[ -n "$1" ] && usage | ||
|
||
|
||
MAKE_ARGS=" | ||
AS=$GAS | ||
AR=$GAR | ||
LD=$GLD | ||
OBJCOPY=$GOBJCOPY | ||
CC=$GCC BUILD_CC=$GCC | ||
CXX=$GXX BUILD_CXX=$GXX | ||
GCCPATH=$GCCPATH | ||
" | ||
|
||
((stock)) && platform=OvmfPkg/OvmfPkgX64.dsc \ | ||
|| platform=OvmfPkg/Bhyve/BhyveX64.dsc | ||
|
||
ILLGCC_BIN=$GCCPATH/bin/ | ||
BUILD_ARGS="-DDEBUG_ON_SERIAL_PORT=TRUE -DNETWORK_HTTP_BOOT_ENABLE=TRUE" | ||
BUILD_ARGS+=" -DFD_SIZE_2MB" | ||
PYTHON3_ENABLE=TRUE | ||
[ $verbose -eq 1 ] && BUILD_ARGS+=" -v" | ||
|
||
export MAKE_ARGS ILLGCC_BIN BUILD_ARGS PYTHON3_ENABLE | ||
|
||
rm -rf Conf/{target,build_rule,tools_def}.txt Conf/.cache | ||
|
||
if ((clean)); then | ||
gmake -j$JOBS $MAKE_ARGS HOST_ARCH=X64 ARCH=X64 -C BaseTools clean | ||
rm -rf Build/ | ||
exit 0 | ||
fi | ||
|
||
set -e | ||
|
||
gmake -j$JOBS $MAKE_ARGS HOST_ARCH=X64 ARCH=X64 -C BaseTools | ||
|
||
source edksetup.sh | ||
|
||
./BaseTools/BinWrappers/PosixLike/build \ | ||
-n $JOBS \ | ||
-p $platform \ | ||
-a X64 \ | ||
-b $flavour \ | ||
-t ILLGCC \ | ||
$BUILD_ARGS | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
diff --git a/CryptoPkg/Library/OpensslLib/openssl/crypto/threads_pthread.c b/CryptoPkg/Library/OpensslLib/openssl/crypto/threads_pthread.c | ||
index 801855c930..6a5ed91023 100644 | ||
--- a/CryptoPkg/Library/OpensslLib/openssl/crypto/threads_pthread.c | ||
+++ b/CryptoPkg/Library/OpensslLib/openssl/crypto/threads_pthread.c | ||
@@ -13,7 +13,7 @@ | ||
#include <openssl/crypto.h> | ||
#include "internal/cryptlib.h" | ||
|
||
-#if defined(__sun) | ||
+#if defined(__sun) && !defined(__illumos__) | ||
# include <atomic.h> | ||
# #endif |