From e317054726be481c98a9ffe712a39331d0044396 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Thu, 28 Aug 2003 05:51:04 +0000 Subject: (1) Make UCLIBC_CC env var work even if __UCLIBC_CTOR_DTOR__ isn't defined. (2) Add a command-line option --uclibc-cc with the same functionality. --- extra/gcc-uClibc/gcc-uClibc.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'extra') diff --git a/extra/gcc-uClibc/gcc-uClibc.c b/extra/gcc-uClibc/gcc-uClibc.c index e6c57c6c9..95abe8a3b 100644 --- a/extra/gcc-uClibc/gcc-uClibc.c +++ b/extra/gcc-uClibc/gcc-uClibc.c @@ -212,15 +212,13 @@ int main(int argc, char **argv) char *gcrt1_path[2]; #endif -#ifdef __UCLIBC_CTOR_DTOR__ cc = getenv("UCLIBC_CC"); if (cc==NULL) { cc = GCC_BIN; +#ifdef __UCLIBC_CTOR_DTOR__ findlibgcc = 0; - } -#else - cc = GCC_BIN; #endif + } application_name = basename(argv[0]); if (application_name[0] == '-') @@ -421,6 +419,13 @@ int main(int argc, char **argv) } else if (strcmp("--uclibc-use-rpath",argv[i]) == 0) { use_rpath = 1; argv[i]='\0'; + } else if (strcmp ("--uclibc-cc", argv[i]) == 0 && argv[i + 1]) { + cc = argv[i + 1]; + argv[i] = 0; + argv[i + 1] = 0; + } else if (strncmp ("--uclibc-cc=", argv[i], 12) == 0) { + cc = argv[i] + 12; + argv[i] = 0; } #ifdef __UCLIBC_CTOR_DTOR__ else if (strcmp("--uclibc-no-ctors",argv[i]) == 0) { -- cgit v1.2.3