tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CPP_PRECOMP_FLAGS for cross compilation on Darwin
Building cross/avr-libc on Darwin failes in strange ways because the AVG gcc
picks up wrong include files.
I've tracked this down to mk/platform/Darwin.mk setting
CPP_PRECOMP_FLAGS?= -no-cpp-precomp -isystem /usr/include
which is not exactly what you want for cross-compiling. I think this needs to
be wrapped in some "are we cross-compiling?"-.if, but I don't know which
variable to use for that. Testing USE_GNU_CONFIGURE_HOST seems to work, but
that's a hack:
--- Darwin.mk.orig 2009-11-29 12:59:08.000000000 +0100
+++ Darwin.mk 2010-04-12 16:00:48.000000000 +0200
@@ -38,7 +38,9 @@
.if !defined(PKGSRC_COMPILER) || !empty(PKGSRC_COMPILER:Mgcc)
# Use the GNU cpp, not the OS X cpp, don't look in "/usr/local/include"
# before "/usr/include".
+.if empty(USE_GNU_CONFIGURE_HOST:M[nN][oO])
CPP_PRECOMP_FLAGS?= -no-cpp-precomp -isystem /usr/include
+.endif
# 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
Any suggestions which variable to test?
Home |
Main Index |
Thread Index |
Old Index