]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Guido Serassio <serassio@squid-cache.org>
authorAmos Jeffries <amosjeffries@squid-cache.org>
Tue, 8 Jul 2008 03:01:49 +0000 (21:01 -0600)
committerAmos Jeffries <amosjeffries@squid-cache.org>
Tue, 8 Jul 2008 03:01:49 +0000 (21:01 -0600)
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

configure
configure.in
src/cf.data.pre [changed mode: 0755->0644]

index d4ab3d45fce4f3adf0930ed794444d9e1b7e4f6f..f21d310dfa80edc1aafd3f9e1221b5babf301753 100755 (executable)
--- 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//'`"
index 55079d5a3e493158ca38f4bc6fd5cfeb4ae9d5b1..59dfe4e44253842f41f210607d525e46865dc1a7 100755 (executable)
@@ -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//'`"
old mode 100755 (executable)
new mode 100644 (file)