Thanks for your work on this area and as soon as you got a patched
gcc.spec, thanks to send it to the list.

I'll try it on AIX 5.2/PASE

2005/7/22, Simon J Mudd <[EMAIL PROTECTED]>:
> I have managed to get the 3.4.4 gcc to build on AIX 5.1 using the
> following "hacks" to the standard rpm spec file.
> 
> [EMAIL PROTECTED] COS4 ~]$ diff -u gcc.spec.orig gcc.spec
> --- gcc.spec.orig       2005-07-22 08:35:44.018919511 +0200
> +++ gcc.spec    2005-07-22 08:35:38.505805263 +0200
> @@ -37,18 +37,20 @@
>   Group:        Compiler
>   License:      GPL
>   Version:      %{V_full}
> -Release:      20050707
> +Release:      20050707.TEST_FOR_AIX
> 
>   #   package options
>   %option       with_cxx       yes
>   %option       with_objc      no
>   %option       with_java      no
>   %option       with_f77       no
> -%option       with_optimize  yes
> +###%option       with_optimize  yes
> +%option       with_optimize  no
>   %option       with_profile   no
> -%option       with_binutils  yes
> +###%option       with_binutils  yes
> +%option       with_binutils  no
>   %option       with_threads   yes
> -%option       with_gcc       no
> +%option       with_gcc       yes
> 
> 
>   #   list of sources
>   Source0:
> ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
> @@ -114,6 +116,12 @@
>              ;;
>       esac
>   %endif
> +    ### temporary hack for AIX - don't use gnu ld or as
> +    ### - add the --enable-version-specific-runtime-libs (but check later
> if this is needed)
> +    if [ $(uname) = "AIX" ]; then
> +        l_with_gnu_ld_as=
> +        l_with_ld_as="--with-as=/usr/bin/as --with-ld=/usr/bin/ld
> --enable-version-specific-runtime-libs"
> +    fi
> 
>       #   determine threads usage
>   %if "%{with_threads}" == "yes"
> @@ -147,8 +155,15 @@
>         echo "am_cv_lib_iconv=no"
>       ) >config.cache
> 
> +    ### AIX hack
> +    if [ $(uname) = AIX ]; then
> +        l_cc="gcc"     # use the gcc compiler that IBM provides via an rpm
> +    else
> +        l_cc="%{l_cc}"
> +    fi
> +
>       #   configure the package
> -    CC="%{l_cc}" \
> +    CC="${l_cc}" \
>       CFLAGS="%{l_cflags}" \
>   %if "%{with_java}" == "yes"
>       CPPFLAGS="%{l_cppflags}" \
> @@ -172,7 +187,8 @@
>   %if "%{with_java}" == "yes"
>           --with-system-zlib \
>   %endif
> -        ${l_with_gnu_ld_as}
> +        ${l_with_gnu_ld_as} \
> +        ${l_with_ld_as}
> 
>       #   explicitly redirect remaining gcc library directories
>       %{l_shtool} subst -v -s \
> 
> 
> This make the rpm %build section complete without errors (the problem
> appeared to be incorrect usage of ln/as.
> 
> However the %install phase still fails and I won't have time to look at
> this until next week. The install fails at:
> 
> 
> + subdir=.
> + '[' .. = .. ']'
> + continue
> + for multilib in '`$RPM_BUILD_ROOT/openpkg/bin/gcc --print-multi-lib`'
> ++ echo 'pthread;@pthread'
> ++ sed -e 's/;.*$//'
> + subdir=pthread
> + '[' .pthread = .. ']'
> + mv /openpkg/RPM/TMP/gcc-3.4.4-root/openpkg/lib/pthread/libiberty.a
> /openpkg/RPM/TMP/gcc-3.4.4-root/openpkg/lib/gcc/powerpc-ibm-aix5.1.0.0/3.4.4/pthread/
> + rm -rf /openpkg/RPM/TMP/gcc-3.4.4-root/openpkg/lib/pthread
> + for multilib in '`$RPM_BUILD_ROOT/openpkg/bin/gcc --print-multi-lib`'
> ++ echo 'power;@mcpu=power'
> ++ sed -e 's/;.*$//'
> + subdir=power
> + '[' .power = .. ']'
> + mv /openpkg/RPM/TMP/gcc-3.4.4-root/openpkg/lib/power/libiberty.a
> /openpkg/RPM/TMP/gcc-3.4.4-root/openpkg/lib/gcc/powerpc-ibm-aix5.1.0.0/3.4.4/power/
> + rm -rf /openpkg/RPM/TMP/gcc-3.4.4-root/openpkg/lib/power
> + for multilib in '`$RPM_BUILD_ROOT/openpkg/bin/gcc --print-multi-lib`'
> ++ echo 'powerpc;@mcpu=powerpc'
> ++ sed -e 's/;.*$//'
> + subdir=powerpc
> + '[' .powerpc = .. ']'
> + mv /openpkg/RPM/TMP/gcc-3.4.4-root/openpkg/lib/powerpc/libiberty.a
> /openpkg/RPM/TMP/gcc-3.4.4-root/openpkg/lib/gcc/powerpc-ibm-aix5.1.0.0/3.4.4/powerpc/
> + rm -rf /openpkg/RPM/TMP/gcc-3.4.4-root/openpkg/lib/powerpc
> + for multilib in '`$RPM_BUILD_ROOT/openpkg/bin/gcc --print-multi-lib`'
> ++ echo 'ppc64;@maix64'
> ++ sed -e 's/;.*$//'
> + subdir=ppc64
> + '[' .ppc64 = .. ']'
> + mv /openpkg/RPM/TMP/gcc-3.4.4-root/openpkg/lib/ppc64/libiberty.a
> /openpkg/RPM/TMP/gcc-3.4.4-root/openpkg/lib/gcc/powerpc-ibm-aix5.1.0.0/3.4.4/ppc64/
> + rm -rf /openpkg/RPM/TMP/gcc-3.4.4-root/openpkg/lib/ppc64
> + for multilib in '`$RPM_BUILD_ROOT/openpkg/bin/gcc --print-multi-lib`'
> ++ echo 'pthread/power;@[EMAIL PROTECTED]'
> ++ sed -e 's/;.*$//'
> + subdir=pthread/power
> + '[' .pthread/power = .. ']'
> + mv '/openpkg/RPM/TMP/gcc-3.4.4-root/openpkg/lib/pthread/power/lib*.a'
> /openpkg/RPM/TMP/gcc-3.4.4-root/openpkg/lib/gcc/powerpc-ibm-aix5.1.0.0/3.4.4/pthread/power/
> mv: cannot rename
> /openpkg/RPM/TMP/gcc-3.4.4-root/openpkg/lib/pthread/power/lib*.a to
> /openpkg/RPM/TMP/gcc-3.4.4-root/openpkg/lib/gcc/powerpc-ibm-aix5.1.0.0/3.4.4/pthread/power//lib*.a:
> No such file or directory
> error: Bad exit status from /openpkg/RPM/TMP/rpm-tmp.11762 (%install)
> 
> 
> RPM build errors:
>      Bad exit status from /openpkg/RPM/TMP/rpm-tmp.11762 (%install)
> 
> 
> So the issue appears to be library location related causing the mv to
> fail.  This is similar to what has been seen before. I'll look at this
> next week and see if I can work out the fix.
> 
> Regards,
> 
> Simon
> 
> 
> ______________________________________________________________________
> The OpenPKG Project                                    www.openpkg.org
> User Communication List                      openpkg-users@openpkg.org
>
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
User Communication List                      openpkg-users@openpkg.org

Reply via email to