From: Guido Serassio Date: Mon, 30 Jun 2008 16:27:12 +0000 (+0200) Subject: Fix build error on Solaris using gcc and --with-large-files X-Git-Tag: SQUID_3_1_0_1~49^2~178 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a078ea4d51c9a2631264b524c2425fbceb7cdc1f;p=thirdparty%2Fsquid.git Fix build error on Solaris using gcc and --with-large-files On Solaris getconf returns for CFLAGS and LDFLAGS -xarch=generic64 option, but this option is supported only by Sun cc, so we need to We need to replace it with -m64 gcc equivalent option --- diff --git a/configure.in b/configure.in index 68f4071296..0f81ad5296 100755 --- a/configure.in +++ b/configure.in @@ -1305,14 +1305,19 @@ if test -n "$buildmodel" && test "$buildmodel" != "default"; then LDFLAGS="`getconf ${buildmodel}_LDFLAGS` $LDFLAGS" case "$host" in dnl -dnl On Solaris getconf returns for CFLAGS -Xa and -Usun options, but: -dnl -Xa is supported only by Sun cc, so we need to remove it when using gcc -dnl The 'sun' define is needed by ipfilter includes, so we must remove -Usun +dnl On Solaris getconf returns for CFLAGS -xarch=generic64, -Xa and -Usun options, and +dnl for LDFLAGS -xarch=generic64, but: +dnl "-Xa" is supported only by Sun cc, so we need to remove it when using gcc +dnl For gcc "-xarch=generic64" must be replaced with "-m64" +dnl The 'sun' define is needed by ipfilter includes, so we must remove "-Usun" *-solaris*) if test "$GCC" = "yes"; then echo "Removing -Xa for gcc on $host" CFLAGS="`echo $CFLAGS | sed -e 's/-Xa//'`" CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-Xa//'`" + echo "Replacing -xarch=generic64 with -m64 for gcc on $host" + CFLAGS="`echo $CFLAGS | sed -e 's/-xarch=generic64/-m64/'`" + LDFLAGS="`echo $LDFLAGS | sed -e 's/-xarch=generic64//'`" fi echo "Removing -Usun on $host" CFLAGS="`echo $CFLAGS | sed -e 's/-Usun//'`" diff --git a/src/cf.data.pre b/src/cf.data.pre old mode 100755 new mode 100644