summaryrefslogtreecommitdiff
path: root/extra/gcc-uClibc
diff options
context:
space:
mode:
Diffstat (limited to 'extra/gcc-uClibc')
-rw-r--r--extra/gcc-uClibc/Makefile6
-rw-r--r--extra/gcc-uClibc/gcc-uClibc.c22
2 files changed, 28 insertions, 0 deletions
diff --git a/extra/gcc-uClibc/Makefile b/extra/gcc-uClibc/Makefile
index b27d440fb..6a6773b6a 100644
--- a/extra/gcc-uClibc/Makefile
+++ b/extra/gcc-uClibc/Makefile
@@ -1,3 +1,9 @@
+# Makefile for building a fake gcc/binutils toolchain
+# that simply spoofs the location of the C library
+#
+# Copyright (C) 2000,2001 Erik Andersen <andersen@uclibc.org>
+#
+
TOPDIR = ../../
include $(TOPDIR)Rules.mak
diff --git a/extra/gcc-uClibc/gcc-uClibc.c b/extra/gcc-uClibc/gcc-uClibc.c
index fc3a58dd7..3dc93b41e 100644
--- a/extra/gcc-uClibc/gcc-uClibc.c
+++ b/extra/gcc-uClibc/gcc-uClibc.c
@@ -207,15 +207,34 @@ int main(int argc, char **argv)
use_build_dir = 1;
} else if (strcmp("--uclibc-use-rpath",argv[j]) == 0) {
use_rpath = 1;
+ }
+#if 0
} else {
gcc_argv[i++] = argv[j];
}
+#endif
+ }
+ if (linking && source_count) {
+ if (use_start) {
+ gcc_argv[i++] = crt0_path[use_build_dir];
+ gcc_argv[i++] = "-e _start";
+ }
}
+
+
if (use_stdinc) {
gcc_argv[i++] = nostdinc;
gcc_argv[i++] = uClibc_inc[use_build_dir];
gcc_argv[i++] = GCC_INCDIR;
}
+
+ for ( j = 1 ; j < argc ; j++ ) {
+ if (strcmp("--uclibc-use-build-dir",argv[j]) != 0 &&
+ strcmp("--uclibc-use-rpath",argv[j]) != 0) {
+ gcc_argv[i++] = argv[j];
+ }
+ }
+
if (linking && source_count) {
if (!use_static_linking) {
if (dlstr && use_build_dir) {
@@ -232,9 +251,12 @@ int main(int argc, char **argv)
if (!use_build_dir) {
gcc_argv[i++] = usr_lib_path;
}
+#if 0
if (use_start) {
+ gcc_argv[i++] = "-e _start";
gcc_argv[i++] = crt0_path[use_build_dir];
}
+#endif
if (use_stdlib) {
gcc_argv[i++] = nostdlib;
gcc_argv[i++] = "-lc";