]> git.ipfire.org Git - ipfire-3.x.git/blob - gcc/gcc.nm
json-c: Update to version 0.17-20230812
[ipfire-3.x.git] / gcc / gcc.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 # Configure build to compile with graphite
7 build_graphite = 1
8
9 name = gcc
10 version = 12.3.0
11 release = 1.1
12
13 maintainer = Michael Tremer <michael.tremer@ipfire.org>
14 groups = Development/Compilers
15 url = https://gcc.gnu.org/
16 license = GPLv3+ and GPLv2+ with exceptions
17 summary = Various compilers (C, C++, Objective-C, Java, ...).
18
19 description
20 The gcc package contains the GNU Compiler Collection. \
21 You'll need this package in order to compile C code.
22 end
23
24 # This is the at least required version of binutils.
25 binutils_version = 2.35
26
27 source_dl = https://ftp.gnu.org/gnu/gcc/%{thisapp}/
28 sources = %{thisapp}.tar.gz
29
30 build
31 requires
32 binutils >= %{binutils_version}
33 dejagnu
34 elfutils-devel
35 expect
36 filesystem >= 002
37 flex
38 glibc-devel >= 2.16
39 gmp-devel >= 4.3.2
40 isl-devel >= 0.15
41 libffi-devel
42 libmpc-devel >= 1.0.1
43 libxcrypt-devel
44 mpfr-devel >= 3.1.0
45 perl
46 texinfo
47 zlib-devel
48 zstd-devel
49 end
50
51 # If graphite support is enabled, we require the devel packages for build.
52 if "%{build_graphite}" == "1"
53 requires += isl-devel >= 0.14
54 end
55
56 # Build libquadmath (only on x86).
57 build_libquadmath = 0
58
59 # Build liblsan (only on x86_64).
60 build_liblsan = 0
61
62 # Build libtasn (only on x86_64).
63 build_libtsan = 0
64
65 # Build libubsan
66 build_libubsan = 0
67
68 DIR_BUILD = %{DIR_SRC}/gcc-build
69
70 if "%{DISTRO_ARCH}" == "x86_64"
71 build_libquadmath = 1
72 build_liblsan = 1
73 build_libtsan = 1
74 build_libubsan = 1
75 end
76
77 if "%{DISTRO_ARCH}" == "aarch64"
78 build_libubsan = 1
79 end
80
81 prepare_cmds
82 # Remove unneeded features that will save some compile time
83 rm -rf lib{gfortran,java,objc} gcc/{fortran,java,objc,objcp}
84
85 # Apply a sed substitution that will suppress the installation of
86 # libiberty.a. The version of libiberty.a provided by Binutils will be used
87 # instead:
88 sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
89
90 # Branding gcc
91 echo "%{DISTRO_NAME} %{version}-%{release}" > gcc/DEV-PHASE
92
93 # The fixincludes script is known to occasionally erroneously attempt to
94 # "fix" the system headers installed so far. As the headers up to this point
95 # are known to not require fixing, issue the following command to prevent
96 # the fixincludes script from running:
97 sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
98 end
99
100 # Disable LTO
101 LTO_CFLAGS =
102
103 # Disable any string format security checks
104 STRING_FORMAT_SECURITY_CFLAGS =
105
106 configure_options = \
107 CFLAGS="%{CFLAGS}" \
108 CXXFLAGS="%{CXXFLAGS}" \
109 XCFLAGS="%{CFLAGS}" \
110 TCFLAGS="%{CFLAGS}" \
111 --build=%{DISTRO_BUILDTARGET} \
112 --prefix=%{prefix} \
113 --libdir=%{libdir} \
114 --libexecdir=%{libdir} \
115 --mandir=%{mandir} \
116 --disable-static \
117 --enable-shared \
118 --enable-threads=posix \
119 --enable-__cxa_atexit \
120 --enable-languages=c,c++,lto \
121 --enable-bootstrap \
122 --with-build-config=bootstrap-lto \
123 --enable-link-serialization=1 \
124 --enable-checking=release \
125 --enable-default-pie \
126 --enable-default-ssp \
127 --disable-werror \
128 --disable-libssp \
129 --with-system-zlib \
130 --with-bugurl=https://bugzilla.ipfire.org/ \
131 --enable-libstdcxx-backtrace \
132 --disable-libstdcxx-pch \
133 --with-libstdcxx-zoneinfo=%{datadir}/zoneinfo \
134 --disable-libunwind-exceptions \
135 --enable-gnu-unique-object \
136 --enable-linker-build-id \
137 --with-linker-hash-style=gnu \
138 --enable-decimal-float \
139 --enable-plugin \
140 --enable-initfini-array \
141 --disable-libgcj \
142 --enable-gnu-indirect-function
143
144 if "%{build_graphite}" == "1"
145 configure_options += \
146 --with-isl
147 end
148
149 if "%{DISTRO_ARCH}" == "x86_64"
150 configure_options += \
151 --disable-multilib \
152 --with-arch_64=x86-64-v2 \
153 --enable-cet \
154 --with-tune=generic
155 end
156
157 make_build_targets += \
158 profiledbootstrap \
159 BOOT_CFLAGS="%{CFLAGS}" \
160 BOOT_LDFLAGS="%{LDFLAGS}" \
161 LDFLAGS_FOR_TARGET="%{LDFLAGS}"
162
163 #test
164 # cd %{DIR_SRC}/gcc-build && make -k check || true
165 # cd %{DIR_APP} && ./contrib/test_summary
166 #end
167
168 install
169 make install DESTDIR=%{BUILDROOT}
170
171 # Check if the installation path exists.
172 FULLPATH="%{BUILDROOT}%{libdir}/gcc/%{DISTRO_BUILDTARGET}/%{version}"
173 [ -d "${FULLPATH}" ] || exit 1
174
175 mkdir -pv %{BUILDROOT}%{prefix}/lib
176 ln -sfv ../bin/cpp %{BUILDROOT}%{prefix}/lib/cpp
177 ln -sfv gcc %{BUILDROOT}/usr/bin/cc
178
179 # Fix libgcc_s symlinks.
180 rm -f ${FULLPATH}/libgcc_s.so %{BUILDROOT}%{libdir}/libgcc_s.so
181 echo '/* GNU ld script
182 Use the shared library, but some functions are only in
183 the static library, so try that secondarily. */
184
185 OUTPUT_FORMAT('`gcc -Wl,--print-output-format -nostdlib -r -o /dev/null`')
186 GROUP ( /%{libdir}/libgcc_s.so.1 libgcc.a )' > ${FULLPATH}/libgcc_s.so
187 chmod -v 755 ${FULLPATH}/libgcc_s.so
188 chmod -v 755 %{BUILDROOT}%{libdir}/libgcc_s.so.1
189
190 # Remove some GNU debugger stuff.
191 rm -vf %{BUILDROOT}%{libdir}/lib*.py
192
193 # libgomp
194 mv -vf %{BUILDROOT}%{libdir}/libgomp.spec ${FULLPATH}/
195 ln -svf ../../../libgomp.so.1.0.0 ${FULLPATH}/libgomp.so
196 chmod -v 755 %{BUILDROOT}%{libdir}/libgomp.so.1.*
197
198 # libstdc++
199 ln -svf ../../../libstdc++.so.6.0.30 ${FULLPATH}/libstdc++.so
200
201 # libquadmath
202 if [ "%{build_libquadmath}" = "1" ]; then
203 ln -svf ../../../libquadmath.so.0.0.0 ${FULLPATH}/libquadmath.so
204 chmod -v 755 %{BUILDROOT}%{libdir}/libquadmath.so.0.*
205 fi
206
207 # libitm
208 mv -vf %{BUILDROOT}%{libdir}/libitm.spec ${FULLPATH}/
209 ln -svf ../../../libitm.so.1.0.0 ${FULLPATH}/libitm.so
210 chmod -v 755 %{BUILDROOT}%{libdir}/libitm.so.1.*
211
212 # liblsan
213 if [ "%{build_liblsan}" = "1" ]; then
214 ln -svf ../../../liblsan.so.0.0.0 ${FULLPATH}/liblsan.so
215 chmod -v 755 %{BUILDROOT}%{libdir}/liblsan.so.*
216 fi
217
218 # libtsan
219 if [ "%{build_libtsan}" = "1" ]; then
220 ln -svf ../../../libtsan.so.2.0.0 ${FULLPATH}/libtsan.so
221 chmod -v 755 %{BUILDROOT}%{libdir}/libtsan.so.*
222 fi
223
224 # libubsan
225 if [ "%{build_libubsan}" = "1" ]; then
226 ln -svf ../../../libubsan.so.1.0.0 ${FULLPATH}/libubsan.so
227 chmod -v 755 %{BUILDROOT}%{libdir}/libubsan.so.*
228 fi
229 end
230 end
231
232 packages
233 package %{name}
234 groups += Build
235
236 requires
237 binutils >= %{binutils_version}
238 filesystem >= 002
239 glibc >= 2.16
240 glibc-devel
241 gmp-devel
242 cpp = %{thisver}
243 libgcc = %{thisver}
244 libgomp = %{thisver}
245 end
246
247 # We do not ship libgcc-devel anymore.
248 provides += libgcc-devel = %{thisver}
249 obsoletes += libgcc-devel < %{thisver}
250 end
251
252 package %{name}-c++
253 summary = C++ support for GCC.
254 description
255 This package adds C++ support to the GNU Compiler Collection.
256 It includes support for most of the current C++ specification,
257 including templates and exception handling.
258 end
259
260 requires
261 gcc = %{thisver}
262 libstdc++ = %{thisver}
263 libstdc++-devel = %{thisver}
264 end
265
266 files
267 /usr/bin/*++
268 %{libdir}/gcc/*/*/cc1plus
269 /usr/share/man/man*/*++*
270 end
271 end
272
273 package cpp
274 summary = The C Preprocessor.
275 description
276 Cpp is the GNU C-Compatible Compiler Preprocessor.
277 Cpp is a macro processor which is used automatically
278 by the C compiler to transform your program before actual
279 compilation. It is called a macro processor because it allows
280 you to define macros, abbreviations for longer
281 constructs.
282
283 The C preprocessor provides four separate functionalities: the
284 inclusion of header files (files of declarations that can be
285 substituted into your program); macro expansion (you can define macros,
286 and the C preprocessor will replace the macros with their definitions
287 throughout the program); conditional compilation (using special
288 preprocessing directives, you can include or exclude parts of the
289 program according to various conditions); and line control (if you use
290 a program to combine or rearrange source files into an intermediate
291 file which is then compiled, you can use line control to inform the
292 compiler about where each source line originated).
293
294 You should install this package if you are a C programmer and you use
295 macros.
296 end
297 group = Development/Languages
298
299 files
300 %{prefix}/lib/cpp
301 %{bindir}/cpp
302 %{mandir}/man1/cpp.1*
303 %{libdir}/gcc/%{DISTRO_BUILDTARGET}/%{version}/cc1
304 end
305
306 provides = /lib/cpp
307 requires = gcc-c++ = %{thisver}
308 end
309
310 package libgcc
311 summary = GCC shared support library.
312 description
313 This package contains GCC shared support library which is needed
314 e.g. for exception handling support.
315 end
316
317 files
318 %{libdir}/libgcc*.so.*
319 end
320
321 obsoletes
322 libmudflap
323 libmudflap-devel
324 end
325 end
326
327 package libstdc++
328 summary = GNU Standard C++ Library.
329 description
330 The libstdc++ package contains a rewritten standard compliant GCC Standard
331 C++ Library.
332 end
333
334 files
335 %{libdir}/libstdc++*.so.*
336 end
337 end
338
339 package libstdc++-devel
340 summary = Header files and libraries for C++ development.
341 description
342 This is the GNU implementation of the standard C++ libraries. This
343 package includes the header files and libraries needed for C++
344 development. This includes rewritten implementation of STL.
345 end
346
347 requires
348 libstdc++ = %{thisver}
349 end
350
351 files
352 %{includedir}/c++
353 %{libdir}/libstdc++*.so
354 end
355 end
356
357 package libstdc++-static
358 summary = Static libraries for the GNU standard C++ library
359 description = %{summary}
360
361 requires
362 libstdc++-devel = %{thisver}
363 end
364
365 files
366 %{libdir}/gcc/%{DISTRO_BUILDTARGET}/%{version}/libstdc++.a
367 %{libdir}/gcc/%{DISTRO_BUILDTARGET}/%{version}/libsupc++.a
368 end
369 end
370
371 package libgomp
372 summary = GCC OpenMP v3.0 shared support library.
373 description
374 This package contains GCC shared support library which is needed
375 for OpenMP v3.0 support.
376 end
377
378 files
379 %{libdir}/libgomp*.so.*
380 end
381 end
382
383 if "%{build_libquadmath}" == "1"
384 package libquadmath
385 summary = GCC __float128 shared support library.
386 description
387 This package contains GCC shared support library which is needed
388 for __float128 math support and for Fortran REAL*16 support.
389 end
390
391 files
392 %{libdir}/libquadmath*.so.*
393 end
394 end
395
396 package libquadmath-devel
397 summary = Development files for GCC __float128 support.
398 description
399 This package contains headers for building Fortran programs using
400 REAL*16 and programs using __float128 math.
401 end
402
403 requires
404 gcc = %{thisver}
405 libquadmath = %{thisver}
406 end
407
408 files
409 %{libdir}/libquadmath.so
410 %{libdir}/gcc/%{DISTRO_BUILDTARGET}/%{version}/include/quadmath.h
411 %{libdir}/gcc/%{DISTRO_BUILDTARGET}/%{version}/include/quadmath_weak.h
412 %{libdir}/gcc/%{DISTRO_BUILDTARGET}/%{version}/libquadmath.so
413 end
414 end
415 end
416
417 package libitm
418 summary = The GNU Transactional Memory library.
419 description
420 This package contains the GNU Transactional Memory library
421 which is a GCC transactional memory support runtime library.
422 end
423
424 files
425 %{libdir}/libitm.so.*
426 end
427 end
428
429 package libitm-devel
430 summary = The GNU Transactional Memory support.
431 description
432 This package contains headers and support files for the
433 GNU Transactional Memory library.
434 end
435
436 requires
437 gcc = %{thisver}
438 libitm = %{thisver}
439 end
440
441 files
442 %{libdir}/libitm.so
443 %{libdir}/gcc/%{DISTRO_BUILDTARGET}/%{version}/include/itm.h
444 %{libdir}/gcc/%{DISTRO_BUILDTARGET}/%{version}/include/itm_weak.h
445 %{libdir}/gcc/%{DISTRO_BUILDTARGET}/%{version}/libitm.so
446 end
447 end
448
449 package libatomic
450 summary = The GNU Atomic library
451 description
452 This package contains the GNU Atomic library which is a
453 GCC support runtime library for atomisc operations not
454 supported by hardware.
455 end
456
457 files
458 %{libdir}/libatomic.so.*
459 end
460 end
461
462 package libasan
463 summary = The Address Sanitizer runtime library
464 description
465 This package contains the Address Sanitizer library
466 which is used for -fsanitize=address instrumented programs.
467 end
468
469 files
470 %{libdir}/libasan.so.*
471 end
472 end
473
474 if "%{build_libtsan}" == "1"
475 package libtsan
476 summary = The Thread Sanitizer runtime library
477 description
478 This package contains the Thread Sanitizer library
479 which is used for -fsanitize=thread instrumented programs.
480 end
481
482 files
483 %{libdir}/libtsan.so.*
484 end
485 end
486 end
487
488 if "%{build_libubsan}" == "1"
489 package libubsan
490 summary = The Undefined Behavior Sanitizer runtime library
491 description
492 This package contains the Undefined Behavior Sanitizer library
493 which is used for -fsanitize=undefined instrumented programs.
494 end
495
496 files
497 %{libdir}/libubsan.so.*
498 end
499 end
500 end
501
502 if "%{build_liblsan}" == "1"
503 package liblsan
504 summary = The Leak Sanitizer runtime library
505 description
506 This package contains the Leak Sanitizer library
507 which is used for -fsanitize=leak instrumented programs.
508 end
509
510 files
511 %{libdir}/liblsan.so.*
512 end
513 end
514 end
515
516 package gcc-plugin-devel
517 summary = Support for compiling GCC plugins.
518 description
519 This package contains header files and other support files
520 for compiling GCC plugins. The GCC plugin ABI is currently
521 not stable, so plugins must be rebuilt any time GCC is updated.
522 end
523
524 requires
525 gcc = %{thisver}
526 gmp-devel >= 4.1.2-8
527 mpfr-devel >= 2.2.1
528 libmpc-devel >= 0.8.1
529 end
530
531 files
532 %{libdir}/gcc/%{DISTRO_BUILDTARGET}/%{version}/plugin
533 end
534 end
535
536 package %{name}-debuginfo
537 template DEBUGINFO
538 end
539 end