Files
guru/dev-util/wxformbuilder/files/wxformbuilder-4.2.1-no-pie.patch
Huang Rui 1cb00e64f1 dev-util/wxformbuilder: drop -fPIE from app, bump to -r1
- Add no-pie patch: app target now POSITION_INDEPENDENT_CODE OFF.
- Third-party static libs keep -fPIC for shared-lib linking.

Closes: https://bugs.gentoo.org/948602
Signed-off-by: Huang Rui <vowstar@gmail.com>
2026-05-18 17:39:38 +08:00

21 lines
858 B
Diff

Disable position independent code for the executable target.
Upstream enables CMAKE_POSITION_INDEPENDENT_CODE globally in
cmake/macros.cmake (for the benefit of static libraries that get linked
into shared libraries), which propagates -fPIE to the wxFormBuilder_app
executable. Gentoo's tinderbox QA flags this as an "uncommon" flag
(QA0069), since PIE handling belongs to the toolchain. Set the property
to OFF on the executable target so libs still get -fPIC.
https://bugs.gentoo.org/948602
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -16,6 +16,7 @@
add_executable(wxFormBuilder_app WIN32 MACOSX_BUNDLE)
add_executable(wxFormBuilder::app ALIAS wxFormBuilder_app)
set_target_properties(wxFormBuilder_app PROPERTIES
+ POSITION_INDEPENDENT_CODE OFF
OUTPUT_NAME "$<IF:$<OR:$<BOOL:${WIN32}>,$<BOOL:${APPLE}>>,wxFormBuilder,wxformbuilder>"
)