pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/platform /usr/bin/gcc on MacOS X is a wrapper that ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/bb72e9dad0b7
branches:  trunk
changeset: 560082:bb72e9dad0b7
user:      schwarz <schwarz%pkgsrc.org@localhost>
date:      Sun Jun 07 11:34:27 2009 +0000

description:
/usr/bin/gcc on MacOS X is a wrapper that expects to call the (architecture-
dependent) real gcc binary with the same path as it has been evoked. When
it is called via a symbolic link this fails since the evokation path in that
case is the original one of the symbolic link. For that reason pkgsrc's
buildlink framework must be prevented from using symbolic links to refer to
/usr/bin/gcc.

imac:/tmp schwarz$ ln -s /usr/bin/gcc gcc
imac:/tmp schwarz$ /tmp/gcc
gcc: installation problem, cannot exec '/tmp/powerpc-apple-darwin8-gcc-4.0.1': No such file or directory

diffstat:

 mk/platform/Darwin.mk |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r b870fa4a87c1 -r bb72e9dad0b7 mk/platform/Darwin.mk
--- a/mk/platform/Darwin.mk     Sun Jun 07 11:32:17 2009 +0000
+++ b/mk/platform/Darwin.mk     Sun Jun 07 11:34:27 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Darwin.mk,v 1.37 2009/05/06 10:28:01 tron Exp $
+# $NetBSD: Darwin.mk,v 1.38 2009/06/07 11:34:27 schwarz Exp $
 #
 # Variable definitions for the Darwin operating system.
 
@@ -38,6 +38,10 @@
 # Use the GNU cpp, not the OS X cpp, don't look in "/usr/local/include"
 # before "/usr/include".
 CPP_PRECOMP_FLAGS?=    -no-cpp-precomp -isystem /usr/include
+# don't symlink to /usr/bin/gcc since the latter is a wrapper that tries
+# evoke the real (architecture-dependent) gcc binary in the same place
+# which fails when called via a symlink from a different directory
+COMPILER_USE_SYMLINKS?=        no
 .endif
 DEF_UMASK?=            0022
 DEFAULT_SERIAL_DEVICE?=        /dev/null



Home | Main Index | Thread Index | Old Index