OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall Root: /v/openpkg/cvs Email: [EMAIL PROTECTED] Module: openpkg-src Date: 12-Mar-2008 17:48:46 Branch: HEAD Handle: 2008031216484600 Modified files: openpkg-src/gcc44 gcc44.spec Log: sync with gcc and gcc43 packages Summary: Revision Changes Path 1.2 +36 -29 openpkg-src/gcc44/gcc44.spec ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-src/gcc44/gcc44.spec ============================================================================ $ cvs diff -u -r1.1 -r1.2 gcc44.spec --- openpkg-src/gcc44/gcc44.spec 8 Mar 2008 20:36:23 -0000 1.1 +++ openpkg-src/gcc44/gcc44.spec 12 Mar 2008 16:48:46 -0000 1.2 @@ -23,7 +23,7 @@ # FIXME: rse: GCC since 4.3 now officially and unconditionally requires gmp/mpfr! # FIXME: rse: This requires blessing "gmp" and "mpfr" to CORE or include copies into "gcc" -# FIXME: rse: with_cxx=yes fails because of iconv problems +# FIXME: rse: with_cxx=yes still broken because tries to partly unconditionally include <iconv.h> # package version %define V_full 4.4 @@ -41,16 +41,16 @@ Group: Compiler License: GPL Version: %{V_full}s%{V_snap} -Release: 20080308 +Release: 20080312 # package options +%option with_binutils yes %option with_cxx no %option with_objc no %option with_java no %option with_fortran no %option with_optimize yes %option with_profile no -%option with_binutils yes %option with_threads yes %option with_multilib no %option with_gcc no @@ -117,21 +117,19 @@ %build # create build sub-directory - mkdir obj + %{l_shtool} mkdir -p obj cd obj # determine ld(1) and as(1) usage l_with_gnu_ld_as="" -%if "%{with_binutils}" == "yes" - l_with_gnu_ld_as="${l_with_gnu_ld_as} --with-gnu-ld --with-ld=%{l_prefix}/bin/ld" - l_with_gnu_ld_as="${l_with_gnu_ld_as} --with-gnu-as --with-as=%{l_prefix}/bin/as" -%else - case "%{l_platform -t}" in - *-linux* | *-freebsd* ) - l_with_gnu_ld_as="${l_with_gnu_ld_as} --with-gnu-as --with-gnu-ld" - ;; - esac -%endif + LD=%{l_tool_locate ld ld} + AS=%{l_tool_locate as as} + echo $LD | grep '^/' >/dev/null && l_with_gnu_ld_as="${l_with_gnu_ld_as} --with-ld=$LD" + echo $AS | grep '^/' >/dev/null && l_with_gnu_ld_as="${l_with_gnu_ld_as} --with-as=$AS" + $LD --version </dev/null 2>/dev/null | grep "^GNU ld " >/dev/null && l_with_gnu_ld_as="${l_with_gnu_ld_as} --with-gnu-ld" + $AS --version </dev/null 2>/dev/null | grep "^GNU assembler " >/dev/null && l_with_gnu_ld_as="${l_with_gnu_ld_as} --with-gnu-as" + unset LD + unset AS # determine threads usage %if "%{with_threads}" == "yes" @@ -140,11 +138,6 @@ l_enable_threads="single" %endif - # override threads setting for platforms with known limitations - case "%{l_platform -t}" in - *-netbsd1.6* ) l_enable_threads="single" ;; - esac - # determine language usage l_enable_languages="c" %if "%{with_cxx}" == "yes" @@ -207,17 +200,16 @@ l_ccisgcc=yes fi l_cflags="" + l_cxxflags="" l_boot_cflags="" l_libcflags="-g" l_libcxxflags="-g" - case "%{l_platform -t}" in - alpha*-tru64* ) if [ ".$l_ccisgcc" = .no ]; then l_libcflags="$l_libcflags -ieee"; fi ;; - esac -%if "%{with_binutils}" == "yes" # at least GNU as from GNU binutils supports -pipe always - l_boot_cflags="$l_boot_cflags -pipe" - l_libcxxflags="$l_libcxxflags -pipe" -%endif + AS="%{l_tool_locate as as}" + "$AS" --version </dev/null 2>/dev/null | grep "^GNU assembler " >/dev/null && { + l_boot_cflags="$l_boot_cflags -pipe" + l_libcxxflags="$l_libcxxflags -pipe" + } %if "%{with_optimize}" == "yes" # conservatively optimize the generated program code # (also _tune_ for particular CPUs, but _without_ requiring these CPUs!) @@ -244,12 +236,18 @@ maketarget="profiledbootstrap" fi %endif + case "%{l_platform -t}" in + amd64-* ) l_cflags="$l_cflags -fPIC"; l_cxxflags="$l_cxxflags -fPIC" ;; + ia64-* ) l_cflags="$l_cflags -fPIC"; l_cxxflags="$l_cxxflags -fPIC" ;; + sparc64-freebsd* ) l_cflags="$l_cflags -fPIC"; l_cxxflags="$l_cxxflags -fPIC" ;; + esac # build the package %{l_make} %{l_mflags} \ MAKE="%{l_make} %{l_mflags}" \ BOOT_CFLAGS="${l_boot_cflags}" \ CFLAGS="${l_cflags}" \ + CXXFLAGS="${l_cxxflags}" \ LIBCFLAGS="${l_libcflags}" \ LIBCXXFLAGS="${l_libcxxflags}" \ $maketarget @@ -267,17 +265,25 @@ # cleanup installation tree mv $RPM_BUILD_ROOT%{l_prefix}/lib/lib*.a \ - $RPM_BUILD_ROOT%{l_prefix}/lib/gcc%{V_comp}/${triple}/[0-9]*/ + $RPM_BUILD_ROOT%{l_prefix}/lib/gcc%{V_comp}/${triple}/[0-9]*/ \ + >/dev/null 2>&1 || true + mv $RPM_BUILD_ROOT%{l_prefix}/lib64/{lib*.a,*.spec} \ + $RPM_BUILD_ROOT%{l_prefix}/lib/gcc%{V_comp}/${triple}/[0-9]*/ \ + >/dev/null 2>&1 || true dirs="" for multilib in `$RPM_BUILD_ROOT%{l_prefix}/bin/gcc --print-multi-lib`; do subdir=`echo "$multilib" | sed -e 's/;.*$//'` [ ".$subdir" = .. ] && continue mv $RPM_BUILD_ROOT%{l_prefix}/lib/$subdir/lib*.a \ - $RPM_BUILD_ROOT%{l_prefix}/lib/gcc%{V_comp}/${triple}/[0-9]*/$subdir/ + $RPM_BUILD_ROOT%{l_prefix}/lib/gcc%{V_comp}/${triple}/[0-9]*/$subdir/ \ + >/dev/null 2>&1 || true + mv $RPM_BUILD_ROOT%{l_prefix}/lib64/$subdir/lib*.a \ + $RPM_BUILD_ROOT%{l_prefix}/lib/gcc%{V_comp}/${triple}/[0-9]*/$subdir/ \ + >/dev/null 2>&1 || true dirs="$dirs $subdir" done for subdir in $dirs; do - rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/$subdir + rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/$subdir >/dev/null 2>&1 || true done mv $RPM_BUILD_ROOT%{l_prefix}/${triple}/include/* \ $RPM_BUILD_ROOT%{l_prefix}/lib/gcc%{V_comp}/${triple}/[0-9]*/include/ \ @@ -289,6 +295,7 @@ rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/man7 >/dev/null 2>&1 || true rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/*.la >/dev/null 2>&1 || true rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/libgomp.spec >/dev/null 2>&1 || true + rm -f $RPM_BUILD_ROOT%{l_prefix}/lib64/*.la >/dev/null 2>&1 || true rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/*-gcc* >/dev/null 2>&1 || true %if "%{with_cxx}" == "yes" rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/*-c++ >/dev/null 2>&1 || true @@ . ______________________________________________________________________ OpenPKG http://openpkg.org CVS Repository Commit List openpkg-cvs@openpkg.org