gcc/gcc.spec

changeset 335
6eb79a12ee37
parent 334
4a34d7a82eab
child 337
f71e028eb3e2
equal deleted inserted replaced
5:c88e40e191ef 6:0e0b4b2a3b6e
34 Distribution: OpenPKG Community 34 Distribution: OpenPKG Community
35 Class: CORE 35 Class: CORE
36 Group: Compiler 36 Group: Compiler
37 License: GPL 37 License: GPL
38 Version: %{V_full} 38 Version: %{V_full}
39 Release: 20110320 39 Release: 20110330
40 40
41 # package options 41 # package options
42 %option with_binutils yes 42 %option with_binutils yes
43 %option with_cxx yes 43 %option with_cxx yes
44 %option with_objc no 44 %option with_objc no
47 %option with_optimize yes 47 %option with_optimize yes
48 %option with_profile no 48 %option with_profile no
49 %option with_threads yes 49 %option with_threads yes
50 %option with_multilib no 50 %option with_multilib no
51 51
52 # fix intermodule dependencies implicitly
53 %if "%{with_java}" == "yes"
54 %define with_cxx yes
55 %define with_threads yes
56 %endif
57
52 # list of sources 58 # list of sources
53 Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{V_full}/gcc-core-%{V_full}.tar.bz2 59 Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{V_full}/gcc-core-%{V_full}.tar.bz2
54 Source1: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{V_full}/gcc-g++-%{V_full}.tar.bz2 60 Source1: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{V_full}/gcc-g++-%{V_full}.tar.bz2
55 Source2: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{V_full}/gcc-objc-%{V_full}.tar.bz2 61 Source2: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{V_full}/gcc-objc-%{V_full}.tar.bz2
56 Source3: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{V_full}/gcc-java-%{V_full}.tar.bz2 62 Source3: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{V_full}/gcc-java-%{V_full}.tar.bz2
71 %if "%{with_cxx}" == "yes" 77 %if "%{with_cxx}" == "yes"
72 BuildPreReq: libiconv 78 BuildPreReq: libiconv
73 PreReq: libiconv 79 PreReq: libiconv
74 %endif 80 %endif
75 %if "%{with_java}" == "yes" 81 %if "%{with_java}" == "yes"
76 BuildPreReq: zlib 82 BuildPreReq: zlib, infozip
77 PreReq: zlib 83 PreReq: zlib
78 %endif 84 %endif
79 AutoReq: no 85 AutoReq: no
80 AutoReqProv: no 86 AutoReqProv: no
81 87
113 ltmain.sh 119 ltmain.sh
114 %{l_shtool} subst -v -s \ 120 %{l_shtool} subst -v -s \
115 -e 's;\(gmplibs="-lmpc\) \(-lmpfr -lgmp\);\1 -lm \2;' \ 121 -e 's;\(gmplibs="-lmpc\) \(-lmpfr -lgmp\);\1 -lm \2;' \
116 configure 122 configure
117 %{l_shtool} subst -v -s \ 123 %{l_shtool} subst -v -s \
124 -e 's;\(LDEXP_LIB=\)"$LIBS";\1"$LDFLAGS";' \
118 -e 's;PREFIX_INCLUDE_DIR;PREFIX_INCLUDE_DIR_DISABLED;g' \ 125 -e 's;PREFIX_INCLUDE_DIR;PREFIX_INCLUDE_DIR_DISABLED;g' \
119 gcc/configure 126 gcc/configure
120 %{l_shtool} subst \ 127 %{l_shtool} subst \
121 -e 's;[ \t]*-W[a-zA-Z0-9_\-][a-zA-Z0-9_\-]*,*;;g' \ 128 -e 's;[ \t]*-W[a-zA-Z0-9_\-][a-zA-Z0-9_\-]*,*;;g' \
122 lto-plugin/Makefile.in 129 lto-plugin/Makefile.in
202 # configure the package 209 # configure the package
203 LD="$LD" \ 210 LD="$LD" \
204 AS="$AS" \ 211 AS="$AS" \
205 CC="%{l_cc}" \ 212 CC="%{l_cc}" \
206 CFLAGS="%{l_cflags}" \ 213 CFLAGS="%{l_cflags}" \
207 %if "%{with_java}" == "yes" || "%{with_fortran}" == "yes" || "%{with_cxx}" == "yes" 214 %if "%{with_cxx}" == "yes"
208 CPPFLAGS="%{l_cppflags}" \ 215 CPPFLAGS="%{l_cppflags}" \
209 LDFLAGS="%{l_ldflags}" \ 216 LDFLAGS="%{l_ldflags}" \
210 %endif 217 %endif
211 CONFIG_SHELL="%{l_bash}" \ 218 CONFIG_SHELL="%{l_bash}" \
212 GREP="%{l_bash}" \ 219 GREP="%{l_bash}" \
305 # don't optimize at all to avoid problems 312 # don't optimize at all to avoid problems
306 l_boot_cflags="$l_boot_cflags -O0" 313 l_boot_cflags="$l_boot_cflags -O0"
307 l_libcxxflags="$l_libcxxflags -O0" 314 l_libcxxflags="$l_libcxxflags -O0"
308 %endif 315 %endif
309 %if "%{with_profile}" == "yes" 316 %if "%{with_profile}" == "yes"
317 # generate profile feedback
310 maketarget="profiledbootstrap" 318 maketarget="profiledbootstrap"
311 loc_makeflags="%{l_mflags}" 319 loc_makeflags="%{l_mflags}"
320
321 # warn about exceptional build duration for profile feedback
322 ( echo "Building profile feedback on some hosts can take many days to complete!"
323 echo "Now continuing to build a profiled bootstrap with parallel make logic"
324 echo "disabled according to profiling requirements..."
325 ) | %{l_rpmtool} msg -b -t warn
326
327 # warn about profiled bootstrap requirement of 64-bit arithmetic
312 if [ ".$l_ccisgcc" != .yes ]; then 328 if [ ".$l_ccisgcc" != .yes ]; then
313 ( echo "A preinstalled GCC is recommended when bootstrapping a profiled GCC. If the" 329 ( echo "A preinstalled GCC was not detected although one is recommended for"
314 echo "compiler used to bootstrap GCC doesn't support 64-bit arithmetic, then" 330 echo "building a profiled bootstrap. Buildtime or runtime errors can occur if"
315 echo "either runtime or buildtime errors could occur. Regardless of this," 331 echo "the compiler used to build profile feedback doesn't support 64-bit math."
316 echo "parallel make logic is disabled according to profiling requirements."
317 echo "" 332 echo ""
318 echo "If in doubt, stop now and start the build again with profiling disabled." 333 echo "If in doubt, stop now and start the build again with profiling disabled."
319 ) | %{l_rpmtool} msg -b -t warn 334 ) | %{l_rpmtool} msg -b -t warn
320 fi 335 fi
321 %else 336 %else
337 # build in three stages
322 maketarget="bootstrap" 338 maketarget="bootstrap"
323 loc_makeflags="%{l_mflags -O}" 339 loc_makeflags="%{l_mflags -O}"
324 %endif 340 %endif
325 case "%{l_platform -t}" in 341 case "%{l_platform -t}" in
326 *64-* ) l_cflags="$l_cflags -fPIC"; l_cxxflags="$l_cxxflags -fPIC" ;; 342 *64-* ) l_cflags="$l_cflags -fPIC"; l_cxxflags="$l_cxxflags -fPIC" ;;
327 esac 343 esac
328 %if "%{with_java}" == "yes" || "%{with_fortran}" == "yes" || "%{with_cxx}" == "yes" 344 %if "%{with_cxx}" == "yes"
329 l_cflags="$l_cflags %{l_cppflags}" 345 l_cflags="$l_cflags %{l_cppflags}"
330 l_cxxflags="$l_cxxflags %{l_cppflags}" 346 l_cxxflags="$l_cxxflags %{l_cppflags}"
331 l_libcflags="$l_libcflags %{l_cppflags}" 347 l_libcflags="$l_libcflags %{l_cppflags}"
332 l_libcxxflags="$l_libcxxflags %{l_cppflags}" 348 l_libcxxflags="$l_libcxxflags %{l_cppflags}"
333 %endif 349 %endif
338 GREP="grep" \ 354 GREP="grep" \
339 MAKE="%{l_make} ${loc_makeflags}" \ 355 MAKE="%{l_make} ${loc_makeflags}" \
340 BOOT_CFLAGS="${l_boot_cflags}" \ 356 BOOT_CFLAGS="${l_boot_cflags}" \
341 CFLAGS="${l_cflags}" \ 357 CFLAGS="${l_cflags}" \
342 CXXFLAGS="${l_cxxflags}" \ 358 CXXFLAGS="${l_cxxflags}" \
359 %if "%{with_cxx}" == "yes"
360 CPPFLAGS="%{l_cppflags}" \
361 LDFLAGS="%{l_ldflags}" \
362 BOOT_LDFLAGS="%{l_ldflags}" \
363 %endif
343 LIBCFLAGS="${l_libcflags}" \ 364 LIBCFLAGS="${l_libcflags}" \
344 LIBCXXFLAGS="${l_libcxxflags}" \ 365 LIBCXXFLAGS="${l_libcxxflags}" \
345 $maketarget 366 $maketarget
346 367
347 %install 368 %install

mercurial