-
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* build-deps: Fix Arch build on conflicting _FORTIFY_SOURCE values rpm: cleanup build dependencies
- Loading branch information
Showing
3 changed files
with
44 additions
and
8 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
0653-python-avoid-conflicting-_FORTIFY_SOURCE-values.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
From 5e9e49c4f0ed9c54b63bf99d7b6a013005f94865 Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= | ||
<[email protected]> | ||
Date: Fri, 19 Jul 2024 01:15:13 +0200 | ||
Subject: [PATCH] python: avoid conflicting _FORTIFY_SOURCE values | ||
MIME-Version: 1.0 | ||
Content-Type: text/plain; charset=UTF-8 | ||
Content-Transfer-Encoding: 8bit | ||
|
||
The compile flags are combined from python's build config (sysconfig | ||
module) and CFLAGS environment. If both define the _FORTIFY_SOURCE but | ||
to different values, the build will fail. This is the case on Arch, | ||
where Python's sysconfig has -D_FORTIFY_SOURCE=2, while Arch's | ||
makepkg.conf has -D_FORTIFY_SOURCE=3. Resolve the config by undefining | ||
_FORTIFY_SOURCE first, and use the value from the CFLAGS environment. | ||
Details: | ||
https://setuptools.pypa.io/en/latest/userguide/ext_modules.html | ||
|
||
Signed-off-by: Marek Marczykowski-Górecki <[email protected]> | ||
--- | ||
tools/python/setup.py | 3 +++ | ||
1 file changed, 3 insertions(+) | ||
|
||
diff --git a/tools/python/setup.py b/tools/python/setup.py | ||
index 02354f698653..a73c95a9e766 100644 | ||
--- a/tools/python/setup.py | ||
+++ b/tools/python/setup.py | ||
@@ -20,6 +20,9 @@ PATH_LIBXENCTRL = XEN_ROOT + "/tools/libs/ctrl" | ||
PATH_LIBXENGUEST = XEN_ROOT + "/tools/libs/guest" | ||
PATH_XENSTORE = XEN_ROOT + "/tools/libs/store" | ||
|
||
+if "-D_FORTIFY_SOURCE=" in os.environ.get("CFLAGS", ""): | ||
+ os.environ["CFLAGS"] = "-Wp,-U_FORTIFY_SOURCE " + os.environ["CFLAGS"] | ||
+ | ||
xc = Extension("xc", | ||
extra_compile_args = extra_compile_args, | ||
include_dirs = [ PATH_XEN, | ||
-- | ||
2.45.2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters