7331757cf1
This preserves binary compatibility with the main interpreters the extensions are built against while removing Fedora's flags that are not required to be inherited on user built extensions. This implements https://fedoraproject.org/wiki/Changes/Python_Extension_Flags_Reduction
12 lines
481 B
Bash
Executable File
12 lines
481 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -ex
|
|
# Verify that the extension builder flags are stripped of non-required flags.
|
|
# The flags may appear in random order due to being accessed through a lua
|
|
# associative array.
|
|
for f in %{extension_cflags} %{extension_cxxflags} %{extension_fflags}; do
|
|
[[ $(rpm --eval "$f") =~ ^[[:space:]]*(-fexceptions -fcf-protection|-fcf-protection -fexceptions)[[:space:]]*$ ]]
|
|
done
|
|
# The extension ldflag should always be empty
|
|
[[ -z $(rpm --eval "%extension_ldflags") ]]
|