diff options
author | Miles Bader <miles@lsi.nec.co.jp> | 2003-08-28 05:51:04 +0000 |
---|---|---|
committer | Miles Bader <miles@lsi.nec.co.jp> | 2003-08-28 05:51:04 +0000 |
commit | e317054726be481c98a9ffe712a39331d0044396 (patch) | |
tree | a38da01ba066a358b8a0b4ce83e4bc199352a438 /extra/gcc-uClibc/gcc-uClibc.c | |
parent | 6c4f6474c34fe5b608b87892115c5e8335e7a209 (diff) |
(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.
Diffstat (limited to 'extra/gcc-uClibc/gcc-uClibc.c')
-rw-r--r-- | extra/gcc-uClibc/gcc-uClibc.c | 13 |
1 files changed, 9 insertions, 4 deletions
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) { |