summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2021-02-20 15:06:26 +0100
committerFabian Groffen <grobian@gentoo.org>2021-02-20 15:06:26 +0100
commitbabca9fbf47dcde892d2be9d7152da178d9ec801 (patch)
tree583dc714a2d362f8ec5cda3957e6562fa9ed977b
parentscripts/bootstrap-prefix: bump bootstrap tree (diff)
downloadprefix-babca9fbf47dcde892d2be9d7152da178d9ec801.tar.gz
prefix-babca9fbf47dcde892d2be9d7152da178d9ec801.tar.bz2
prefix-babca9fbf47dcde892d2be9d7152da178d9ec801.zip
scripts/auto-bootstraps/dobootstrap: ensure entire execution is kept alive
final rsync states could hang because of individual calls to keep the machine awake, run the entire process under a single such call instead Signed-off-by: Fabian Groffen <grobian@gentoo.org>
-rwxr-xr-xscripts/auto-bootstraps/dobootstrap29
-rw-r--r--sys-devel/gcc/files/gcc-10.1.0-darwin-auth-fixincludes.patch100
-rw-r--r--sys-devel/gcc/gcc-10.2.0-r5.ebuild5
3 files changed, 20 insertions, 114 deletions
diff --git a/scripts/auto-bootstraps/dobootstrap b/scripts/auto-bootstraps/dobootstrap
index dec21808ad..636c12688b 100755
--- a/scripts/auto-bootstraps/dobootstrap
+++ b/scripts/auto-bootstraps/dobootstrap
@@ -104,11 +104,6 @@ do_prepare() {
fi
cd "${EPREFIX}" || exit 1
- # optional program to keep the machine from sleeping
- # macOS/BSD: caffeinate
- keepalive=$(type -P caffeinate)
- [[ -x ${keepalive} ]] && keepalive+=" -i -m -s" || keepalive=
-
# reminder: MAKE_CONF_ADDITIONAL_USE can be set to add global
# USE-flags in make.conf prior to stage2 (first emerge usage)
starttime=${SECONDS}
@@ -127,7 +122,8 @@ do_prepare() {
${USE_CPU_CORES+USE_CPU_CORES=}${USE_CPU_CORES} \
${DARWIN_USE_GCC+DARWIN_USE_GCC=}${DARWIN_USE_GCC} \
${PREFIX_DISABLE_RAP+PREFIX_DISABLE_RAP=}${PREFIX_DISABLE_RAP} \
- ${keepalive} ${BASH} ${bootstrapscript} bootstrap
+ ${BP_KEEPALIVE_ACTIVE+BP_KEEPALIVE_ACTIVE=}${BP_KEEPALIVE_ACTIVE} \
+ ${BASH} ${bootstrapscript} bootstrap
endtime=${SECONDS}
if [[ -n ${DOPUBLISH} ]] ; then
@@ -150,9 +146,9 @@ do_prepare() {
chost=${chost%%-*}-${platform}-linux-${dist,,}${rel}
fi
- ${keepalive} rsync -q /dev/null ${UPLOAD}/${HOSTNAME}-$$/
- ${keepalive} rsync -q /dev/null ${UPLOAD}/${HOSTNAME}-$$/${chost}/
- ${keepalive} rsync -rltv \
+ rsync -q /dev/null ${UPLOAD}/${HOSTNAME}-$$/
+ rsync -q /dev/null ${UPLOAD}/${HOSTNAME}-$$/${chost}/
+ rsync -rltv \
--exclude=work/ \
--exclude=homedir/ \
--exclude=files \
@@ -167,7 +163,7 @@ do_prepare() {
var/log/emerge.log \
etc/portage/make.conf \
${UPLOAD}/${HOSTNAME}-$$/${chost}/${dte}/
- ${keepalive} rsync -q /dev/null \
+ rsync -q /dev/null \
${UPLOAD}/${HOSTNAME}-$$/${chost}/${dte}/push-complete/
fi
}
@@ -177,6 +173,19 @@ do_bootstrap() {
${BASH} ./bootstrap-prefix.sh ${EPREFIX} noninteractive
}
+# re-exec under keepalive wrapper, such that the machine we're running
+# on doesn't go to sleep, until we as top-level caller terminate
+if [[ -z ${BP_KEEPALIVE_ACTIVE} ]] ; then
+ # optional program to keep the machine from sleeping
+ # macOS/BSD: caffeinate
+ keepalive=$(type -P caffeinate)
+ [[ -x ${keepalive} ]] && keepalive+=" -i -m -s" || keepalive=
+ if [[ -n ${keepalive} ]] ; then
+ export BP_KEEPALIVE_ACTIVE=1
+ exec ${keepalive} "${BASH_SOURCE[0]}" "${@}"
+ fi
+fi
+
case $1 in
bootstrap)
do_bootstrap
diff --git a/sys-devel/gcc/files/gcc-10.1.0-darwin-auth-fixincludes.patch b/sys-devel/gcc/files/gcc-10.1.0-darwin-auth-fixincludes.patch
deleted file mode 100644
index 84d5ea3632..0000000000
--- a/sys-devel/gcc/files/gcc-10.1.0-darwin-auth-fixincludes.patch
+++ /dev/null
@@ -1,100 +0,0 @@
---- a/fixincludes/inclhack.def
-+++ b/fixincludes/inclhack.def
-@@ -1325,6 +1325,19 @@
- };
-
- /*
-+ * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93082
-+ */
-+fix = {
-+ hackname = darwin_authorization;
-+ mach = "*-*-darwin*";
-+ files = Frameworks/Security.framework/Headers/Authorization.h;
-+ select = "static const size_t kAuthorizationExternalFormLength = 32;\n";
-+ c_fix = format;
-+ c_fix_arg = "enum { kAuthorizationExternalFormLength = 32 };\n";
-+ test_text = "static const size_t kAuthorizationExternalFormLength = 32;\n";
-+};
-+
-+/*
- * For the AAB_darwin7_9_long_double_funcs fix (and later fixes for long long)
- * to be useful, the main math.h must use <> and not "" includes.
- */
---- a/fixincludes/fixincl.x
-+++ b/fixincludes/fixincl.x
-@@ -2686,6 +2686,43 @@
-
- /* * * * * * * * * * * * * * * * * * * * * * * * * *
- *
-+ * Description of Darwin_Authorization fix
-+ */
-+tSCC zDarwin_AuthorizationName[] =
-+ "darwin_authorization";
-+
-+/*
-+ * File name selection pattern
-+ */
-+tSCC zDarwin_AuthorizationList[] =
-+ "Frameworks/Security.framework/Headers/Authorization.h\0";
-+/*
-+ * Machine/OS name selection pattern
-+ */
-+tSCC* apzDarwin_AuthorizationMachs[] = {
-+ "*-*-darwin*",
-+ (const char*)NULL };
-+
-+/*
-+ * content selection pattern - do fix if pattern found
-+ */
-+tSCC zDarwin_AuthorizationSelect0[] =
-+ "static const size_t kAuthorizationExternalFormLength = 32;\n";
-+
-+#define DARWIN_AUTHORIZATION_TEST_CT 1
-+static tTestDesc aDarwin_AuthorizationTests[] = {
-+ { TT_EGREP, zDarwin_AuthorizationSelect0, (regex_t*)NULL }, };
-+
-+/*
-+ * Fix Command Arguments for Darwin_Authorization
-+ */
-+static const char* apzDarwin_AuthorizationPatch[] = {
-+ "format",
-+ "enum { kAuthorizationExternalFormLength = 32 };\n",
-+ (char*)NULL };
-+
-+/* * * * * * * * * * * * * * * * * * * * * * * * * *
-+ *
- * Description of Darwin_9_Long_Double_Funcs_2 fix
- */
- tSCC zDarwin_9_Long_Double_Funcs_2Name[] =
-@@ -10476,9 +10513,9 @@
- *
- * List of all fixes
- */
--#define REGEX_COUNT 296
-+#define REGEX_COUNT 297
- #define MACH_LIST_SIZE_LIMIT 187
--#define FIX_COUNT 258
-+#define FIX_COUNT 259
-
- /*
- * Enumerate the fixes
-@@ -10547,6 +10584,7 @@
- CTRL_QUOTES_USE_FIXIDX,
- CXX_UNREADY_FIXIDX,
- DARWIN_AVAILABILITYINTERNAL_FIXIDX,
-+ DARWIN_AUTHORIZATION_FIXIDX,
- DARWIN_9_LONG_DOUBLE_FUNCS_2_FIXIDX,
- DARWIN_EXTERNC_FIXIDX,
- DARWIN_GCC4_BREAKAGE_FIXIDX,
-@@ -11060,6 +11098,11 @@
- DARWIN_AVAILABILITYINTERNAL_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
- aDarwin_AvailabilityinternalTests, apzDarwin_AvailabilityinternalPatch, 0 },
-
-+ { zDarwin_AuthorizationName, zDarwin_AuthorizationList,
-+ apzDarwin_AuthorizationMachs,
-+ DARWIN_AUTHORIZATION_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
-+ aDarwin_AuthorizationTests, apzDarwin_AuthorizationPatch, 0 },
-+
- { zDarwin_9_Long_Double_Funcs_2Name, zDarwin_9_Long_Double_Funcs_2List,
- apzDarwin_9_Long_Double_Funcs_2Machs,
- DARWIN_9_LONG_DOUBLE_FUNCS_2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
diff --git a/sys-devel/gcc/gcc-10.2.0-r5.ebuild b/sys-devel/gcc/gcc-10.2.0-r5.ebuild
index ae76741ef2..359513628c 100644
--- a/sys-devel/gcc/gcc-10.2.0-r5.ebuild
+++ b/sys-devel/gcc/gcc-10.2.0-r5.ebuild
@@ -48,9 +48,6 @@ src_prepare() {
find . -name "configure" | xargs \
sed -i -e '/^\s*10\.\*)/N' \
-e '/^\s*10\.\*)\s*_lt_dar_allow_undefined/s/10\.\*/10.*|11.*/' || die
-
- # fix complaint about Authorization Framework
- eapply -p1 "${FILESDIR}"/${PN}-10.1.0-darwin-auth-fixincludes.patch
}
src_configure() {
@@ -71,7 +68,7 @@ src_configure() {
export gcc_cv_c_no_fpie=no
export gcc_cv_no_pie=no
;;
- *-darwin20)
+ *-darwin19|*-darwin20)
# use sysroot with the linker, #756160
export gcc_cv_ld_sysroot=yes
;;