From 562dfbda091a345f2a1a9e8ff46911538950916b Mon Sep 17 00:00:00 2001 From: Christopher Larson Date: Fri, 16 May 2014 12:16:42 -0700 Subject: [PATCH] Revert "tcmode: disable pseudo when running the toolchain" This caused all manner of breakage due to the toolchain writing out files with wrong ownership, then those files would end up leaking into the rootfs. JIRA: INTAMDDET-129, SB-2725 This reverts commit 6bd4ec919aec8e2007d06dab699c7a8b4deb4136. --- conf/distro/include/tcmode-external-sourcery.inc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/conf/distro/include/tcmode-external-sourcery.inc b/conf/distro/include/tcmode-external-sourcery.inc index 7925e73..17cc5de 100644 --- a/conf/distro/include/tcmode-external-sourcery.inc +++ b/conf/distro/include/tcmode-external-sourcery.inc @@ -159,12 +159,12 @@ def populate_toolchain_links(d): for f in files: base = os.path.basename(f) newpath = os.path.join(bindir, base) - if not os.path.exists(newpath): - with open(newpath, 'w') as new: - new.write('#!/bin/sh\n') - new.write('export PSEUDO_UNLOAD=1\n') - new.write('exec {0} "$@"\n'.format(f)) - os.chmod(newpath, 0755) + try: + os.symlink(f, newpath) + except OSError as exc: + if exc.errno == errno.EEXIST: + break + bb.fatal("Unable to populate toolchain binary symlink for %s: %s" % (newpath, exc)) # Ensure that we have a ld.bfd available, now that KERNEL_LD uses it ld = d.expand('${TARGET_PREFIX}ld')