summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schlemmer <azarah@gentoo.org>2003-01-19 23:39:05 +0000
committerMartin Schlemmer <azarah@gentoo.org>2003-01-19 23:39:05 +0000
commit38eb7ed6f36fb5f85d99fda1d649f45afaf88ffa (patch)
tree085ad6ea6e199924723d5e14b673ed5ce20ed212 /sys-devel/gcc-config
parentmore fixes to gcc2_flags(); bug #13907 (diff)
downloadhistorical-38eb7ed6f36fb5f85d99fda1d649f45afaf88ffa.tar.gz
historical-38eb7ed6f36fb5f85d99fda1d649f45afaf88ffa.tar.bz2
historical-38eb7ed6f36fb5f85d99fda1d649f45afaf88ffa.zip
more fixes
Diffstat (limited to 'sys-devel/gcc-config')
-rw-r--r--sys-devel/gcc-config/ChangeLog7
-rw-r--r--sys-devel/gcc-config/files/wrapper.c13
2 files changed, 15 insertions, 5 deletions
diff --git a/sys-devel/gcc-config/ChangeLog b/sys-devel/gcc-config/ChangeLog
index 10b13f0cf638..0192500adc9c 100644
--- a/sys-devel/gcc-config/ChangeLog
+++ b/sys-devel/gcc-config/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sys-devel/gcc-config
# Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/ChangeLog,v 1.18 2003/01/19 19:14:52 azarah Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/ChangeLog,v 1.19 2003/01/19 23:39:05 azarah Exp $
+
+ 19 Jan 2003; Martin Schlemmer <azarah@gentoo.org> wrapper.c :
+
+ Fix to check if '/gcc-bin/' in full name of called gcc, once again thanks
+ to feedback from Eric Andresen <ndiin1@cox.net>.
*gcc-config-1.3.1 (19 Jan 2003)
diff --git a/sys-devel/gcc-config/files/wrapper.c b/sys-devel/gcc-config/files/wrapper.c
index ee2876c264d4..b13bc3e6b943 100644
--- a/sys-devel/gcc-config/files/wrapper.c
+++ b/sys-devel/gcc-config/files/wrapper.c
@@ -2,7 +2,7 @@
* Copyright 1999-2003 Gentoo Technologies, Inc.
* Distributed under the terms of the GNU General Public License v2
* Author: Martin Schlemmer <azarah@gentoo.org>
- * $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/files/wrapper.c,v 1.4 2003/01/19 19:14:52 azarah Exp $
+ * $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/files/wrapper.c,v 1.5 2003/01/19 23:39:05 azarah Exp $
*/
#define _REENTRANT
@@ -50,7 +50,11 @@ int main(int argc, char **argv) {
} else
token = NULL;
- /* Find the first file with suitable name in PATH */
+ /* Find the first file with suitable name in PATH. The idea here is
+ * that we do not want to bind ourselfs to something static like the
+ * default profile, or some odd environment variable, but want to be
+ * able to build something with a non default gcc by just tweaking
+ * the PATH ... */
while ((NULL != token) && (strlen(token) > 0)) {
tmpstr = (char *)malloc(strlen(token) + strlen(wrappername) + 2);
@@ -59,9 +63,10 @@ int main(int argc, char **argv) {
/* Does it exist and is a file? */
ret = stat(tmpstr, &sbuf);
- /* It exists, and are not our wrapper, and its not in /usr/bin ... */
+ /* It exists, and are not our wrapper, and its in a dir containing
+ * gcc-bin ... */
if ((0 == ret) && (sbuf.st_mode & S_IFREG) &&
- (0 != strcmp(tmpstr, wrapfullname)) && (0 == strstr(tmpstr, "/usr/bin"))) {
+ (0 != strcmp(tmpstr, wrapfullname)) && (0 != strstr(tmpstr, "/gcc-bin/"))) {
strncpy(wrapperbin, tmpstr, MAXPATHLEN);