Set -std=gnu99 CFLAG always and Use -march=native by default if supported by installed version of gcc

remotes/origin/master-1.0.x
William Metcalf 15 years ago committed by Victor Julien
parent 2f29b8a724
commit 9f0bf35cfd

@ -52,6 +52,7 @@ AC_INIT(configure.in)
CFLAGS="$CFLAGS -Wall -fno-strict-aliasing"
CFLAGS="$CFLAGS -Wno-unused-parameter"
CFLAGS="$CFLAGS -std=gnu99"
# Checks for programs.
AC_PROG_AWK
@ -181,17 +182,11 @@ AC_INIT(configure.in)
#enable gcc march=native gcc 4.2 or later
AC_ARG_ENABLE(gccmarch_native,
AS_HELP_STRING([--enable-gccmarch-native], [Enable gcc march=native gcc 4.2 and later only]),,[enable_gccmarch_native=no])
AS_HELP_STRING([--enable-gccmarch-native], [Enable gcc march=native gcc 4.2 and later only]),,[enable_gccmarch_native=yes])
AS_IF([test "x$enable_gccmarch_native" = "xyes"], [
if test "$gccvernum" -ge "402"; then
dnl gcc 4.2 or later
CFLAGS="$CFLAGS -march=native"
else
echo
echo " You specified --enable-gccmarch-native but looks like you are running gcc < 4.2"
echo " Please update your version of gcc or remove this option from configure."
echo
exit 1
fi
])

@ -63,7 +63,7 @@ void B2gThreadDestroyCtx(MpmCtx *, MpmThreadCtx *);
int B2gAddPatternCI(MpmCtx *, uint8_t *, uint16_t, uint16_t, uint16_t, uint32_t, uint32_t, uint8_t);
int B2gAddPatternCS(MpmCtx *, uint8_t *, uint16_t, uint16_t, uint16_t, uint32_t, uint32_t, uint8_t);
int B2gPreparePatterns(MpmCtx *mpm_ctx);
inline uint32_t B2gSearchWrap(MpmCtx *mpm_ctx, MpmThreadCtx *mpm_thread_ctx, PatternMatcherQueue *, uint8_t *buf, uint16_t buflen);
uint32_t B2gSearchWrap(MpmCtx *mpm_ctx, MpmThreadCtx *mpm_thread_ctx, PatternMatcherQueue *, uint8_t *buf, uint16_t buflen);
uint32_t B2gSearch1(MpmCtx *mpm_ctx, MpmThreadCtx *mpm_thread_ctx, PatternMatcherQueue *, uint8_t *buf, uint16_t buflen);
#ifdef B2G_SEARCH2
uint32_t B2gSearch2(MpmCtx *mpm_ctx, MpmThreadCtx *mpm_thread_ctx, PatternMatcherQueue *, uint8_t *buf, uint16_t buflen);
@ -868,7 +868,7 @@ void B2gThreadDestroyCtx(MpmCtx *mpm_ctx, MpmThreadCtx *mpm_thread_ctx) {
}
}
inline uint32_t B2gSearchWrap(MpmCtx *mpm_ctx, MpmThreadCtx *mpm_thread_ctx, PatternMatcherQueue *pmq, uint8_t *buf, uint16_t buflen) {
uint32_t B2gSearchWrap(MpmCtx *mpm_ctx, MpmThreadCtx *mpm_thread_ctx, PatternMatcherQueue *pmq, uint8_t *buf, uint16_t buflen) {
B2gCtx *ctx = (B2gCtx *)mpm_ctx->ctx;
return ctx ? ctx->Search(mpm_ctx, mpm_thread_ctx, pmq, buf, buflen) : 0;
}

Loading…
Cancel
Save