Skip to content
Extraits de code Groupes Projets
Valider 8210a7a9 rédigé par Tom Barbette's avatar Tom Barbette
Parcourir les fichiers

configure: Do not use stupid AX_CHECK_X86_FEATURES

It does not take into account -march, so you can't create portable
binaries...
parent 715ac4b6
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -13,6 +13,5 @@
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
m4_include([m4/ax_check_compile_flag.m4])
m4_include([m4/ax_check_x86_features.m4])
m4_include([m4/ax_cxx_compile_stdcxx.m4])
m4_include([m4/click.m4])
Ce diff est replié.
......@@ -57,18 +57,6 @@ AC_PROG_CXXCPP
AX_CHECK_COMPILE_FLAG(-Winconsistent-missing-override,CXXFLAGS="$CXXFLAGS -Wno-inconsistent-missing-override",:,[-Werror])
case "$target" in
*x86*)
AX_CHECK_X86_FEATURES([CFLAGS="$CFLAGS $X86_FEATURE_CFLAGS";CXXFLAGS="$CXXFLAGS $X86_FEATURE_CFLAGS"])
;;
*)
# AC_MSG_WARN(["Skipping x86 tests since target is $target"])
;;
esac
AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <new>
int main() {
......@@ -1504,22 +1492,31 @@ fi
dnl Support AVX2 instructions
AC_COMPILE_IFELSE([
#ifndef __AVX2__
#error
#endif
], [cpu_supports_avx2="yes"], [cpu_supports_avx2="no"])
AC_ARG_ENABLE([avx2],
AS_HELP_STRING([--disable-avx2],
[Do not check whether AVX2 is enabled]),
[check_avx2=no],
[check_avx2=yes])
echo "x$cpu_supports_avx2$check_avx2"
AC_MSG_CHECKING([if AVX2 should be used])
if test "x$ax_cv_gcc_x86_cpu_supports_avx2$check_avx2" = "xyesyes"; then
if test "x$cpu_supports_avx2$check_avx2" = "xyesyes"; then
AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_AVX2],1)
else
AC_MSG_RESULT([no])
fi
dnl Support SSE4.2 instructions
AC_COMPILE_IFELSE([
#ifndef __SSE4_2__
#error
#endif
], [cpu_supports_sse42="yes"], [cpu_supports_sse42="no"])
AC_ARG_ENABLE([sse42],
AS_HELP_STRING([--disable-sse42],
[Do not check whether SSE4.2 is enabled]),
......@@ -1527,7 +1524,7 @@ AC_ARG_ENABLE([sse42],
[check_sse42=yes])
AC_MSG_CHECKING([if SSE4.2 should be used])
if test "x$ax_cv_gcc_x86_cpu_supports_sse4_2$check_sse42" = "xyesyes"; then
if test "x$cpu_supports_sse42$check_sse42" = "xyesyes"; then
AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_SSE42],1)
else
......
FROM alpine:3.17
ARG machine=default
ARG machine=corei7
ARG source=0
MAINTAINER tom.barbette@uclouvain.be
......@@ -42,7 +42,7 @@ WORKDIR /fastclick
COPY ./ /fastclick/
RUN echo "DPDK in $RTE_SDK" && ./configure --enable-dpdk --enable-intel-cpu --verbose --enable-select=poll CFLAGS="-O3" CXXFLAGS="-std=c++11 -O3" --disable-dynamic-linking --enable-poll --enable-bound-port-transfer --enable-local --enable-flow --disable-flow-atomic --disable-flow-dynamic --disable-ctx-global-timeout --disable-ctx --disable-task-stats --disable-cpu-load --disable-dpdk-softqueue --enable-flow-api --prefix=/fastclick-install/ && \
RUN echo "DPDK in $RTE_SDK" && ./configure --enable-dpdk --enable-intel-cpu --verbose --enable-select=poll CFLAGS="-O3 -march=$machine" CXXFLAGS="-std=c++11 -O3 -march=$machine" --disable-dynamic-linking --enable-poll --enable-bound-port-transfer --enable-local --enable-flow --disable-flow-atomic --disable-flow-dynamic --disable-ctx-global-timeout --disable-ctx --disable-task-stats --disable-cpu-load --disable-dpdk-softqueue --enable-flow-api --enable-portable-binary --prefix=/fastclick-install/ && \
make clean && make && make install && \
if [ $source != "1" ] ; then rm -rf /fastclick ; fi
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter