[MacPorts] UsingTheRightCompiler modified
MacPorts
noreply at macports.org
Wed Jun 3 22:50:20 PDT 2009
Changed page "UsingTheRightCompiler" by ryandesign at macports.org from 70.114.129.90*
Page URL: <http://trac.macports.org/wiki/UsingTheRightCompiler>
Diff URL: <http://trac.macports.org/wiki/UsingTheRightCompiler?action=diff&version=2>
Revision 2
Comment: add section on detecting ports that aren't using ${configure.cc} et al
-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: UsingTheRightCompiler
=========================================================================
--- UsingTheRightCompiler (version: 1)
+++ UsingTheRightCompiler (version: 2)
@@ -106,3 +106,32 @@
For example, "`gcc`" or "`cc`" can be replaced with "$(CC)" in the Makefile,
possibly in combination with setting ${build.env} as above.
Such patches should usually be sent upstream for inclusion in the next version of the software.
+
+
+= How to test = #testing
+
+Unless you look closely at the build output in debug mode,
+it can be hard to know whether a port is using ${configure.cc} as it should.
+Here is one strategy that can be used:
+
+ 1. Create a directory /opt/local/bin/no_default_gcc
+ 2. Create a script in that directory called "`cc`" that always prints an error message
+ 3. Create symlinks "`c++`", "`cpp`", "`g++`", and "`gcc`", all pointing to the "`cc`" script
+ 4. Edit the value of "binpath" in /opt/local/etc/macports/macports.conf so that it begins with "/opt/local/bin/no_default_gcc:"
+
+Now anytime a port tries to use one of these unversioned programs, the compile will stop with an error.
+
+Steps 1 through 3 can be done
+by checking out [browser:users/ryandesign/no_default_gcc this directory]
+from the MacPorts Subversion repository:
+
+{{{
+svn checkout \
+http://svn.macosforge.org/repository/macports/users/ryandesign/no_default_gcc \
+/opt/local/bin/no_default_gcc
+}}}
+
+If you encounter a port which triggers this error
+but you don't want to fix it immediately,
+you can bypass it by editing macports.conf
+and removing "/opt/local/bin/no_default_gcc:" from the "binpath" again.
-------8<------8<------8<------8<------8<------8<------8<------8<--------
* The IP shown here might not mean anything if the user or the server is
behind a proxy.
--
MacPorts <http://www.macports.org/>
Ports system for Mac OS
This is an automated message. Someone at http://www.macports.org/ added your email
address to be notified of changes on UsingTheRightCompiler. If it was not you, please
report to .
More information about the macports-changes
mailing list