Changeset 508
- Timestamp:
- Feb 1, 2015, 11:35:01 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
spec/trunk/SPECS/gcc4.spec
r370 r508 1 1 %define ver_major 4 2 %define ver_minor 73 %define ver_patch 32 %define ver_minor 9 3 %define ver_patch 2 4 4 5 5 %define os2_release 1 6 6 7 %define rpm_release 17 %define rpm_release 3 8 8 9 9 %global gcc_version %{ver_major}.%{ver_minor}.%{ver_patch} … … 30 30 URL: http://gcc.gnu.org 31 31 32 Source0: gcc-gcc-4_ 7-branch-os2.zip33 Patch0: gcc-os2.diff 32 Source0: gcc-gcc-4_9-branch-os2.tar.bz2 33 Source1: gcc-libgcc-fwd.zip 34 34 35 35 Obsoletes: gcc < %{gcc_version} … … 39 39 BuildRequires: ash gcc gcc-wlink gcc-wrc grep gettext-devel diffutils gawk flex sed 40 40 BuildRequires: gmp-devel >= 4.1.2-8, mpfr-devel >= 2.2.1, mpc-devel 41 42 Requires: libgcc%{ver_major}%{ver_minor}%{ver_patch} = %{version}-%{release} 41 BuildRequires: libc-devel >= 0.6.6-25 42 BuildRequires: rpm >= 4.8.1-22 43 44 Requires: libgcc1 = %{version}-%{release} 43 45 Requires: libssp = %{version}-%{release} 44 46 Requires: libstdc++6 = %{version}-%{release} 45 47 Requires: libsupc++6 = %{version}-%{release} 46 Requires: libc-devel >= 0.6.3 48 # libc header fixes 49 Requires: libc-devel >= 0.6.6-25 50 # rpm color workaround 51 Requires: rpm >= 4.8.1-22 47 52 Requires: binutils 48 53 … … 51 56 You'll need this package in order to compile C code. 52 57 53 %package -n libgcc %{ver_major}%{ver_minor}%{ver_patch}54 Summary: GCC version %{ver_major}.%{ver_minor} shared supportlibrary58 %package -n libgcc-fwd 59 Summary: GCC version shared support forwarder library 55 60 Group: System Environment/Libraries 56 61 Autoreq: false 57 58 %description -n libgcc%{ver_major}%{ver_minor}%{ver_patch} 62 Obsoletes: libgcc335 libgcc432 libgcc433 libgcc434 libgcc440 libgcc441 63 Obsoletes: libgcc442 libgcc444 libgcc445 libgcc446 libgcc452 libgcc453 64 Obsoletes: libgcc473 libgcc490 libgcc492 65 66 %description -n libgcc-fwd 67 This package contains GCC shared support forwarder library which is needed 68 e.g. for exception handling support. 69 70 %package -n libgcc1 71 Summary: GCC version 1 shared support library 72 Group: System Environment/Libraries 73 Autoreq: false 74 75 %description -n libgcc1 59 76 This package contains GCC shared support library which is needed 60 77 e.g. for exception handling support. … … 101 118 resource compiler instead of IBM one. 102 119 120 %package debug 121 Summary: HLL debug data for exception handling support. 122 123 %description debug 124 HLL debug data for exception handling support. 125 126 103 127 %prep 104 %setup -q -c 105 %patch0 -p1 -b .os2~ 128 %setup -q -c -a 1 129 106 130 107 131 %build … … 113 137 export PATH="$script_dir/gcc${PATH:+;$PATH}" 114 138 export BEGINLIBPATH="$script_dir/gcc${BEGINLIBPATH:+;$BEGINLIBPATH}" 115 116 export CONFIG_SHELL=%{_bindir}/sh.exe 139 export LIBPATHSTRICT=T 140 117 141 export CFLAGS="$RPM_OPT_FLAGS -DEMX -DOS2" 118 142 export CXXFLAGS="$RPM_OPT_FLAGS -DEMX -DOS2" … … 121 145 export GREP=grep 122 146 147 export PATH_SEPARATOR=; 148 export CONFIG_SITE=/@unixroot/usr/share/config.legacy 149 123 150 ../configure --prefix=%{_prefix} \ 124 151 --with-sysroot=/@unixroot \ 125 152 --enable-shared \ 126 153 --enable-languages=c,c++ \ 154 --enable-frame-pointer \ 127 155 --with-gnu-as \ 128 156 --disable-bootstrap \ … … 131 159 --enable-threads 132 160 133 make 134 # %{?_smp_mflags} 161 make %{?_smp_mflags} 135 162 136 163 137 164 %install 138 165 rm -rf $RPM_BUILD_ROOT 139 140 166 cd obj-%{gcc_target_platform} 141 167 … … 150 176 # copy runtime files 151 177 emxomf -o i386-pc-os2-emx/libgcc/libgcc_so_d.lib i386-pc-os2-emx/libgcc/libgcc_so_d.a 152 cp -p i386-pc-os2-emx/libgcc/libgcc_so_d.a %{buildroot}%{_libdir}153 cp -p i386-pc-os2-emx/libgcc/libgcc_so_d.lib %{buildroot}%{_libdir}154 cp -p i386-pc-os2-emx/libgcc/gcc%{ver_major}%{ver_minor}%{ver_patch}.dll %{buildroot}%{_libdir}178 #cp -p i386-pc-os2-emx/libgcc/libgcc_so_d.a %{buildroot}%{_libdir} 179 #cp -p i386-pc-os2-emx/libgcc/libgcc_so_d.lib %{buildroot}%{_libdir} 180 #cp -p i386-pc-os2-emx/libgcc/gcc%{ver_major}%{ver_minor}%{ver_patch}.dll %{buildroot}%{_libdir} 155 181 156 182 #build dll 157 183 dllar -o stdcpp6.dll i386-pc-os2-emx/libstdc++-v3/src/.libs/libstdc++.a \ 158 -d "GNU stdc++ %{ gcc_version}" \184 -d "GNU stdc++ %{version}-%{release}" \ 159 185 -nolxlite -flags "-Zmap -Zhigh-mem -Zomf -g -L%{buildroot}%{_libdir}" \ 160 186 -ex "___main ___do_global_* ___ctordtor* ___eh* ___pop* _DLL_InitTerm" \ … … 168 194 #build dll 169 195 dllar -o supcpp6.dll i386-pc-os2-emx/libstdc++-v3/libsupc++/.libs/libsupc++.a \ 170 -d "GNU supc++ %{ gcc_version}" \196 -d "GNU supc++ %{version}-%{release}" \ 171 197 -nolxlite -flags "-Zmap -Zhigh-mem -Zomf -g -L%{buildroot}%{_libdir}" \ 172 198 -ex "___main ___do_global_* ___ctordtor* ___eh* ___pop* _DLL_InitTerm" \ … … 180 206 #build dll 181 207 dllar -o ssp.dll i386-pc-os2-emx/libssp/.libs/ssp.a \ 182 -d "GNU Stack Protector %{ gcc_version}" \208 -d "GNU Stack Protector %{version}-%{release}" \ 183 209 -nolxlite -flags "-Zmap -Zhigh-mem -Zomf -g -L%{buildroot}%{_libdir}" \ 184 210 -ex "___main ___do_global_* ___ctordtor* ___eh* ___pop* _DLL_InitTerm" \ … … 192 218 cd .. 193 219 220 #build gccXXX forwarders 221 for bld in 335 432 433 434 435 440 441 442 444 445 446 452 453 454 464 473 474 482 483 490 491 492; do 222 sed -i 's/Forwarder/Forwarder %{version}-%{release}/' gcc${bld}.def 223 gcc -Zomf -Zmap -Zdll -nostdlib -o gcc${bld}.dll gcc${bld}.def fwdstub.s obj-%{gcc_target_platform}/gcc/libgcc_so_d.a -llibc 224 cp -p gcc${bld}.dll %{buildroot}%{_libdir} 225 done 226 194 227 echo dummy for virtual package > gcc-wrc.txt 195 228 echo dummy for virtual package > gcc-wlink.txt … … 244 277 %defattr(-,root,root,-) 245 278 %{_usr}/bin 279 %exclude %{_bindir}/*.dbg 246 280 %{_usr}/include 247 281 %{_libdir}/*.*a 248 282 %{_libdir}/*.lib 249 283 %exclude %{_libdir}/*.dll 250 % {_libdir}/*.spec284 %exclude %{_libdir}/*.dbg 251 285 %{_libdir}/gcc/* 252 %{_usr}/libexec 253 %{_usr}/share 286 %{_libexecdir} 287 %exclude %{_libexecdir}/gcc/i386-pc-os2-emx/%{gcc_version}/*.dbg 288 %exclude %{_libexecdir}/gcc/i386-pc-os2-emx/%{gcc_version}/install-tools/*.dbg 289 %{_datadir}/gcc-%{gcc_version} 290 %{_datadir}/locale 291 %{_datadir}/info 292 %{_datadir}/man 254 293 %doc ChangeLog ChangeLog.* 255 294 %doc README README.* … … 275 314 %doc gcc-wrc.txt 276 315 277 %files -n libgcc%{ver_major}%{ver_minor}%{ver_patch} 278 %defattr(-,root,root,-) 279 %{_libdir}/gcc%{ver_major}%{ver_minor}%{ver_patch}.dll 280 316 %files -n libgcc-fwd 317 %defattr(-,root,root,-) 318 %{_libdir}/gcc???.dll 319 320 %files -n libgcc1 321 %defattr(-,root,root,-) 322 %{_libdir}/gcc1.dll 323 324 %files debug 325 %defattr(-,root,root) 326 %{_bindir}/*.dbg 327 %{_libdir}/*.dbg 328 %{_libexecdir}/gcc/i386-pc-os2-emx/%{gcc_version}/*.dbg 329 %{_libexecdir}/gcc/i386-pc-os2-emx/%{gcc_version}/install-tools/*.dbg 281 330 282 331 %changelog 332 * Tue Jan 30 2015 yd <yd@os2power.com> 4.9.2.1-3 333 - updated source code to gcc 4.9.2. 334 - create gccXXX forwarders to gcc1 runtime dll, use libc06 exports for 335 non-standard symbols. 336 - use --enable-frame-pointer to disable unwinding table generation. 337 - build requires patched builtin.h and stddef.h (libc-0.6.6-25). 338 - use standard toolchain to build gcc runtime dll, use named exports only. 339 283 340 * Wed Nov 27 2013 yd 284 341 - Rename the following packages to avoid ABI breaks (using gcc versioning policy):
Note:
See TracChangeset
for help on using the changeset viewer.