From: Amos Jeffries Date: Tue, 8 Jul 2008 03:01:49 +0000 (-0600) Subject: Author: Guido Serassio X-Git-Tag: SQUID_3_0_STABLE8~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=652a015719c801149f120add17bb079825453c02;p=thirdparty%2Fsquid.git Author: Guido Serassio 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 b/configure index d4ab3d45fc..f21d310dfa 100755 --- a/configure +++ b/configure @@ -22156,6 +22156,9 @@ if test -n "$buildmodel" && test "$buildmodel" != "default"; 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/configure.in b/configure.in index 55079d5a3e..59dfe4e442 100755 --- a/configure.in +++ b/configure.in @@ -1200,14 +1200,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