diff options
author | Mike Frysinger <vapier@gentoo.org> | 2007-07-27 07:47:07 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2007-07-27 07:47:07 +0000 |
commit | 5d4e7efe95738d818a60397b9aec4ca06b57da0e (patch) | |
tree | 7a3cd7d67d9b77563343387eb68adf5985fd9575 /sys-devel/gcc-config | |
parent | restrict test, bug #186752 (diff) | |
download | historical-5d4e7efe95738d818a60397b9aec4ca06b57da0e.tar.gz historical-5d4e7efe95738d818a60397b9aec4ca06b57da0e.tar.bz2 historical-5d4e7efe95738d818a60397b9aec4ca06b57da0e.zip |
update wrapper to match new gcc-config behavior where all env.d files contain full ctargets
Package-Manager: portage-2.1.3_rc9
Diffstat (limited to 'sys-devel/gcc-config')
-rw-r--r-- | sys-devel/gcc-config/Manifest | 14 | ||||
-rw-r--r-- | sys-devel/gcc-config/files/wrapper-1.5.0.c | 36 |
2 files changed, 19 insertions, 31 deletions
diff --git a/sys-devel/gcc-config/Manifest b/sys-devel/gcc-config/Manifest index f5c1d4ea0cef..b22fcdf76981 100644 --- a/sys-devel/gcc-config/Manifest +++ b/sys-devel/gcc-config/Manifest @@ -29,10 +29,10 @@ AUX wrapper-1.4.8.c 9712 RMD160 1210dc111da9955926dc98264991e39489525f20 SHA1 61 MD5 a2a6606413d1fd68198bc65ee15d1d06 files/wrapper-1.4.8.c 9712 RMD160 1210dc111da9955926dc98264991e39489525f20 files/wrapper-1.4.8.c 9712 SHA256 a45dec68f7a2b4f1d96e83181693afb10cf73b6fbdcd3456055e2bc64bc114e7 files/wrapper-1.4.8.c 9712 -AUX wrapper-1.5.0.c 9748 RMD160 c6bf6a8e625999aa75058d04d30b8a81cd0d71ce SHA1 39a5123dadb7b307cc5259e2d8e35108a3890818 SHA256 67efada2fdec828cd392799f649e60537997b9a1994eee1e116358071df995a6 -MD5 688b759dbb4657675475648c945bfbc6 files/wrapper-1.5.0.c 9748 -RMD160 c6bf6a8e625999aa75058d04d30b8a81cd0d71ce files/wrapper-1.5.0.c 9748 -SHA256 67efada2fdec828cd392799f649e60537997b9a1994eee1e116358071df995a6 files/wrapper-1.5.0.c 9748 +AUX wrapper-1.5.0.c 9334 RMD160 22277a26d48c94291d26b66ef243ac985c4efd59 SHA1 1dec5b1aa92a99e519c57ccbb72935c57db739b5 SHA256 d1cac528055d35b2aad4e7075fe5d0a72e2cc7488bde683f9b71950bb4d5c1f5 +MD5 3e12588cff1728bb2cc541fd8b44c763 files/wrapper-1.5.0.c 9334 +RMD160 22277a26d48c94291d26b66ef243ac985c4efd59 files/wrapper-1.5.0.c 9334 +SHA256 d1cac528055d35b2aad4e7075fe5d0a72e2cc7488bde683f9b71950bb4d5c1f5 files/wrapper-1.5.0.c 9334 DIST compiler-config-2.0.0_rc1.tar.gz 117180 RMD160 dbcd8120139c75f40ae2405746ab2a5f26e810b4 SHA1 3a1a1605dd0e8b59ba5d796c4583244f46f97a03 SHA256 a911a7b0a1184c576500df8530e77823f976dce387001c581ba89ac8edfe30c2 EBUILD gcc-config-1.3.13-r4.ebuild 1496 RMD160 bb50b68fb945979eea48dba086b1582c32573377 SHA1 f24baf13a4bbe346274f0863d5e7065a8c43ccf1 SHA256 b6bb88fda5494c5f6e22e3ae885cb7b92dec720cd4bbd86132255dcf2984d544 MD5 1d90be7823ef441090aded734aef408c gcc-config-1.3.13-r4.ebuild 1496 @@ -87,7 +87,7 @@ SHA256 ba21ae92f613fd0a6f34b3fda34d1d82c6b284c045481b9686b66fd9e373c21e files/di -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.5 (GNU/Linux) -iD8DBQFGp19np/wUKkr7RBoRAtUVAJ9w93fqWnj8xdzWWK7KiE3h2iMkvQCggJXX -UdSZisecfW1kwBhCmQH/9WU= -=klp5 +iD8DBQFGqaNXp/wUKkr7RBoRAoZPAKCVSK3U+pD9QkwOpFmKjOXS2QGc0QCdE+Uz +fIFTdwYCIruA473HGWT+fPc= +=jTUG -----END PGP SIGNATURE----- diff --git a/sys-devel/gcc-config/files/wrapper-1.5.0.c b/sys-devel/gcc-config/files/wrapper-1.5.0.c index 4766e33f0b72..4778ebe0d05e 100644 --- a/sys-devel/gcc-config/files/wrapper-1.5.0.c +++ b/sys-devel/gcc-config/files/wrapper-1.5.0.c @@ -1,7 +1,7 @@ /* * Copyright 1999-2005 Gentoo Foundation * Distributed under the terms of the GNU General Public License v2 - * $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/files/wrapper-1.5.0.c,v 1.1 2007/05/03 05:20:39 vapier Exp $ + * $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/files/wrapper-1.5.0.c,v 1.2 2007/07/27 07:47:07 vapier Exp $ * Author: Martin Schlemmer <azarah@gentoo.org> * az's lackey: Mike Frysinger <vapier@gentoo.org> */ @@ -130,17 +130,14 @@ static int find_target_in_envd(struct wrapper_data *data, int cross_compile) char *strp = str; char envd_file[MAXPATHLEN + 1]; - if (!cross_compile) { - snprintf(envd_file, MAXPATHLEN, "%s", ENVD_BASE); - } else { - char *ctarget, *end = strrchr(data->name, '-'); - if (end == NULL) - return 0; - ctarget = strdup(data->name); - ctarget[end - data->name] = '\0'; - snprintf(envd_file, MAXPATHLEN, "%s-%s", ENVD_BASE, ctarget); - free(ctarget); - } + char *ctarget, *end = strrchr(data->name, '-'); + if (end == NULL) + return 0; + ctarget = strdup(data->name); + ctarget[end - data->name] = '\0'; + snprintf(envd_file, MAXPATHLEN, "%s-%s", ENVD_BASE, ctarget); + free(ctarget); + envfile = fopen(envd_file, "r"); if (envfile == NULL) return 0; @@ -344,17 +341,8 @@ int main(int argc, char *argv[]) */ argv[0] = data.bin; - /* If this is g{cc,++}{32,64}, we need to add -m{32,64} - * otherwise we need to add ${CFLAGS_${ABI}} - */ - size = strlen(data.bin) - 2; - if(!strcmp(data.bin + size, "32") ) { - *(data.bin + size) = '\0'; - newargv = build_new_argv(argv, "-m32"); - } else if (!strcmp(data.bin + size, "64") ) { - *(data.bin + size) = '\0'; - newargv = build_new_argv(argv, "-m64"); - } else if(getenv("ABI")) { + /* If $ABI is in env, add appropriate env flags */ + if (getenv("ABI")) { char envvar[50]; /* We use CFLAGS_${ABI} for gcc, g++, g77, etc as they are @@ -364,7 +352,7 @@ int main(int argc, char *argv[]) if (getenv(envvar)) { newargv = build_new_argv(argv, getenv(envvar)); - if(!newargv) + if (!newargv) wrapper_exit("%s wrapper: out of memory\n", argv[0]); } } |