On 28/05/2013 8:09 p.m., Kinkie wrote:
Hi, this patch (minus the formatting, I will commit directly to trunk if approved) fixes the build on Intel's compiler suite. Summary of changes: - change configure to not define _FILE_OFFSET_BITS=64 on 64+bit platforms - it's not needed and it confuses libg++. To do this I need to detect sizeof(long) early; it's a double check but I don't feel we need to restructure the whole configure.ac for one single check
You could cache it and re-use the cached result on the second check if it matters.
- #if-guard some gcc-specific #pragma directives so that they're not used on icc
It looks okay to me. +1 regardless of whether you choose to do the cache tweak.
------ the patch ------ === modified file 'configure.ac' --- configure.ac 2013-05-21 05:39:18 +0000 +++ configure.ac 2013-05-27 08:56:07 +0000 @@ -1583,6 +1583,9 @@ esac ]) +#hack. Let's early-detect sizeof(long) +AC_CHECK_SIZEOF(long) + if test "x$squid_opt_enable_large_files" = "xyes" -a "x$buildmodel" = "x"; then for model in POSIX_V6_LPBIG_OFFBIG XBS5_LPBIG_OFFBIG POSIX_V6_LP64_OFF64 XBS5_LP64_OFF64 POSIX_V6_ILP32_OFFBIG XBS5_ILP32_OFFBIG; do if test "`getconf _$model 2>/dev/null || true`" = 1 || test "`getconf $model 2>/dev/null || true`" ; then @@ -1595,7 +1598,8 @@ fi fi if test "x$buildmodel" = "xdefault" -o "x$buildmodel" = "x"; then - if test "x$squid_opt_enable_large_files" = "xyes" ; then + # define _FILE_OFFSET_BITS if requested and needed + if test "x$squid_opt_enable_large_files" = "xyes" -a $ac_cv_sizeof_long -le 4 ; then AC_MSG_NOTICE([Enabling -D_FILE_OFFSET_BITS=64]) CFLAGS="-D_FILE_OFFSET_BITS=64 $CFLAGS" CXXFLAGS="-D_FILE_OFFSET_BITS=64 $CXXFLAGS" === modified file 'tools/purge/convert.cc' --- tools/purge/convert.cc 2012-10-04 11:10:17 +0000 +++ tools/purge/convert.cc 2013-05-22 16:11:41 +0000 @@ -40,7 +40,7 @@ // Initial revision // // -#if (defined(__GNUC__) || defined(__GNUG__)) && !defined(__clang__) +#if (defined(__GNUC__) || defined(__GNUG__)) && !defined(__clang__) && !defined(__INTEL_COMPILER) #pragma implementation #endif === modified file 'tools/purge/socket.cc' --- tools/purge/socket.cc 2013-01-21 07:15:09 +0000 +++ tools/purge/socket.cc 2013-05-22 16:44:03 +0000 @@ -42,7 +42,7 @@ // Initial revision // // -#if (defined(__GNUC__) || defined(__GNUG__)) && !defined(__clang__) +#if (defined(__GNUC__) || defined(__GNUG__)) && !defined(__clang__) && !defined(__INTEL_COMPILER) #pragma implementation #endif -- /kinkie