Compare commits
26 Commits
cbc401024e
...
a22a7f7f09
Author | SHA1 | Date | |
---|---|---|---|
a22a7f7f09 | |||
965b2d4f0f | |||
|
f447520e2d | ||
|
d9c3154737 | ||
|
246107d5f6 | ||
|
7692bbaf45 | ||
|
24244c4ac2 | ||
|
77c5fc5b62 | ||
|
0f50409ae6 | ||
|
c4c1f3b8d4 | ||
|
76bd9dd983 | ||
|
dff3d6a440 | ||
|
2f741f9841 | ||
|
ee3d1273d6 | ||
|
16122a6127 | ||
|
4d945d4291 | ||
|
9fb7ec9c17 | ||
|
e0e0971163 | ||
|
e64c3b8273 | ||
|
99fec12998 | ||
|
d9236d19eb | ||
|
c82a365885 | ||
|
1988722cbb | ||
|
ab1e005d6a | ||
|
29a0bd8be0 | ||
|
26c1ceaece |
@ -36,9 +36,7 @@ Individual build flags are also available through RPM macros:
|
|||||||
* `%{build_cxx}` for the command name of the C++ compiler.
|
* `%{build_cxx}` for the command name of the C++ compiler.
|
||||||
* `%{build_cpp}` for the command name of the C-compatible preprocessor.
|
* `%{build_cpp}` for the command name of the C-compatible preprocessor.
|
||||||
* `%{build_cflags}` for the C compiler flags (also known as the
|
* `%{build_cflags}` for the C compiler flags (also known as the
|
||||||
`CFLAGS` variable). Also historically available as `%{optflags}`.
|
`CFLAGS` variable).
|
||||||
Furthermore, at the start of the `%build` section, the environment
|
|
||||||
variable `RPM_OPT_FLAGS` is set to this value.
|
|
||||||
* `%{build_cxxflags}` for the C++ compiler flags (usually assigned to
|
* `%{build_cxxflags}` for the C++ compiler flags (usually assigned to
|
||||||
the `CXXFLAGS` shell variable).
|
the `CXXFLAGS` shell variable).
|
||||||
* `%{build_fflags}` for `FFLAGS` (the Fortran compiler flags, also
|
* `%{build_fflags}` for `FFLAGS` (the Fortran compiler flags, also
|
||||||
@ -50,6 +48,13 @@ Individual build flags are also available through RPM macros:
|
|||||||
driver. At the start of the `%build` section, the environment
|
driver. At the start of the `%build` section, the environment
|
||||||
variable `RPM_LD_FLAGS` is set to this value.
|
variable `RPM_LD_FLAGS` is set to this value.
|
||||||
|
|
||||||
|
The C and C++ compiler flags are historically available as the
|
||||||
|
`%{optflags}` macro. These flags may not contain flags that work with
|
||||||
|
certain languagues or compiler front ends, so the language-specific
|
||||||
|
`%build_*` are more precise. At the start of the `%build` section,
|
||||||
|
the environment variable `RPM_OPT_FLAGS` is set to the `%{optflags}`
|
||||||
|
value; similar limitations apply.
|
||||||
|
|
||||||
The variable `LT_SYS_LIBRARY_PATH` is defined here to prevent the `libtool`
|
The variable `LT_SYS_LIBRARY_PATH` is defined here to prevent the `libtool`
|
||||||
script (v2.4.6+) from hardcoding `%_libdir` into the binaries' `RPATH`.
|
script (v2.4.6+) from hardcoding `%_libdir` into the binaries' `RPATH`.
|
||||||
|
|
||||||
@ -109,6 +114,55 @@ or:
|
|||||||
BuildRequires: clang compiler-rt
|
BuildRequires: clang compiler-rt
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
### Controlling Type Safety
|
||||||
|
|
||||||
|
The macro `%build_type_safety_c` can be set to change the C type
|
||||||
|
safety level. By default (value 0), all C constructs that GCC accepts
|
||||||
|
for backwards compatibility with obsolete language standards are
|
||||||
|
accepted during package builds. Packages can set
|
||||||
|
`%build_type_safety_c` to higher values to adopt future
|
||||||
|
distribution-wide type-safety increases early.
|
||||||
|
|
||||||
|
When changing the `%build_type_safety_c` level to increase it, spec
|
||||||
|
file should use a construct like this to avoid *lowering* a future
|
||||||
|
default:
|
||||||
|
|
||||||
|
```
|
||||||
|
%if %build_type_safety_c < 2
|
||||||
|
%global %build_type_safety_c 2
|
||||||
|
%endif
|
||||||
|
```
|
||||||
|
|
||||||
|
At level 1, the following additional error categories are enabled:
|
||||||
|
|
||||||
|
* `-Werror=implicit-int`: Reject declarations and definitions that
|
||||||
|
omit a type name where one is required. Examples are:
|
||||||
|
`extern int_variable;`, `extern int_returning_function (void);`,
|
||||||
|
and missing separate parameter type declarations in old-style
|
||||||
|
function definitions.
|
||||||
|
* `-Werror=implicit-function-declaration`: Reject calls to functions
|
||||||
|
to undeclared functions such as `function_not_defined_anywhere ()`.
|
||||||
|
Previously, such expressions where we compiled as if a declaration
|
||||||
|
`extern int function_not_defined_anywhere ();` (a prototype-less
|
||||||
|
function declaration) were in scope.
|
||||||
|
|
||||||
|
At level 2, the following error category is enabled in addition:
|
||||||
|
|
||||||
|
* `-Werror=int-conversion`: Reject the use of integer expressions
|
||||||
|
where a pointer type expected, and pointer expressions where an
|
||||||
|
integer type is expected. Without this option, GCC may produce an
|
||||||
|
executable, but often, there are failures at run time because not
|
||||||
|
the full 64 bits of pointers are preserved.
|
||||||
|
|
||||||
|
The additional level 3 error category is:
|
||||||
|
|
||||||
|
* `-Werror=incompatible-pointer-types`: An expression of one pointer
|
||||||
|
type is used where different pointer type is expected. (This does
|
||||||
|
not cover signed/unsigned mismatches in the pointer target type.)
|
||||||
|
|
||||||
|
Clang errors out on more obsolete and invalid C constructs than C, so
|
||||||
|
the type safety is higher by default than with the GCC toolchain.
|
||||||
|
|
||||||
### Disable autotools compatibility patching
|
### Disable autotools compatibility patching
|
||||||
|
|
||||||
By default, the invocation of the `%configure` macro replaces
|
By default, the invocation of the `%configure` macro replaces
|
||||||
@ -402,12 +456,16 @@ The general (architecture-independent) build flags are:
|
|||||||
compilation performance. (This does not affect code generation.)
|
compilation performance. (This does not affect code generation.)
|
||||||
* `-Wall`: Turn on various GCC warnings.
|
* `-Wall`: Turn on various GCC warnings.
|
||||||
See the [GCC manual](https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wall).
|
See the [GCC manual](https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wall).
|
||||||
|
* `-Wno-complain-wrong-lang`: Do not warn about front end mismatches
|
||||||
|
(e.g, using `-Werror=format-security` with Fortran). Only included
|
||||||
|
in `%optflags`, and not the front-end-specific `%build_*` macros.
|
||||||
* `-Werror=format-security`: Turn on format string warnings and treat
|
* `-Werror=format-security`: Turn on format string warnings and treat
|
||||||
them as errors.
|
them as errors.
|
||||||
See the [GCC manual](https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wformat-security).
|
See the [GCC manual](https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wformat-security).
|
||||||
This can occasionally result in compilation errors. In that case,
|
This can occasionally result in compilation errors. In that case,
|
||||||
the best option is to rewrite the source code so that only constant
|
the best option is to rewrite the source code so that only constant
|
||||||
format strings (string literals) are used.
|
format strings (string literals) are used.
|
||||||
|
* Other `-Werror=` options. See **Controlling C Type Safety**.
|
||||||
* `-U_FORTIFY_SOURCE, -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=3`:
|
* `-U_FORTIFY_SOURCE, -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=3`:
|
||||||
See the Source Fortification section above and the `%_fortify_level`
|
See the Source Fortification section above and the `%_fortify_level`
|
||||||
override.
|
override.
|
||||||
|
28
config.guess
vendored
28
config.guess
vendored
@ -1,10 +1,10 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Attempt to guess a canonical system name.
|
# Attempt to guess a canonical system name.
|
||||||
# Copyright 1992-2022 Free Software Foundation, Inc.
|
# Copyright 1992-2023 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# shellcheck disable=SC2006,SC2268 # see below for rationale
|
# shellcheck disable=SC2006,SC2268 # see below for rationale
|
||||||
|
|
||||||
timestamp='2022-05-25'
|
timestamp='2023-06-23'
|
||||||
|
|
||||||
# This file is free software; you can redistribute it and/or modify it
|
# This file is free software; you can redistribute it and/or modify it
|
||||||
# under the terms of the GNU General Public License as published by
|
# under the terms of the GNU General Public License as published by
|
||||||
@ -47,7 +47,7 @@ me=`echo "$0" | sed -e 's,.*/,,'`
|
|||||||
usage="\
|
usage="\
|
||||||
Usage: $0 [OPTION]
|
Usage: $0 [OPTION]
|
||||||
|
|
||||||
Output the configuration name of the system \`$me' is run on.
|
Output the configuration name of the system '$me' is run on.
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
-h, --help print this help, then exit
|
-h, --help print this help, then exit
|
||||||
@ -60,13 +60,13 @@ version="\
|
|||||||
GNU config.guess ($timestamp)
|
GNU config.guess ($timestamp)
|
||||||
|
|
||||||
Originally written by Per Bothner.
|
Originally written by Per Bothner.
|
||||||
Copyright 1992-2022 Free Software Foundation, Inc.
|
Copyright 1992-2023 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This is free software; see the source for copying conditions. There is NO
|
This is free software; see the source for copying conditions. There is NO
|
||||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||||
|
|
||||||
help="
|
help="
|
||||||
Try \`$me --help' for more information."
|
Try '$me --help' for more information."
|
||||||
|
|
||||||
# Parse command line
|
# Parse command line
|
||||||
while test $# -gt 0 ; do
|
while test $# -gt 0 ; do
|
||||||
@ -102,8 +102,8 @@ GUESS=
|
|||||||
# temporary files to be created and, as you can see below, it is a
|
# temporary files to be created and, as you can see below, it is a
|
||||||
# headache to deal with in a portable fashion.
|
# headache to deal with in a portable fashion.
|
||||||
|
|
||||||
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
|
# Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still
|
||||||
# use `HOST_CC' if defined, but it is deprecated.
|
# use 'HOST_CC' if defined, but it is deprecated.
|
||||||
|
|
||||||
# Portable tmp directory creation inspired by the Autoconf team.
|
# Portable tmp directory creation inspired by the Autoconf team.
|
||||||
|
|
||||||
@ -459,7 +459,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
|
|||||||
UNAME_RELEASE=`uname -v`
|
UNAME_RELEASE=`uname -v`
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
# Japanese Language versions have a version number like `4.1.3-JL'.
|
# Japanese Language versions have a version number like '4.1.3-JL'.
|
||||||
SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
|
SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
|
||||||
GUESS=sparc-sun-sunos$SUN_REL
|
GUESS=sparc-sun-sunos$SUN_REL
|
||||||
;;
|
;;
|
||||||
@ -966,6 +966,12 @@ EOF
|
|||||||
GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
|
GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
|
||||||
GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
|
GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
|
||||||
;;
|
;;
|
||||||
|
x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*)
|
||||||
|
GUESS="$UNAME_MACHINE-pc-managarm-mlibc"
|
||||||
|
;;
|
||||||
|
*:[Mm]anagarm:*:*)
|
||||||
|
GUESS="$UNAME_MACHINE-unknown-managarm-mlibc"
|
||||||
|
;;
|
||||||
*:Minix:*:*)
|
*:Minix:*:*)
|
||||||
GUESS=$UNAME_MACHINE-unknown-minix
|
GUESS=$UNAME_MACHINE-unknown-minix
|
||||||
;;
|
;;
|
||||||
@ -1036,7 +1042,7 @@ EOF
|
|||||||
k1om:Linux:*:*)
|
k1om:Linux:*:*)
|
||||||
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
||||||
;;
|
;;
|
||||||
loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
|
loongarch32:Linux:*:* | loongarch64:Linux:*:*)
|
||||||
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
||||||
;;
|
;;
|
||||||
m32r*:Linux:*:*)
|
m32r*:Linux:*:*)
|
||||||
@ -1191,7 +1197,7 @@ EOF
|
|||||||
GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
|
GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
|
||||||
;;
|
;;
|
||||||
i*86:OS/2:*:*)
|
i*86:OS/2:*:*)
|
||||||
# If we were able to find `uname', then EMX Unix compatibility
|
# If we were able to find 'uname', then EMX Unix compatibility
|
||||||
# is probably installed.
|
# is probably installed.
|
||||||
GUESS=$UNAME_MACHINE-pc-os2-emx
|
GUESS=$UNAME_MACHINE-pc-os2-emx
|
||||||
;;
|
;;
|
||||||
@ -1332,7 +1338,7 @@ EOF
|
|||||||
GUESS=ns32k-sni-sysv
|
GUESS=ns32k-sni-sysv
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
|
PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort
|
||||||
# says <Richard.M.Bartel@ccMail.Census.GOV>
|
# says <Richard.M.Bartel@ccMail.Census.GOV>
|
||||||
GUESS=i586-unisys-sysv4
|
GUESS=i586-unisys-sysv4
|
||||||
;;
|
;;
|
||||||
|
49
config.sub
vendored
49
config.sub
vendored
@ -1,10 +1,10 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Configuration validation subroutine script.
|
# Configuration validation subroutine script.
|
||||||
# Copyright 1992-2022 Free Software Foundation, Inc.
|
# Copyright 1992-2023 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# shellcheck disable=SC2006,SC2268 # see below for rationale
|
# shellcheck disable=SC2006,SC2268 # see below for rationale
|
||||||
|
|
||||||
timestamp='2022-01-03'
|
timestamp='2023-06-23'
|
||||||
|
|
||||||
# This file is free software; you can redistribute it and/or modify it
|
# This file is free software; you can redistribute it and/or modify it
|
||||||
# under the terms of the GNU General Public License as published by
|
# under the terms of the GNU General Public License as published by
|
||||||
@ -76,13 +76,13 @@ Report bugs and patches to <config-patches@gnu.org>."
|
|||||||
version="\
|
version="\
|
||||||
GNU config.sub ($timestamp)
|
GNU config.sub ($timestamp)
|
||||||
|
|
||||||
Copyright 1992-2022 Free Software Foundation, Inc.
|
Copyright 1992-2023 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This is free software; see the source for copying conditions. There is NO
|
This is free software; see the source for copying conditions. There is NO
|
||||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||||
|
|
||||||
help="
|
help="
|
||||||
Try \`$me --help' for more information."
|
Try '$me --help' for more information."
|
||||||
|
|
||||||
# Parse command line
|
# Parse command line
|
||||||
while test $# -gt 0 ; do
|
while test $# -gt 0 ; do
|
||||||
@ -130,7 +130,7 @@ IFS=$saved_IFS
|
|||||||
# Separate into logical components for further validation
|
# Separate into logical components for further validation
|
||||||
case $1 in
|
case $1 in
|
||||||
*-*-*-*-*)
|
*-*-*-*-*)
|
||||||
echo Invalid configuration \`"$1"\': more than four components >&2
|
echo "Invalid configuration '$1': more than four components" >&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
*-*-*-*)
|
*-*-*-*)
|
||||||
@ -145,7 +145,7 @@ case $1 in
|
|||||||
nto-qnx* | linux-* | uclinux-uclibc* \
|
nto-qnx* | linux-* | uclinux-uclibc* \
|
||||||
| uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
|
| uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
|
||||||
| netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
|
| netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
|
||||||
| storm-chaos* | os2-emx* | rtmk-nova*)
|
| storm-chaos* | os2-emx* | rtmk-nova* | managarm-*)
|
||||||
basic_machine=$field1
|
basic_machine=$field1
|
||||||
basic_os=$maybe_os
|
basic_os=$maybe_os
|
||||||
;;
|
;;
|
||||||
@ -943,7 +943,7 @@ $basic_machine
|
|||||||
EOF
|
EOF
|
||||||
IFS=$saved_IFS
|
IFS=$saved_IFS
|
||||||
;;
|
;;
|
||||||
# We use `pc' rather than `unknown'
|
# We use 'pc' rather than 'unknown'
|
||||||
# because (1) that's what they normally are, and
|
# because (1) that's what they normally are, and
|
||||||
# (2) the word "unknown" tends to confuse beginning users.
|
# (2) the word "unknown" tends to confuse beginning users.
|
||||||
i*86 | x86_64)
|
i*86 | x86_64)
|
||||||
@ -1075,7 +1075,7 @@ case $cpu-$vendor in
|
|||||||
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
|
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
|
||||||
cpu=i586
|
cpu=i586
|
||||||
;;
|
;;
|
||||||
pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
|
pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*)
|
||||||
cpu=i686
|
cpu=i686
|
||||||
;;
|
;;
|
||||||
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
|
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
|
||||||
@ -1207,7 +1207,7 @@ case $cpu-$vendor in
|
|||||||
| k1om \
|
| k1om \
|
||||||
| le32 | le64 \
|
| le32 | le64 \
|
||||||
| lm32 \
|
| lm32 \
|
||||||
| loongarch32 | loongarch64 | loongarchx32 \
|
| loongarch32 | loongarch64 \
|
||||||
| m32c | m32r | m32rle \
|
| m32c | m32r | m32rle \
|
||||||
| m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
|
| m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
|
||||||
| m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
|
| m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
|
||||||
@ -1285,7 +1285,7 @@ case $cpu-$vendor in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
|
echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@ -1341,6 +1341,10 @@ EOF
|
|||||||
kernel=linux
|
kernel=linux
|
||||||
os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
|
os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
|
||||||
;;
|
;;
|
||||||
|
managarm*)
|
||||||
|
kernel=managarm
|
||||||
|
os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'`
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
kernel=
|
kernel=
|
||||||
os=$basic_os
|
os=$basic_os
|
||||||
@ -1754,7 +1758,7 @@ case $os in
|
|||||||
| onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
|
| onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
|
||||||
| midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
|
| midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
|
||||||
| nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
|
| nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
|
||||||
| fiwix* )
|
| fiwix* | mlibc* )
|
||||||
;;
|
;;
|
||||||
# This one is extra strict with allowed versions
|
# This one is extra strict with allowed versions
|
||||||
sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
|
sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
|
||||||
@ -1762,8 +1766,11 @@ case $os in
|
|||||||
;;
|
;;
|
||||||
none)
|
none)
|
||||||
;;
|
;;
|
||||||
|
kernel* )
|
||||||
|
# Restricted further below
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2
|
echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@ -1772,14 +1779,24 @@ esac
|
|||||||
# (given a valid OS), if there is a kernel.
|
# (given a valid OS), if there is a kernel.
|
||||||
case $kernel-$os in
|
case $kernel-$os in
|
||||||
linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
|
linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
|
||||||
| linux-musl* | linux-relibc* | linux-uclibc* )
|
| linux-musl* | linux-relibc* | linux-uclibc* | linux-mlibc* )
|
||||||
;;
|
;;
|
||||||
uclinux-uclibc* )
|
uclinux-uclibc* )
|
||||||
;;
|
;;
|
||||||
-dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* )
|
managarm-mlibc* | managarm-kernel* )
|
||||||
|
;;
|
||||||
|
-dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* | -mlibc* )
|
||||||
# These are just libc implementations, not actual OSes, and thus
|
# These are just libc implementations, not actual OSes, and thus
|
||||||
# require a kernel.
|
# require a kernel.
|
||||||
echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2
|
echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
-kernel* )
|
||||||
|
echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
*-kernel* )
|
||||||
|
echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
kfreebsd*-gnu* | kopensolaris*-gnu*)
|
kfreebsd*-gnu* | kopensolaris*-gnu*)
|
||||||
@ -1796,7 +1813,7 @@ case $kernel-$os in
|
|||||||
# Blank kernel with real OS is always fine.
|
# Blank kernel with real OS is always fine.
|
||||||
;;
|
;;
|
||||||
*-*)
|
*-*)
|
||||||
echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2
|
echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
48
macros
48
macros
@ -57,14 +57,14 @@
|
|||||||
# C compiler flags. This is traditionally called CFLAGS in makefiles.
|
# C compiler flags. This is traditionally called CFLAGS in makefiles.
|
||||||
# Historically also available as %%{optflags}, and %%build sets the
|
# Historically also available as %%{optflags}, and %%build sets the
|
||||||
# environment variable RPM_OPT_FLAGS to this value.
|
# environment variable RPM_OPT_FLAGS to this value.
|
||||||
%build_cflags %{optflags}
|
%build_cflags %{__build_flags_lang_c} %{?_distro_extra_cflags}
|
||||||
|
|
||||||
# C++ compiler flags. This is traditionally called CXXFLAGS in makefiles.
|
# C++ compiler flags. This is traditionally called CXXFLAGS in makefiles.
|
||||||
%build_cxxflags %{optflags}
|
%build_cxxflags %{__build_flags_lang_cxx} %{?_distro_extra_cxxflags}
|
||||||
|
|
||||||
# Fortran compiler flags. Makefiles use both FFLAGS and FCFLAGS as
|
# Fortran compiler flags. Makefiles use both FFLAGS and FCFLAGS as
|
||||||
# the corresponding variable names.
|
# the corresponding variable names.
|
||||||
%build_fflags %{optflags} -I%{_fmoddir}
|
%build_fflags %{__build_flags_common} -I%{_fmoddir} %{?_distro_extra_fflags}
|
||||||
|
|
||||||
# Vala compiler flags. This is used to set VALAFLAGS.
|
# Vala compiler flags. This is used to set VALAFLAGS.
|
||||||
%build_valaflags -g
|
%build_valaflags -g
|
||||||
@ -72,14 +72,14 @@
|
|||||||
# When clang is used as a linker driver, it does not auto-detect the LTO
|
# When clang is used as a linker driver, it does not auto-detect the LTO
|
||||||
# bytecode and neither does bfd, so we need to explicitly pass the -flto
|
# bytecode and neither does bfd, so we need to explicitly pass the -flto
|
||||||
# flag when linking.
|
# flag when linking.
|
||||||
%_clang_extra_ldflags %{?_lto_cflags} -fno-openmp-implicit-rpath
|
%_clang_extra_ldflags %{?_lto_cflags}
|
||||||
|
|
||||||
# Link editor flags. This is usually called LDFLAGS in makefiles.
|
# Link editor flags. This is usually called LDFLAGS in makefiles.
|
||||||
# (Some makefiles use LFLAGS instead.) The default value assumes that
|
# (Some makefiles use LFLAGS instead.) The default value assumes that
|
||||||
# the flags, while intended for ld, are still passed through the gcc
|
# the flags, while intended for ld, are still passed through the gcc
|
||||||
# compiler driver. At the beginning of %%build, the environment
|
# compiler driver. At the beginning of %%build, the environment
|
||||||
# variable RPM_LD_FLAGS to this value.
|
# variable RPM_LD_FLAGS to this value.
|
||||||
%build_ldflags -Wl,-z,relro %{_ld_as_needed_flags} %{_ld_symbols_flags} %{_hardened_ldflags} %{_annotation_ldflags} %[ "%{toolchain}" == "clang" ? "%{?_clang_extra_ldflags}" : "" ] %{_build_id_flags} %{?_package_note_flags}
|
%build_ldflags -Wl,-z,relro %{_ld_as_needed_flags} %{_ld_symbols_flags} %{_hardened_ldflags} %{_annotation_ldflags} %[ "%{toolchain}" == "clang" ? "%{?_clang_extra_ldflags}" : "" ] %{_build_id_flags} %{?_package_note_flags} %{?_distro_extra_ldflags}
|
||||||
|
|
||||||
# Expands to shell code to set the compiler/linker environment
|
# Expands to shell code to set the compiler/linker environment
|
||||||
# variables CFLAGS, CXXFLAGS, FFLAGS, FCFLAGS, VALAFLAGS, LDFLAGS if they
|
# variables CFLAGS, CXXFLAGS, FFLAGS, FCFLAGS, VALAFLAGS, LDFLAGS if they
|
||||||
@ -92,6 +92,7 @@
|
|||||||
FFLAGS="${FFLAGS:-%{build_fflags}}" ; export FFLAGS ; \
|
FFLAGS="${FFLAGS:-%{build_fflags}}" ; export FFLAGS ; \
|
||||||
FCFLAGS="${FCFLAGS:-%{build_fflags}}" ; export FCFLAGS ; \
|
FCFLAGS="${FCFLAGS:-%{build_fflags}}" ; export FCFLAGS ; \
|
||||||
VALAFLAGS="${VALAFLAGS:-%{build_valaflags}}" ; export VALAFLAGS ; \
|
VALAFLAGS="${VALAFLAGS:-%{build_valaflags}}" ; export VALAFLAGS ; \
|
||||||
|
RUSTFLAGS="${RUSTFLAGS:-%{build_rustflags}}" ; export RUSTFLAGS ; \
|
||||||
LDFLAGS="${LDFLAGS:-%{build_ldflags}}" ; export LDFLAGS ; \
|
LDFLAGS="${LDFLAGS:-%{build_ldflags}}" ; export LDFLAGS ; \
|
||||||
LT_SYS_LIBRARY_PATH="${LT_SYS_LIBRARY_PATH:-%_libdir:}" ; export LT_SYS_LIBRARY_PATH ; \
|
LT_SYS_LIBRARY_PATH="${LT_SYS_LIBRARY_PATH:-%_libdir:}" ; export LT_SYS_LIBRARY_PATH ; \
|
||||||
CC="${CC:-%{__cc}}" ; export CC ; \
|
CC="${CC:-%{__cc}}" ; export CC ; \
|
||||||
@ -137,7 +138,9 @@ print(result)
|
|||||||
|
|
||||||
# Architecture-specific support. Internal. Do not use directly.
|
# Architecture-specific support. Internal. Do not use directly.
|
||||||
|
|
||||||
%__cflags_arch_x86_64 %[0%{?rhel} >= 9 ? "-march=x86-64-v2" : ""]
|
%__cflags_arch_x86_64_v2 %[0%{?rhel} == 9 ? "-march=x86-64-v2" : ""]
|
||||||
|
%__cflags_arch_x86_64_v3 %[0%{?rhel} > 9 ? "-march=x86-64-v3" : ""]
|
||||||
|
%__cflags_arch_x86_64 %{__cflags_arch_x86_64_v2} %{__cflags_arch_x86_64_v3}
|
||||||
|
|
||||||
# Also used for s390.
|
# Also used for s390.
|
||||||
%__cflags_arch_s390x %[0%{?rhel} >= 9 ? "-march=z14 -mtune=z15" : "-march=z13 -mtune=z14"]
|
%__cflags_arch_s390x %[0%{?rhel} >= 9 ? "-march=z14 -mtune=z15" : "-march=z13 -mtune=z14"]
|
||||||
@ -305,6 +308,12 @@ print(result)
|
|||||||
# Use Zstandard compression for binary payloads
|
# Use Zstandard compression for binary payloads
|
||||||
%_binary_payload w19.zstdio
|
%_binary_payload w19.zstdio
|
||||||
|
|
||||||
|
#==============================================================================
|
||||||
|
# --- Compiler flags control.
|
||||||
|
#
|
||||||
|
# Please consult buildflags.md for parts that can be configured
|
||||||
|
# from RPM spec files.
|
||||||
|
|
||||||
%_hardening_gcc_cflags -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
|
%_hardening_gcc_cflags -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
|
||||||
%_hardening_clang_cflags --config /usr/lib/rpm/redhat/redhat-hardened-clang.cfg
|
%_hardening_clang_cflags --config /usr/lib/rpm/redhat/redhat-hardened-clang.cfg
|
||||||
%_hardening_cflags %{expand:%%{_hardening_%{toolchain}_cflags}} -fstack-protector-strong
|
%_hardening_cflags %{expand:%%{_hardening_%{toolchain}_cflags}} -fstack-protector-strong
|
||||||
@ -363,7 +372,8 @@ print(result)
|
|||||||
# way we can detect installing an unusable .o/.a file. This is on the TODO
|
# way we can detect installing an unusable .o/.a file. This is on the TODO
|
||||||
# list for F34.
|
# list for F34.
|
||||||
%_gcc_lto_cflags -flto=auto -ffat-lto-objects
|
%_gcc_lto_cflags -flto=auto -ffat-lto-objects
|
||||||
%_clang_lto_cflags -flto=thin
|
# riscv64 does not have ld.gold support needed for LTO with Clang.
|
||||||
|
%_clang_lto_cflags %{nil}
|
||||||
%_lto_cflags %{expand:%%{_%{toolchain}_lto_cflags}}
|
%_lto_cflags %{expand:%%{_%{toolchain}_lto_cflags}}
|
||||||
|
|
||||||
# Default fortification level.
|
# Default fortification level.
|
||||||
@ -375,12 +385,16 @@ print(result)
|
|||||||
%_fortify_level 3
|
%_fortify_level 3
|
||||||
%_fortify_level_flags %[ 0%{?_fortify_level} > 0 ? "-Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=%{_fortify_level}" : "" ]
|
%_fortify_level_flags %[ 0%{?_fortify_level} > 0 ? "-Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=%{_fortify_level}" : "" ]
|
||||||
|
|
||||||
# Some linkers default to a build-id algoritim that is not supported by rpmbuild,
|
# This can be set to a positive integer to obtain increasing type
|
||||||
|
# safety levels for C. See buildflags.md.
|
||||||
|
%build_type_safety_c 0
|
||||||
|
|
||||||
|
# Some linkers default to a build-id algorithm that is not supported by rpmbuild,
|
||||||
# so we need to specify the right algorithm to use.
|
# so we need to specify the right algorithm to use.
|
||||||
%_build_id_flags -Wl,--build-id=sha1
|
%_build_id_flags -Wl,--build-id=sha1
|
||||||
|
|
||||||
%_general_options -O2 %{?_lto_cflags} -fexceptions -g -grecord-gcc-switches -pipe
|
%_general_options -O2 %{?_lto_cflags} -fexceptions -g -grecord-gcc-switches -pipe
|
||||||
%_warning_options -Wall -Werror=format-security
|
%_warning_options -Wall%[%__build_for_lang_any && "%toolchain" == "gcc" ? " -Wno-complain-wrong-lang" : ""]%[%__build_for_lang_c + %__build_for_lang_cxx ? " -Werror=format-security" : ""]%[%__build_for_lang_c && (%build_type_safety_c >= 1) ? " -Werror=implicit-function-declaration -Werror=implicit-int" : ""]%[%__build_for_lang_c && (%build_type_safety_c >= 2) ? " -Werror=int-conversion" : ""]%[%__build_for_lang_c && (%build_type_safety_c >= 3) ? " -Werror=incompatible-pointer-types" : ""]
|
||||||
%_preprocessor_defines %{_fortify_level_flags} -Wp,-D_GLIBCXX_ASSERTIONS
|
%_preprocessor_defines %{_fortify_level_flags} -Wp,-D_GLIBCXX_ASSERTIONS
|
||||||
|
|
||||||
# Common variables are no longer generated by default by gcc and clang
|
# Common variables are no longer generated by default by gcc and clang
|
||||||
@ -389,6 +403,22 @@ print(result)
|
|||||||
|
|
||||||
%__global_compiler_flags %{_general_options} %{_warning_options} %{_preprocessor_defines} %{_hardened_cflags} %{_annotation_cflags} %{_legacy_options}
|
%__global_compiler_flags %{_general_options} %{_warning_options} %{_preprocessor_defines} %{_hardened_cflags} %{_annotation_cflags} %{_legacy_options}
|
||||||
|
|
||||||
|
# Internal macros. Do not use directly. These variables can be rebound
|
||||||
|
# to suppress certain frontend-specific compiler flags (or in the case
|
||||||
|
# of __build_for_lang_any, frontend-agnostic flags). Dynamic scoping
|
||||||
|
# and shadowing redefinitions are used for the __build_for_* variables
|
||||||
|
# to remain largely compatible with existing spec files that have
|
||||||
|
# hard-coded assumptions which macros assume which other macros.
|
||||||
|
# The __build_flags_no_macro_warning construct suppresses a warning
|
||||||
|
# about unused RPM macros.
|
||||||
|
%__build_for_lang_c 1
|
||||||
|
%__build_for_lang_cxx 1
|
||||||
|
%__build_for_lang_any 1
|
||||||
|
%__build_flags_no_macro_warning %[%__build_for_lang_c + %__build_for_lang_cxx + %__build_for_lang_any ? "" : ""]
|
||||||
|
%__build_flags_common() %{expand:%define __build_for_lang_c 0}%{expand:%define __build_for_lang_cxx 0}%{expand:%define __build_for_lang_any 0}%{__build_flags_no_macro_warning}%{optflags}
|
||||||
|
%__build_flags_lang_c() %{expand:%define __build_for_lang_cxx 0}%{expand:%define __build_for_lang_any 0}%{__build_flags_no_macro_warning}%{optflags}
|
||||||
|
%__build_flags_lang_cxx() %{expand:%define __build_for_lang_c 0}%{expand:%define __build_for_lang_any 0}%{__build_flags_no_macro_warning}%{optflags}
|
||||||
|
|
||||||
# Automatically trim changelog entries after 2 years
|
# Automatically trim changelog entries after 2 years
|
||||||
%_changelog_trimage %{expr:2*365*24*60*60}
|
%_changelog_trimage %{expr:2*365*24*60*60}
|
||||||
|
|
||||||
|
2
macros.gap-srpm
Normal file
2
macros.gap-srpm
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Arches that GAP runs on
|
||||||
|
%gap_arches aarch64 ppc64le s390x x86_64 riscv64
|
@ -1,2 +1,5 @@
|
|||||||
*cc1_options:
|
*cc1_options:
|
||||||
+ %{!r:%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIE}}}}}}
|
+ %{!r:%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIE}}}}}}
|
||||||
|
|
||||||
|
*cpp_options:
|
||||||
|
+ %{!r:%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIE}}}}}}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
# 2) When making changes, increment the version (in baserelease) by 1.
|
# 2) When making changes, increment the version (in baserelease) by 1.
|
||||||
# rpmdev-bumpspec and other tools update the macro below, which is used
|
# rpmdev-bumpspec and other tools update the macro below, which is used
|
||||||
# in Version: to get the desired effect.
|
# in Version: to get the desired effect.
|
||||||
%global baserelease 244
|
%global baserelease 261
|
||||||
|
|
||||||
Summary: Red Hat specific rpm configuration files
|
Summary: Red Hat specific rpm configuration files
|
||||||
Name: redhat-rpm-config
|
Name: redhat-rpm-config
|
||||||
@ -40,6 +40,7 @@ Source103: macros.nodejs-srpm
|
|||||||
Source104: macros.ldc-srpm
|
Source104: macros.ldc-srpm
|
||||||
Source105: macros.valgrind-srpm
|
Source105: macros.valgrind-srpm
|
||||||
Source106: macros.java-srpm
|
Source106: macros.java-srpm
|
||||||
|
Source107: macros.gap-srpm
|
||||||
|
|
||||||
# Other misc macros
|
# Other misc macros
|
||||||
Source150: macros.build-constraints
|
Source150: macros.build-constraints
|
||||||
@ -102,14 +103,16 @@ Requires: perl-srpm-macros
|
|||||||
# ↓ Has Python BRPs originaly present in redhat-rpm-config
|
# ↓ Has Python BRPs originaly present in redhat-rpm-config
|
||||||
Requires: python-srpm-macros >= 3.11-7
|
Requires: python-srpm-macros >= 3.11-7
|
||||||
Requires: qt5-srpm-macros
|
Requires: qt5-srpm-macros
|
||||||
Requires: rust-srpm-macros
|
Requires: qt6-srpm-macros
|
||||||
|
# rust-srpm-macros v24 contains %%build_rustflags defintion
|
||||||
|
Requires: rust-srpm-macros >= 24
|
||||||
Requires: rpmautospec-rpm-macros
|
Requires: rpmautospec-rpm-macros
|
||||||
Requires: package-notes-srpm-macros
|
Requires: package-notes-srpm-macros
|
||||||
|
Requires: pyproject-srpm-macros
|
||||||
|
|
||||||
%if ! 0%{?rhel}
|
%if ! 0%{?rhel}
|
||||||
Requires: fpc-srpm-macros
|
Requires: fpc-srpm-macros
|
||||||
Requires: gnat-srpm-macros
|
Requires: gnat-srpm-macros
|
||||||
Requires: nim-srpm-macros
|
|
||||||
Requires: ansible-srpm-macros
|
Requires: ansible-srpm-macros
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -172,16 +175,46 @@ install -p -m 644 -t %{buildroot}%{_rpmluadir}/fedora/srpm forge.lua
|
|||||||
|
|
||||||
# This trigger is used to decide which version of the annobin plugin for gcc
|
# This trigger is used to decide which version of the annobin plugin for gcc
|
||||||
# should be used. See comments in the script for full details.
|
# should be used. See comments in the script for full details.
|
||||||
|
#
|
||||||
|
# Note - whilst "gcc-plugin-annobin" requires "gcc" and hence in theory we
|
||||||
|
# do not need to trigger on "gcc", the redhat-annobin-plugin-select.sh
|
||||||
|
# script invokes gcc to determine the version of the gcc plugin, and this
|
||||||
|
# can be significant.
|
||||||
|
#
|
||||||
|
# For example, suppose that version N of gcc is installed and that annobin
|
||||||
|
# version A (built by gcc version N) is also installed. Then a new version
|
||||||
|
# of gcc is released. If the rpms are updated in this order:
|
||||||
|
# gcc-plugin-annobin
|
||||||
|
# gcc
|
||||||
|
# then when the trigger for gcc-plugin-annobin is run, the script will see
|
||||||
|
# (the not yet updated) gcc is currently version N, which matches the current
|
||||||
|
# annobin plugin A, so no changes are necessary. Then gcc is updated and,
|
||||||
|
# if the trigger below did not include "gcc", the script would not run again
|
||||||
|
# and so now you would have an out of date version of the annobin plugin.
|
||||||
|
#
|
||||||
|
# Alternatively imagine installing gcc and annobin for the first time.
|
||||||
|
# If the installation order is:
|
||||||
|
# gcc
|
||||||
|
# annobin-plugin-gcc
|
||||||
|
# gcc-plugin-annobin
|
||||||
|
# then the installation of gcc will not cause the gcc-plugin-annobin to be
|
||||||
|
# selected, since it does not exist yet. Then annobin-plugin-gcc is installed
|
||||||
|
# and since it is the only plugin, it will be selected. Then
|
||||||
|
# gcc-plugin-annobin is installed, and if the trigger below was not set to
|
||||||
|
# run on gcc-plugin-annobin, it would pass unnoticed.
|
||||||
|
#
|
||||||
|
# Hence it is necessary to trigger on both gcc and gcc-plugin-annobin.
|
||||||
|
|
||||||
%triggerin -- annobin-plugin-gcc gcc
|
%triggerin -- annobin-plugin-gcc gcc-plugin-annobin gcc
|
||||||
%{rrcdir}/redhat-annobin-plugin-select.sh
|
%{rrcdir}/redhat-annobin-plugin-select.sh
|
||||||
%end
|
%end
|
||||||
|
|
||||||
# We also trigger when annobin is uninstalled. This allows us to switch
|
# We also trigger when an annobin plugin is uninstalled. This allows us to
|
||||||
# over to the gcc generated version of the plugin. It does not matter if
|
# switch over to the other version of the plugin. Note - we do not bother
|
||||||
# gcc is uninstalled, since if that happens the plugin cannot be used.
|
# triggering on the uninstallation of "gcc", since if that is removed, the
|
||||||
|
# plugins are rendered useless.
|
||||||
|
|
||||||
%triggerpostun -- annobin-plugin-gcc
|
%triggerpostun -- annobin-plugin-gcc gcc-plugin-annobin
|
||||||
%{rrcdir}/redhat-annobin-plugin-select.sh
|
%{rrcdir}/redhat-annobin-plugin-select.sh
|
||||||
%end
|
%end
|
||||||
|
|
||||||
@ -221,8 +254,65 @@ install -p -m 644 -t %{buildroot}%{_rpmluadir}/fedora/srpm forge.lua
|
|||||||
%doc buildflags.md
|
%doc buildflags.md
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Tue Jan 17 2023 David Abdurachmanov <davidlt@rivosinc.com> - 244-1.0.riscv64
|
* Thu Jul 27 2023 David Abdurachmanov <davidlt@rivosinc.com> - 261-1.0.riscv64
|
||||||
- Add riscv64 to nodejs and java arches
|
- Add riscv64 to %%gap_arches, %%java_arches, and %%nodejs_arches
|
||||||
|
- Set %%_clang_lto_cflags to %%nil as ld.gold is not implemented for riscv64
|
||||||
|
and thus LTO with Clang doesn't work.
|
||||||
|
|
||||||
|
* Fri Jul 7 2023 Florian Weimer <fweimer@redhat.com> - 261-1
|
||||||
|
- Fix warnings that appear during the build of the llvm package
|
||||||
|
|
||||||
|
* Wed Jul 5 2023 Florian Weimer <fweimer@redhat.com> - 260-1
|
||||||
|
- Implement the %%build_type_safety_c macro (#2218019)
|
||||||
|
|
||||||
|
* Wed Jul 5 2023 Florian Weimer <fweimer@redhat.com> - 259-1
|
||||||
|
- Filter out C, C++ build flags from Fortran build flags (#2177253)
|
||||||
|
|
||||||
|
* Wed Jul 5 2023 Florian Weimer <fweimer@redhat.com> - 258-1
|
||||||
|
- Enable PIC mode for assembler files (#2167430)
|
||||||
|
|
||||||
|
* Wed Jul 05 2023 Frederic Berat <fberat@redhat.com> - 257-1
|
||||||
|
- update config.{guess,sub} to gnuconfig git HEAD
|
||||||
|
|
||||||
|
* Sat Jun 17 2023 Tom Stellard <tstellar@redhat.com> - 256-1
|
||||||
|
- Remove -fno-openmp-implicit-rpath from clang ldflags
|
||||||
|
|
||||||
|
* Fri Jun 16 2023 Lumír Balhar <lbalhar@redhat.com> - 255-1
|
||||||
|
- Add qt6-srpm-macros
|
||||||
|
|
||||||
|
* Thu Mar 9 2023 Florian Weimer <fweimer@redhat.com> - 254-1
|
||||||
|
- Switch ELN to x86-64-v3
|
||||||
|
|
||||||
|
* Tue Feb 28 2023 Maxwell G <gotmax@e.email> - 253-1
|
||||||
|
- Include RUSTFLAGS in %%set_build_flags
|
||||||
|
- Fixes: rhbz#2167183
|
||||||
|
|
||||||
|
* Tue Feb 28 2023 Tom Stellard <tstellar@redhat.com> - 252-1
|
||||||
|
- Rename _pkg_extra_* macros to _distro_extra_*
|
||||||
|
|
||||||
|
* Thu Feb 23 2023 Miro Hrončok <mhroncok@redhat.com> - 251-1
|
||||||
|
- Drop the requirement of orphaned nim-srpm-macros
|
||||||
|
- No Fedora package uses the %%nim_arches macro
|
||||||
|
|
||||||
|
* Tue Feb 14 2023 Frederic Berat <fberat@redhat.com> - 250-1
|
||||||
|
- update config.{guess,sub} to gnuconfig git HEAD
|
||||||
|
|
||||||
|
* Thu Feb 09 2023 Jerry James <loganjerry@gmail.com> - 249-1
|
||||||
|
- Add macros.gap-srpm
|
||||||
|
|
||||||
|
* Tue Feb 07 2023 Tom Stellard <tstellar@redhat.com> - 248-1
|
||||||
|
- Add %%pkg_extra_* macros
|
||||||
|
|
||||||
|
* Mon Feb 06 2023 Nick Clifton <nickc@redhat.com> - 247-1
|
||||||
|
- Fix triggers for the installation and removal of gcc-plugin-annobin.
|
||||||
|
Fixes: rhbz#2124562
|
||||||
|
|
||||||
|
* Tue Jan 17 2023 Miro Hrončok <mhroncok@redhat.com> - 246-1
|
||||||
|
- Add pyproject-srpm-macros to the default buildroot
|
||||||
|
|
||||||
|
* Tue Jan 17 2023 Davide Cavalca <dcavalca@fedoraproject.org> - 245-1
|
||||||
|
- Do not include frame pointers on ppc64le for now
|
||||||
|
Fixes: rhbz#2161595
|
||||||
|
|
||||||
* Mon Jan 16 2023 Tom Stellard <tstellar@redhat.com> - 244-1
|
* Mon Jan 16 2023 Tom Stellard <tstellar@redhat.com> - 244-1
|
||||||
- Make -flto=thin the default lto flag for clang
|
- Make -flto=thin the default lto flag for clang
|
||||||
|
5
rpmrc
5
rpmrc
@ -7,10 +7,7 @@ optflags: i686 %{__global_compiler_flags} -m32 -march=i686 -mtune=generic -msse2
|
|||||||
optflags: athlon %{__global_compiler_flags} -m32 -march=athlon -fasynchronous-unwind-tables -fstack-clash-protection
|
optflags: athlon %{__global_compiler_flags} -m32 -march=athlon -fasynchronous-unwind-tables -fstack-clash-protection
|
||||||
optflags: x86_64 %{__global_compiler_flags} -m64 %{__cflags_arch_x86_64} -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection %{_frame_pointers_cflags} %{_frame_pointers_cflags_x86_64}
|
optflags: x86_64 %{__global_compiler_flags} -m64 %{__cflags_arch_x86_64} -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection %{_frame_pointers_cflags} %{_frame_pointers_cflags_x86_64}
|
||||||
|
|
||||||
optflags: ppc64le %{__global_compiler_flags} -m64 %{__cflags_arch_ppc64le} -fasynchronous-unwind-tables -fstack-clash-protection %{_frame_pointers_cflags}
|
optflags: ppc64le %{__global_compiler_flags} -m64 %{__cflags_arch_ppc64le} -fasynchronous-unwind-tables -fstack-clash-protection
|
||||||
|
|
||||||
# TODO: Remove armv7hl once f36 goes EOL.
|
|
||||||
optflags: armv7hl %{__global_compiler_flags} -march=armv7-a -mfpu=vfpv3-d16 -mtune=generic-armv7-a -mabi=aapcs-linux -mfloat-abi=hard %{_frame_pointers_cflags}
|
|
||||||
|
|
||||||
optflags: s390x %{__global_compiler_flags} -m64 %{__cflags_arch_s390x} -fasynchronous-unwind-tables -fstack-clash-protection
|
optflags: s390x %{__global_compiler_flags} -m64 %{__cflags_arch_s390x} -fasynchronous-unwind-tables -fstack-clash-protection
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ summary: >
|
|||||||
|
|
||||||
require:
|
require:
|
||||||
- annobin-annocheck
|
- annobin-annocheck
|
||||||
|
- dnf5-plugins
|
||||||
- gcc
|
- gcc
|
||||||
- gcc-c++
|
- gcc-c++
|
||||||
- make
|
- make
|
||||||
|
@ -2,6 +2,6 @@
|
|||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
dnf -y build-dep test.spec
|
dnf -y builddep test.spec
|
||||||
rpmbuild --define '_sourcedir .' --define '_builddir .' -bi test.spec
|
rpmbuild --define '_sourcedir .' --define '_builddir .' -bi test.spec
|
||||||
rpmbuild --without auto_set_build_flags --define '_sourcedir .' --define '_builddir .' -bi test.spec
|
rpmbuild --without auto_set_build_flags --define '_sourcedir .' --define '_builddir .' -bi test.spec
|
||||||
|
@ -2,6 +2,7 @@ Summary: Test that the brp-llvm-compile-lto-elf script is working correctly
|
|||||||
|
|
||||||
require:
|
require:
|
||||||
- dnf-plugins-core
|
- dnf-plugins-core
|
||||||
|
- dnf5-plugins
|
||||||
- redhat-rpm-config
|
- redhat-rpm-config
|
||||||
- rpm-build
|
- rpm-build
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ set -ex
|
|||||||
lib_dir=brp-llvm-compile-lto-elf-test-lib
|
lib_dir=brp-llvm-compile-lto-elf-test-lib
|
||||||
lib_spec=$lib_dir/brp-llvm-compile-lto-elf-test-lib.spec
|
lib_spec=$lib_dir/brp-llvm-compile-lto-elf-test-lib.spec
|
||||||
|
|
||||||
dnf -y build-dep $lib_spec
|
dnf -y builddep $lib_spec
|
||||||
rpmbuild --define "_sourcedir ." --define "_builddir ./$lib_dir" --define "_rpmdir ." -bb $lib_spec
|
rpmbuild --define "_sourcedir ." --define "_builddir ./$lib_dir" --define "_rpmdir ." -bb $lib_spec
|
||||||
|
|
||||||
dnf -y install ./`rpm --eval '%{_arch}'`/*.rpm
|
dnf -y install ./`rpm --eval '%{_arch}'`/*.rpm
|
||||||
@ -13,5 +13,5 @@ dnf -y install ./`rpm --eval '%{_arch}'`/*.rpm
|
|||||||
test_dir=brp-llvm-compile-lto-elf-test
|
test_dir=brp-llvm-compile-lto-elf-test
|
||||||
test_spec=$test_dir/brp-llvm-compile-lto-elf-test.spec
|
test_spec=$test_dir/brp-llvm-compile-lto-elf-test.spec
|
||||||
|
|
||||||
dnf -y build-dep $test_spec
|
dnf -y builddep $test_spec
|
||||||
rpmbuild --define "_sourcedir ." --define "_builddir ./$test_dir" -bi $test_spec
|
rpmbuild --define "_sourcedir ." --define "_builddir ./$test_dir" -bi $test_spec
|
||||||
|
@ -2,5 +2,6 @@ summary: self-build test
|
|||||||
|
|
||||||
require:
|
require:
|
||||||
- dnf-plugins-core
|
- dnf-plugins-core
|
||||||
|
- dnf5-plugins
|
||||||
- rpm-build
|
- rpm-build
|
||||||
test: ./runtest.sh
|
test: ./runtest.sh
|
||||||
|
@ -3,5 +3,5 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
spec=$TMT_TREE/redhat-rpm-config.spec
|
spec=$TMT_TREE/redhat-rpm-config.spec
|
||||||
dnf -y build-dep $spec
|
dnf -y builddep $spec
|
||||||
rpmbuild --define "_sourcedir $TMT_TREE" -ba $spec
|
rpmbuild --define "_sourcedir $TMT_TREE" -ba $spec
|
||||||
|
8
tests/distro-extra-flags/main.fmf
Normal file
8
tests/distro-extra-flags/main.fmf
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
summary: >
|
||||||
|
Check that the %_distro_extra_* macros allow users to append new flags to the
|
||||||
|
list of default flags.
|
||||||
|
|
||||||
|
require:
|
||||||
|
- rpm
|
||||||
|
|
||||||
|
test: ./runtest.sh
|
6
tests/distro-extra-flags/runtest.sh
Executable file
6
tests/distro-extra-flags/runtest.sh
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
set -ex
|
||||||
|
|
||||||
|
rpm -D '%_distro_extra_cflags -Wall' -E %{build_cflags} | grep -e '\-Wall$'
|
||||||
|
rpm -D '%_distro_extra_cxxflags -Wall' -E %{build_cxxflags} | grep -e '\-Wall$'
|
||||||
|
rpm -D '%_distro_extra_ldflags -Wall' -E %{build_ldflags} | grep -e '\-Wall$'
|
||||||
|
rpm -D '%_distro_extra_fflags -Wall' -E %{build_fflags} | grep -e '\-Wall$'
|
@ -23,7 +23,7 @@ validate() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
for arch in aarch64 armv7hl x86_64 ppc64le riscv64; do
|
for arch in aarch64 x86_64 riscv64; do
|
||||||
case "$arch" in
|
case "$arch" in
|
||||||
x86_64|aarch64)
|
x86_64|aarch64)
|
||||||
flags='-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer'
|
flags='-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer'
|
||||||
@ -47,7 +47,7 @@ for arch in aarch64 armv7hl x86_64 ppc64le riscv64; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
flags='-fno-omit-frame-pointer'
|
flags='-fno-omit-frame-pointer'
|
||||||
for arch in i386 i486 i586 i686 athlon s390x; do
|
for arch in i386 i486 i586 i686 athlon ppc64le s390x; do
|
||||||
rpmeval --target="${arch}-linux" --define='_include_frame_pointers 1' | grep -qv -- "$flags"
|
rpmeval --target="${arch}-linux" --define='_include_frame_pointers 1' | grep -qv -- "$flags"
|
||||||
validate "[${arch}] Test that the flags are not included if the macro is defined"
|
validate "[${arch}] Test that the flags are not included if the macro is defined"
|
||||||
|
|
||||||
|
7
tests/rustflags/main.fmf
Normal file
7
tests/rustflags/main.fmf
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
summary: Test that conditional support for RUSTFLAGS works
|
||||||
|
|
||||||
|
require:
|
||||||
|
- redhat-rpm-config
|
||||||
|
- rpm
|
||||||
|
- rust-packaging
|
||||||
|
test: ./runtest.sh
|
22
tests/rustflags/runtest.sh
Executable file
22
tests/rustflags/runtest.sh
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
set -e -u -o pipefail
|
||||||
|
|
||||||
|
# Allow for local testing
|
||||||
|
rargs=()
|
||||||
|
if [ -n "${MACROS_PATH:-}" ]; then
|
||||||
|
default_macros_path="$(rpm --showrc | grep 'Macro path' | awk -F ': ' '{print $2}')"
|
||||||
|
rargs+=("--macros" "${default_macros_path}:${MACROS_PATH}")
|
||||||
|
fi
|
||||||
|
|
||||||
|
build_rustflags="$(rpm -E '%{build_rustflags}')"
|
||||||
|
# For good measure
|
||||||
|
[ "${build_rustflags}" != "%{build_rustflags}" ]
|
||||||
|
#
|
||||||
|
flags="$(rpm "${rargs[@]}" -E '%set_build_flags')"
|
||||||
|
|
||||||
|
echo 'Check that RUSTFLAGS is set after evaluating %set_build_flags'
|
||||||
|
(
|
||||||
|
eval "${flags}"
|
||||||
|
# set -u will make this fail if $RUSTFLAGS isn't defined
|
||||||
|
[ "${RUSTFLAGS}" = "${build_rustflags}" ]
|
||||||
|
)
|
Loading…
Reference in New Issue
Block a user