Merge branch 'hotfix-32-cpu_flags'
This merge to to ensure the CPU flags are checked properly and if undetected, they can be set manually in the build script.
This commit is contained in:
@@ -143,8 +143,16 @@ else (CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l")
|
|||||||
set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -mssse3")
|
set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -mssse3")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(C_FLAGS_PROCESSOR " ${C_FLAGS_PROCESSOR} ${CFLAGS_PROCESSOR_USER}")
|
||||||
|
|
||||||
Message("C_FLAGS_PROCESSOR is ${C_FLAGS_PROCESSOR}")
|
Message("C_FLAGS_PROCESSOR is ${C_FLAGS_PROCESSOR}")
|
||||||
|
|
||||||
|
if (CMAKE_SYSTEM_PROCESSOR MATCHES "x86")
|
||||||
|
if ( (NOT( C_FLAGS_PROCESSOR MATCHES "ssse3")) OR (NOT( C_FLAGS_PROCESSOR MATCHES "msse4.1")) OR (NOT( C_FLAGS_PROCESSOR MATCHES "msse4.2")) )
|
||||||
|
Message(FATAL_ERROR "For x86 Architecture, you must have following flags: -mssse3 -msse4.1 -msse4.2. The current detected flags are: ${C_FLAGS_PROCESSOR}. You can pass the flags manually in build script, for example: ./build_oai --cflags_processor \"-mssse3 -msse4.1 -msse4.2\" ")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
#
|
#
|
||||||
set(CMAKE_C_FLAGS
|
set(CMAKE_C_FLAGS
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ REL="Rel10"
|
|||||||
HW="EXMIMO"
|
HW="EXMIMO"
|
||||||
EPC=0
|
EPC=0
|
||||||
VERBOSE_COMPILE=0
|
VERBOSE_COMPILE=0
|
||||||
|
CFLAGS_PROCESSOR_USER=""
|
||||||
|
|
||||||
function print_help() {
|
function print_help() {
|
||||||
echo_info '
|
echo_info '
|
||||||
@@ -105,6 +106,9 @@ Options
|
|||||||
Compiles oaisim or lte-softmodem without S1 interface, using direct link to IP instead
|
Compiles oaisim or lte-softmodem without S1 interface, using direct link to IP instead
|
||||||
--verbose-compile
|
--verbose-compile
|
||||||
Shows detailed compilation instructions in makefile
|
Shows detailed compilation instructions in makefile
|
||||||
|
--cflags_processor
|
||||||
|
Manually Add CFLAGS of processor if they are not detected correctly by script. Only add these flags if you know your processor supports them. Example flags: -msse3 -msse4.1 -msse4.2 -mavx2
|
||||||
|
|
||||||
Usage (first build):
|
Usage (first build):
|
||||||
oaisim (eNB + UE): ./build_oai -I -g --oaisim -x --install-system-files
|
oaisim (eNB + UE): ./build_oai -I -g --oaisim -x --install-system-files
|
||||||
Eurecom EXMIMO + COTS UE : ./build_oai -I -g --eNB --EPC -x --install-system-files
|
Eurecom EXMIMO + COTS UE : ./build_oai -I -g --eNB --EPC -x --install-system-files
|
||||||
@@ -211,6 +215,10 @@ function main() {
|
|||||||
VERBOSE_COMPILE=1
|
VERBOSE_COMPILE=1
|
||||||
echo_info "Will compile with verbose instructions"
|
echo_info "Will compile with verbose instructions"
|
||||||
shift;;
|
shift;;
|
||||||
|
--cflags_processor)
|
||||||
|
CFLAGS_PROCESSOR_USER=$2
|
||||||
|
echo_info "setting CPU FLAGS from USER to: $CFLAGS_PROCESSOR_USER"
|
||||||
|
shift 2;;
|
||||||
-h | --help)
|
-h | --help)
|
||||||
print_help
|
print_help
|
||||||
exit 1;;
|
exit 1;;
|
||||||
@@ -302,6 +310,7 @@ function main() {
|
|||||||
if [ "$NOS1" = "1" ] ; then
|
if [ "$NOS1" = "1" ] ; then
|
||||||
cat $DIR/$lte_build_dir/CMakeLists.template >> $cmake_file
|
cat $DIR/$lte_build_dir/CMakeLists.template >> $cmake_file
|
||||||
fi
|
fi
|
||||||
|
echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file
|
||||||
echo "set ( XFORMS $XFORMS )" >> $cmake_file
|
echo "set ( XFORMS $XFORMS )" >> $cmake_file
|
||||||
echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
|
echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
|
||||||
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
|
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
|
||||||
@@ -430,6 +439,7 @@ function main() {
|
|||||||
echo_info "Compiling $oaisim_exec ($oaisim_build_dir)"
|
echo_info "Compiling $oaisim_exec ($oaisim_build_dir)"
|
||||||
cmake_file=$DIR/$oaisim_build_dir/CMakeLists.txt
|
cmake_file=$DIR/$oaisim_build_dir/CMakeLists.txt
|
||||||
cp $DIR/$oaisim_build_dir/CMakeLists.template $cmake_file
|
cp $DIR/$oaisim_build_dir/CMakeLists.template $cmake_file
|
||||||
|
echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file
|
||||||
echo "set ( XFORMS $XFORMS )" >> $cmake_file
|
echo "set ( XFORMS $XFORMS )" >> $cmake_file
|
||||||
echo "set ( PRINT_STATS $PRINT_STATS )" >> $cmake_file
|
echo "set ( PRINT_STATS $PRINT_STATS )" >> $cmake_file
|
||||||
echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
|
echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
|
||||||
|
|||||||
Reference in New Issue
Block a user