[uClibc-cvs] CVS uClibc/utils

CVS User mjn3 mjn3 at codepoet.org
Fri Oct 15 08:25:37 UTC 2004


Update of /var/cvs/uClibc/utils
In directory nail:/tmp/cvs-serv8303/utils

Modified Files:
	Makefile 
Log Message:
Rip out Peter's unacceptable "fix" and do the sane thing instead; build
the utils using the uClibc-targeted toolchain.


--- /var/cvs/uClibc/utils/Makefile	2004/10/14 10:08:03	1.19
+++ /var/cvs/uClibc/utils/Makefile	2004/10/15 08:25:36	1.20
@@ -16,8 +16,6 @@
 # along with this program; if not, write to the Free Software Foundation, Inc.,
 # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 
-# Pull in the user's uClibc configuration, but do not
-# pull in Rules.mak.....
 TOPDIR=../
 include $(TOPDIR)Rules.mak
 
@@ -29,8 +27,7 @@
 TARGET_ICONV =
 endif
 
-# do we really need to reset XXFLAGS?
-XXFLAGS=
+# NOTE: We build the utils AFTER we have a uClibc-targeted toolchain.
 
 ifeq ($(strip $(HAVE_SHARED)),y)
 all:	$(TARGETS) $(TARGET_ICONV)
@@ -42,32 +39,34 @@
 	@$(LN) -fs $(TOPDIR)include/elf.h
 
 readelf: readelf.c
-	$(CC) $(CFLAGS) -Wl,-s $^ -o $@ $(LDADD_LIBFLOAT) -L../lib
+	$(CC) $(CFLAGS) -Wl,-s $^ -o $@
 	$(STRIPTOOL) -x -R .note -R .comment $@
 
 ldconfig:	ldconfig.c readsoname.c
-	$(CC) $(CFLAGS) $(XXFLAGS) -Wl,-s -static \
+	$(CC) $(CFLAGS) -Wl,-s -static \
 		-DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \
 		-DUCLIBC_LDSO=$(UCLIBC_LDSO) -I. -I../ldso/include \
-		-nostdlib -o $@ $(STATIC_BIN_START_FILES) $^ $(LDADD_LIBFLOAT) \
-		-L../lib -lc $(LIBGCC) $(STATIC_BIN_END_FILES)
+		$^ -o $@
 	$(STRIPTOOL) -x -R .note -R .comment $@
 
 ldd:	ldd.c
-	$(CC) $(CFLAGS) $(XXFLAGS) $(PIEFLAG) $(LDPIEFLAG) -Wl,-s \
+	$(CC) $(CFLAGS) $(PIEFLAG) $(LDPIEFLAG) -Wl,-s \
 		-DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \
 		-DUCLIBC_LDSO=$(UCLIBC_LDSO) -I. -I../ldso/include \
-		-nostdlib -o $@ $(BIN_START_FILES) $^ $(LDADD_LIBFLOAT) \
-		-L../lib -lc $(LIBGCC) $(END_FILES)
+		$^ -o $@
 	$(STRIPTOOL) -x -R .note -R .comment $@
 
 iconv: ../libc/misc/wchar/wchar.c
-	$(CC) $(CFLAGS) $(XXFLAGS) $(PIEFLAG) $(LDPIEFLAG) -Wl,-s -DL_iconv_main \
-		-nostdlib -o $@ $(BIN_START_FILES) $^ $(LDADD_LIBFLOAT) \
-		-L../lib -lc $(LIBGCC) $(END_FILES)
+	$(CC) $(CFLAGS) $(PIEFLAG) $(LDPIEFLAG) -Wl,-s \
+		-DL_iconv_main \
+		$^ -o $@
 	$(STRIPTOOL) -x -R .note -R .comment $@
 
+ifeq ($(strip $(HAVE_SHARED)),y)
 hostutils: ldd.host ldconfig.host readelf.host
+else
+hostutils: readelf.host
+endif
 
 ldd.host:	ldd.c
 	$(HOSTCC) $(HOSTCFLAGS) -Wl,-s \
@@ -96,8 +95,6 @@
 	$(INSTALL) -d $(PREFIX)$(RUNTIME_PREFIX)usr/bin
 	$(INSTALL) -m 755 ldd $(PREFIX)$(RUNTIME_PREFIX)usr/bin/ldd
 	$(INSTALL) -m 755 ldconfig $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig;
-	# For now, don't bother with readelf since surely the host
-	# system has binutils, or we couldn't have gotten this far...
 	#$(INSTALL) -m 755 readelf $(PREFIX)$(RUNTIME_PREFIX)usr/bin/readelf
 endif
 ifeq ($(strip $(UCLIBC_HAS_LOCALE)),y)



More information about the uClibc-cvs mailing list