Skip to content
This repository was archived by the owner on May 7, 2024. It is now read-only.

Commit 7b039c8

Browse files
committed
core_defines: set TMPDIR to $SRCDIR
There was a bug where proc/10-core_defines.sh set TMPDIR as $SRCDIR, but then the script sourced etc/autobuild3/ab3_defcfg.sh, which overrides TMPDIR as /tmp, a tmpfs mount point in systemd-based systems. This could result in peculiar OOM-like errors during link time, especially when packages utilise LTO.
1 parent 1ba7ab3 commit 7b039c8

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

etc/autobuild/ab3_defcfg.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
##Autobuild default config file
33
##@copyright CC0
44

5-
##Misc building flags
5+
# Environmental Settings
6+
# Avoid setting TMPDIR as tmpfs mount points.
7+
TMPDIR="$SRCDIR"
8+
9+
# Misc building flags
610
ABARCHIVE=autobuild-aoscarchive # Archive program
711
ABSHADOW=yes # Shall shadow builds be performed by default?
812
NOLTO=no # Enable LTO by default.
@@ -58,11 +62,9 @@ AB_SAN_LEK=0
5862
AB_LD_BFD=0
5963

6064
##OS Directory Tree
61-
# Built-in variables for OS3 directory tree.
65+
# Built-in variables for AOSC OS directory tree.
6266
# Will be updated. Therefore not part of conffiles.
6367
#
64-
# COPYLEFT TO WHOEVER NEEDS IT.
65-
#
6668
PREFIX="/usr"
6769
BINDIR="/usr/bin"
6870
LIBDIR="/usr/lib"
@@ -79,7 +81,6 @@ X11CONF="/etc/X11/xorg.conf.d"
7981
STATDIR="/var"
8082
INCLUDE="/usr/include"
8183
BOOTDIR="/boot"
82-
TMPDIR="/tmp"
8384
LIBEXEC="/usr/libexec"
8485
MANDIR="/usr/share/man"
8586
FDOAPP="/usr/share/applications"

proc/10-core_defines.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ export SRCDIR="$PWD"
66
export PKGDIR="$PWD/abdist"
77
export SYMDIR="$PWD/abdist-dbg"
88

9-
# Avoid dpkg-deb failure with larger packages on low RAM hosts.
10-
export TMPDIR="$SRCDIR"
11-
129
BUILD_START(){ true; }
1310
BUILD_READY(){ true; }
1411
BUILD_FINAL(){ true; }

0 commit comments

Comments
 (0)