From: <log...@us...> - 2013-02-24 07:58:04
|
Revision: 5283 http://pkgbuild.svn.sourceforge.net/pkgbuild/?rev=5283&view=rev Author: loganbruns Date: 2013-02-24 07:57:57 +0000 (Sun, 24 Feb 2013) Log Message: ----------- SFEgcc.spec: updated some of the patches for gcc 4.7. use gnu ld by default for gcc 4.7. updated %build_gcc_with_gnu_ld rules. use SFEbinutils-gpp if present. Modified Paths: -------------- spec-files-extra/trunk/ChangeLog spec-files-extra/trunk/SFEgcc.spec spec-files-extra/trunk/patches/gcc-05-LINK_LIBGCC_SPEC-47.diff Added Paths: ----------- spec-files-extra/trunk/patches/gcc-03-gnulib-47.diff Modified: spec-files-extra/trunk/ChangeLog =================================================================== --- spec-files-extra/trunk/ChangeLog 2013-02-24 07:57:33 UTC (rev 5282) +++ spec-files-extra/trunk/ChangeLog 2013-02-24 07:57:57 UTC (rev 5283) @@ -1,5 +1,11 @@ 2013-02-23 Logan O'Sullivan Bruns <lo...@ge...> + * SFEgcc.spec: updated some of the patches for gcc 4.7. use gnu ld + by default for gcc 4.7. updated %build_gcc_with_gnu_ld rules. use + SFEbinutils-gpp if present. + * patches/gcc-03-gnulib-47.diff + * patches/gcc-05-LINK_LIBGCC_SPEC-47.diff + * SFEbinutils-gpp.spec: added ips name 2013-02-21 Logan O'Sullivan Bruns <lo...@ge...> Modified: spec-files-extra/trunk/SFEgcc.spec =================================================================== --- spec-files-extra/trunk/SFEgcc.spec 2013-02-24 07:57:33 UTC (rev 5282) +++ spec-files-extra/trunk/SFEgcc.spec 2013-02-24 07:57:57 UTC (rev 5283) @@ -56,7 +56,7 @@ #default to SUNWbinutils ##TODO## if necessary add osbuild numbers to decide SUNW/SFE version %define SUNWbinutils %(/usr/bin/pkginfo -q SUNWbinutils 2>/dev/null && echo 1 || echo 0) -%define SFEbinutils %(/usr/bin/pkginfo -q SFEbinutils 2>/dev/null && echo 1 || echo 0) +%define SFEbinutils %(/usr/bin/pkginfo -q SFEbinutils-gpp 2>/dev/null && echo 1 || echo 0) #see below, older builds then 126 have too old gmp / mpfr to gcc version around 4.4.4 #%define SFEgmp %(/usr/bin/pkginfo -q SFEgmp 2>/dev/null && echo 1 || echo 0) ##TODO## to be replaced by packagenamemacros, selecting SFEgmp on specific osbuilds where @@ -115,7 +115,7 @@ #below *or* specify the number on the command line (gcc_version), example see below # To set a specific gcc version to be build, do this from *outside* -# pkgtool build SFEgcc --define 'gcc_version 4.6.1' +# pkgtool build SFEgcc --define 'gcc_version 4.7.2' %if %{!?gcc_version:1} #make version bump *here* - this is the default version being built @@ -159,7 +159,11 @@ Patch2: gcc-02-handle_pragma_pack_push_pop.diff %else %endif +%if %( expr %{major_minor} '>=' 4.7 ) +Patch3: gcc-03-gnulib-47.diff +%else Patch3: gcc-03-gnulib.diff +%endif #LINK_LIBGCC_SPEC #gcc-05 could be reworked to know both, amd64 and sparcv9 @@ -228,8 +232,8 @@ %endif %if %SFEbinutils -BuildRequires: SFEbinutils -Requires: SFEbinutils +BuildRequires: SFEbinutils-gpp +Requires: SFEbinutils-gpp %else BuildRequires: SUNWbinutils Requires: SUNWbinutils @@ -372,8 +376,41 @@ nlsopt=-disable-nls %endif +#%define build_gcc_with_gnu_ld 0 +#saw problems. 134 did compile, OI147 stopped with probably linker errors +##TODO## research which osbuild started to fail, adjust the number below +#%if %(expr %{osbuild} '>=' 1517) +%if %( expr %{major_minor} '>=' 4.7 ) +%define build_gcc_with_gnu_ld 1 +%else +%define build_gcc_with_gnu_ld 0 +%endif + +%if %build_gcc_with_gnu_ld + +%if %SFEbinutils +export LD="/usr/g++/bin/ld" +export PATH=/usr/g++/bin:$PATH +%else +export LD="/usr/gnu/bin/ld" +%endif +%define _ldflags +%define ld_options + +%else + +#avoid slipping in gnu ld +#might be changed to plain /usr/bin/ld instead of CBE ld-wrapper +#export LD=`which ld-wrapper` +#it's actually better to really specify /usr/bin/ld and skip the +#extra options from the wrapper instead of ending up on a system +#without the SFE build-env and have no ld-wrapper installed there +export LD=/usr/bin/ld %define ld_options -zignore -zcombreloc -Bdirect -i +%endif + + export CC=cc export CXX=CC export CONFIG_SHELL=/usr/bin/ksh @@ -382,11 +419,19 @@ export CPP="cc -E" export CFLAGS="-O" -export BOOT_CFLAGS="-Os -Xlinker -i %gcc_picflags %gnu_lib_path" -export BOOT_LDLAGS="%_ldflags -R%{_prefix}/%major_minor/lib %gnu_lib_path" +export BOOT_CFLAGS="-Os %gcc_picflags %gnu_lib_path" +%if %build_gcc_with_gnu_ld +%else +export BOOT_CFLAGS="$BOOT_CFLAGS -Xlinker -i" +%endif +export BOOT_LDFLAGS="%_ldflags -R%{_prefix}/lib %gnu_lib_path" # for target libraries (built with bootstrapped GCC) -export CFLAGS_FOR_TARGET="-O2 -Xlinker -i %gcc_picflags" +export CFLAGS_FOR_TARGET="-O2 %gcc_picflags" +%if %build_gcc_with_gnu_ld +%else +export CFLAGS_FOR_TARGET="$CFLAGS_FOR_TARGET -Xlinker -i" +%endif export LDFLAGS_FOR_TARGET="%_ldflags" export LDFLAGS="%_ldflags %gnu_lib_path" export LD_OPTIONS="%ld_options" @@ -394,32 +439,18 @@ # For pod2man export PATH="$PATH:/usr/perl5/bin" -%define build_gcc_with_gnu_ld 0 -#saw problems. 134 did compile, OI147 stopped with probably linker errors -##TODO## research which osbuild started to fail, adjust the number below -#%if %(expr %{osbuild} '>=' 146) -#%define build_gcc_with_gnu_ld 1 -#%endif -%if %build_gcc_with_gnu_ld -export LD="/usr/gnu/bin/ld" -%else -#avoid slipping in gnu ld -#might be changed to plain /usr/bin/ld instead of CBE ld-wrapper -#export LD=`which ld-wrapper` -#it's actually better to really specify /usr/bin/ld and skip the -#extra options from the wrapper instead of ending up on a system -#without the SFE build-env and have no ld-wrapper installed there -export LD=/usr/bin/ld -%endif - - ../gcc-%{version}/configure \ --prefix=%{_prefix} \ --libdir=%{_libdir} \ --libexecdir=%{_libexecdir} \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ +%if %SFEbinutils + --with-build-time-tools=/usr/g++ \ + --with-as=/usr/g++/bin/as \ + --with-gnu-as \ +%else %if %SUNWbinutils --with-build-time-tools=/usr/sfw \ --with-as=/usr/sfw/bin/gas \ @@ -428,6 +459,7 @@ --with-as=/usr/gnu/bin/as \ --with-gnu-as \ %endif +%endif %if %build_gcc_with_gnu_ld --with-ld=$LD \ --with-gnu-ld \ @@ -642,6 +674,11 @@ %endif %changelog +* Sat Feb 23 2013 - Logan Bruns <lo...@ge...> +- updated some of the patches for gcc 4.7 +- use gnu ld by default for gcc 4.7 +- updated %build_gcc_with_gnu_ld rules +- use SFEbinutils-gpp if present * Fri Jun 22 2012 - Thomas Wagner - back to CC=cc and CXX=CC as solarisstudio is still needed for SFE anyways. and that way we don't need gcc-3 installed generally. Maybe the wrong Added: spec-files-extra/trunk/patches/gcc-03-gnulib-47.diff =================================================================== --- spec-files-extra/trunk/patches/gcc-03-gnulib-47.diff (rev 0) +++ spec-files-extra/trunk/patches/gcc-03-gnulib-47.diff 2013-02-24 07:57:57 UTC (rev 5283) @@ -0,0 +1,11 @@ +--- gcc-4.7.2/gcc/config/sol2.h.orig 2013-02-21 19:34:57.818581004 -0800 ++++ gcc-4.7.2/gcc/config/sol2.h 2013-02-21 19:35:16.854139294 -0800 +@@ -150,7 +150,7 @@ + %{YP,*} \ + %{R*} \ + %{!YP,*:%{p|pg:-Y P,%R/usr/ccs/lib/libp:%R/usr/lib/libp:%R/usr/ccs/lib:%R/lib:%R/usr/lib} \ +- %{!p:%{!pg:-Y P,%R/usr/ccs/lib:%R/lib:%R/usr/lib}}}" ++ %{!p:%{!pg:-Y P,%R/usr/ccs/lib:%R/lib:%R/usr/lib:%R/usr/gnu/lib}}}" + + #undef LINK_ARCH32_SPEC + #define LINK_ARCH32_SPEC LINK_ARCH32_SPEC_BASE Modified: spec-files-extra/trunk/patches/gcc-05-LINK_LIBGCC_SPEC-47.diff =================================================================== --- spec-files-extra/trunk/patches/gcc-05-LINK_LIBGCC_SPEC-47.diff 2013-02-24 07:57:33 UTC (rev 5282) +++ spec-files-extra/trunk/patches/gcc-05-LINK_LIBGCC_SPEC-47.diff 2013-02-24 07:57:57 UTC (rev 5283) @@ -117,11 +117,11 @@ MD_EXEC_PREFIX is preparing to search for compiler tools (not already in use, except there would be other symlinks there, e.g. ln -s /usr/gcc/4.6/bin/gcc /usr/gcc/bin/gcc ---- gcc-4.7.x/gcc/config/i386/sol2-10.h.orig2 2011-09-04 00:00:00.000000000 +0200 -+++ gcc-4.7.x/gcc/config/i386/sol2-10.h 2011-09-04 00:00:00.000000000 +0200 -@@ -131,6 +131,13 @@ - #define LINK_ARCH_SPEC TARGET_LD_EMULATION \ - "%{m64:" LINK_ARCH64_SPEC "}%{!m64:" LINK_ARCH32_SPEC "}" +--- gcc-4.7.2/gcc/config/sol2.h.orig2 2013-02-21 19:49:01.189288339 -0800 ++++ gcc-4.7.2/gcc/config/sol2.h 2013-02-21 19:46:00.495173644 -0800 +@@ -117,6 +117,14 @@ + #undef MD_EXEC_PREFIX + #define MD_EXEC_PREFIX "/usr/ccs/bin/" +/* #undef LINK_LIBGCC_SPECIAL_1 */ +/* #define LINK_LIBGCC_SPECIAL_1=1 */ @@ -130,6 +130,7 @@ +#undef MD_EXEC_PREFIX +#define MD_EXEC_PREFIX "/usr/gcc/bin/" +#define LINK_ELIMINATE_DUPLICATE_LDIRECTORIES 0 - /* We do not need to search a special directory for startup files. */ ++ #undef MD_STARTFILE_PREFIX - + #define MD_STARTFILE_PREFIX "/usr/ccs/lib/" + #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |