public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] some multilib-minimal enhancements [2/6]: add frob for consumers to disable automagic header wrapping
@ 2013-12-11 21:18 Greg Turner
  2013-12-11 21:37 ` hasufell
  0 siblings, 1 reply; 7+ messages in thread
From: Greg Turner @ 2013-12-11 21:18 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: 002-MULTILIB_INSECURE_INSTALL.patch --]
[-- Type: text/x-patch, Size: 2306 bytes --]

Add a MULTILIB_INSECURE_INSTALL variable to eclass/multilib-minimal.eclass

Sometimes the "multilib magic header" business is an unwanted
feature.  For example, it is infuriating to be forced
to wrap a header file (or, less offensively, but still quite
offensively, to be forced to implement inter-ABI
header-smuggling code) just to appease multilib_check_headers,
in the case where an ABI-specific header triggers a multilib_check_headers
failure.

This provides a frob to turn the whole thing off, collisions be
damned.  Arguably, it would be better to have a per-header frob,
as well, but this this is better than nothing and trivial to implement.

--- 001-debug-print-function/multilib-minimal.eclass	2013-12-03 02:17:30.144384409 -0800
+++ 002-MULTILIB_INSECURE_INSTALL/multilib-minimal.eclass	2013-12-03 02:23:06.888008751 -0800
@@ -29,6 +29,20 @@ case ${EAPI:-0} in
 	*) die "EAPI=${EAPI} is not supported" ;;
 esac
 
+# @ECLASS-VARIABLE: MULTILIB_INSECURE_INSTALL
+# @DEFAULT-UNSET
+# @DESCRIPTION:
+# If set to a nonempty value, multilib-minimal_src_install will not perform
+# automatic checking of headers for inter-ABI conflicts, nor will it automate
+# wrapping of header files.  Instead, multilib_src_install pseudophases will
+# run without any special protection and the MULTILIB_WRAPPED_HEADERS array
+# will be ignored.
+# See:
+# @CODE@
+# http://devmanual.gentoo.org/eclass-reference/multilib-build.eclass/index.html
+# @CODE@
+# (or the multilib-build.eclass source itself) for further information about this
+# feature.
 
 inherit eutils multilib-build
 
@@ -108,15 +122,19 @@ multilib-minimal_src_install() {
 				emake DESTDIR="${D}" install
 			fi
 		fi
-		# Do multilib magic only when >1 ABI is used.
-		if [[ ${#MULTIBUILD_VARIANTS[@]} -gt 1 ]]; then
+
+		# Do multilib magic only when >1 ABI is used and
+		# MULTILIB_INSECURE_INSTALL is not set
+		if [[ ${#MULTIBUILD_VARIANTS[@]} -gt 1 && \
+		      -z ${MULTILIB_INSECURE_INSTALL} ]]; then
 			multilib_prepare_wrappers
 			multilib_check_headers
 		fi
 		popd >/dev/null || die
 	}
 	multilib_foreach_abi multilib-minimal_abi_src_install
-	multilib_install_wrappers
+
+	[[ ${MULTILIB_INSECURE_INSTALL} ]] || multilib_install_wrappers
 
 	if declare -f multilib_src_install_all >/dev/null ; then
 		multilib_src_install_all

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-12-13  5:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-11 21:18 [gentoo-dev] some multilib-minimal enhancements [2/6]: add frob for consumers to disable automagic header wrapping Greg Turner
2013-12-11 21:37 ` hasufell
2013-12-12  1:20   ` Greg Turner
2013-12-12  6:33     ` Michał Górny
2013-12-12  7:10       ` Greg Turner
2013-12-12  7:20         ` Michał Górny
2013-12-13  5:14           ` Greg Turner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox