diff options
Diffstat (limited to 'utils')
-rw-r--r-- | utils/Makefile | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/utils/Makefile b/utils/Makefile index 2b5e30635..168a2e920 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -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 @@ else 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 @@ headers: @$(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 @@ ifeq ($(strip $(HAVE_SHARED)),y) $(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) |