diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2011-07-04 23:58:27 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2011-07-04 23:58:27 +0000 |
commit | 0c6a676ac012b515a1b926eb9ff66e332a7763f8 (patch) | |
tree | 52df869a0b8aea42b8a70989e8e78f753da12093 | |
parent | d821c6c6dd91c28532c667dd3346421ee697b6de (diff) |
My merges of miod's binutils-2.17 WIP code with my changed necessary to get
somewhere with it building on arm/ia64. much pressure pirofti@ deraadt@
-rw-r--r-- | gnu/usr.bin/binutils-2.17/Makefile.bsd-wrapper | 39 | ||||
-rw-r--r-- | gnu/usr.bin/binutils-2.17/Makefile.in | 25 | ||||
-rw-r--r-- | gnu/usr.bin/binutils-2.17/bfd/Makefile.in | 1 | ||||
-rw-r--r-- | gnu/usr.bin/binutils-2.17/bfd/elf.c | 4 | ||||
-rw-r--r-- | gnu/usr.bin/binutils-2.17/binutils/Makefile.am | 2 | ||||
-rw-r--r-- | gnu/usr.bin/binutils-2.17/binutils/Makefile.in | 5 | ||||
-rw-r--r-- | gnu/usr.bin/binutils-2.17/binutils/bucomm.c | 2 | ||||
-rw-r--r-- | gnu/usr.bin/binutils-2.17/binutils/doc/Makefile.am | 4 | ||||
-rw-r--r-- | gnu/usr.bin/binutils-2.17/binutils/doc/Makefile.in | 4 | ||||
-rw-r--r-- | gnu/usr.bin/binutils-2.17/binutils/readelf.c | 5 | ||||
-rw-r--r-- | gnu/usr.bin/binutils-2.17/gas/doc/Makefile.am | 4 | ||||
-rw-r--r-- | gnu/usr.bin/binutils-2.17/gas/doc/Makefile.in | 4 | ||||
-rw-r--r-- | gnu/usr.bin/binutils-2.17/ld/Makefile.am | 4 | ||||
-rw-r--r-- | gnu/usr.bin/binutils-2.17/ld/Makefile.in | 4 | ||||
-rw-r--r-- | gnu/usr.bin/binutils-2.17/ld/emultempl/elf32.em | 2 | ||||
-rw-r--r-- | gnu/usr.bin/binutils-2.17/opcodes/Makefile.in | 1 |
16 files changed, 47 insertions, 63 deletions
diff --git a/gnu/usr.bin/binutils-2.17/Makefile.bsd-wrapper b/gnu/usr.bin/binutils-2.17/Makefile.bsd-wrapper index 36559e520a3..fb861fccca9 100644 --- a/gnu/usr.bin/binutils-2.17/Makefile.bsd-wrapper +++ b/gnu/usr.bin/binutils-2.17/Makefile.bsd-wrapper @@ -1,12 +1,12 @@ -# $OpenBSD: Makefile.bsd-wrapper,v 1.1 2011/04/24 20:19:23 miod Exp $ +# $OpenBSD: Makefile.bsd-wrapper,v 1.2 2011/07/04 23:58:26 drahn Exp $ -NEW_BINUTILS=alpha amd64 arm hppa hppa64 i386 mips64 powerpc sh sparc sparc64 +OLD_TOOLCHAIN=m68k m88k vax .for _arch in ${MACHINE_CPU} -. if !empty(NEW_BINUTILS:M${_arch}) -USING_NEW_BINUTILS?=yes +. if !empty(OLD_TOOLCHAIN:M${_arch}) +USING_OLD_TOOLCHAIN?=yes .else -USING_NEW_BINUTILS?=no +USING_OLD_TOOLCHAIN?=no . endif .endfor @@ -22,23 +22,22 @@ MANDIR=${PREFIX}/share/man/cat MAN= binutils/doc/objdump.1 c++filt.1 -#### cross-compilation -###.if !defined(TARGET_ARCH) -###CONF_SUBDIRS+= gdb -###SUBDIRS+= gdb -###INST_SUBDIRS+= gdb -###MAN+= gdb/gdb.1 -###.endif +#### gdb comes from other binutils !?!?! +###CONF_SUBDIRS+= gdb +###SUBDIRS+= gdb +###INST_SUBDIRS+= gdb +###MAN+= gdb/gdb.1 -.if ${USING_NEW_BINUTILS:L} == "yes" +.if ${USING_OLD_TOOLCHAIN:L} != "yes" SUBDIRS+= binutils ld gas CONF_SUBDIRS+= binutils ld gas INST_SUBDIRS+= binutils ld gas MAN+= binutils/doc/addr2line.1 binutils/doc/ar.1 \ binutils/doc/objcopy.1 binutils/doc/ranlib.1 \ binutils/doc/readelf.1 binutils/doc/strings.1 \ - binutils/doc/strip.1 \ - gas/doc/as.1 ld/ld.1 + binutils/doc/strip.1 +# no as or ld manual ??? +# gas/doc/as.1 ld/ld.1 . else CONF_SUBDIRS=${SUBDIRS} CONF_SUBDIRS+= binutils @@ -73,7 +72,7 @@ all: config.status ALL_MODULES="${ALL_MODULES}" \ ALL_HOST_MODULES='${ALL_HOST_MODULES}' \ INFO_HOST_MODULES='${INFO_HOST_MODULES}' all info -.if ${USING_NEW_BINUTILS:L} != "yes" +.if ${USING_OLD_TOOLCHAIN:L} == "yes" cd ${.OBJDIR}/binutils && \ ${MAKE} CC="${CC}" CFLAGS="${CFLAGS} ${COPTS}" \ LDFLAGS=${LDSTATIC} objdump @@ -99,7 +98,7 @@ do-config: .USE mv -f Makefile.tmp Makefile cd ${.OBJDIR} && \ ${MAKE} ${CONFIGURE_MODULES} -.if ${USING_NEW_BINUTILS:L} == "yes" +.if ${USING_OLD_TOOLCHAIN:L} != "yes" # We need to generate as.1 and ld.1 immediately after config.status # for the manpage machinery to work properly. cd ${.OBJDIR}/gas/doc && ${MAKE} as.1 @@ -124,7 +123,7 @@ install: maninstall INSTALL_PROGRAM='install -c -S' \ INSTALL_INFO_HOST_MODULES='${INSTALL_INFO_HOST_MODULES}' \ install install-info -.if ${USING_NEW_BINUTILS:L} != "yes" +.if ${USING_OLD_TOOLCHAIN:L} == "yes" cd ${.OBJDIR}/binutils && \ ${INSTALL} ${INSTALL_COPY} ${INSTALL_STRIP} -o ${BINOWN} \ -g ${BINGRP} -m ${BINMODE} objdump ${DESTDIR}${PREFIX}/bin @@ -133,8 +132,8 @@ install: maninstall clean cleandir: -@if [ -e Makefile ]; then ${MAKE} distclean; fi -c++filt.1: binutils/cxxfilt.man - sed -e 's,@PROGRAM@,c++filt,' <${.CURDIR}/binutils/cxxfilt.man >$@ +c++filt.1: binutils/doc/cxxfilt.man + sed -e 's,@PROGRAM@,c++filt,' <${.CURDIR}/binutils/doc/cxxfilt.man >$@ depend: # Nothing here so far... diff --git a/gnu/usr.bin/binutils-2.17/Makefile.in b/gnu/usr.bin/binutils-2.17/Makefile.in index 2d0da2e7c3c..58db01e5f3d 100644 --- a/gnu/usr.bin/binutils-2.17/Makefile.in +++ b/gnu/usr.bin/binutils-2.17/Makefile.in @@ -18833,33 +18833,8 @@ maintainer-clean-libgui: .PHONY: configure-libiberty maybe-configure-libiberty -maybe-configure-libiberty: -@if libiberty maybe-configure-libiberty: configure-libiberty configure-libiberty: -@endif libiberty -@if libiberty-bootstrap - @if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi -@endif libiberty-bootstrap -@if libiberty - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \ - $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \ - $(HOST_EXPORTS) \ - echo Configuring in $(HOST_SUBDIR)/libiberty; \ - cd "$(HOST_SUBDIR)/libiberty" || exit 1; \ - case $(srcdir) in \ - /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ - *) topdir=`echo $(HOST_SUBDIR)/libiberty/ | \ - sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ - esac; \ - srcdiroption="--srcdir=$${topdir}/libiberty"; \ - libsrcdir="$$s/libiberty"; \ - $(SHELL) $${libsrcdir}/configure \ - $(HOST_CONFIGARGS) $${srcdiroption} \ - || exit 1 -@endif libiberty diff --git a/gnu/usr.bin/binutils-2.17/bfd/Makefile.in b/gnu/usr.bin/binutils-2.17/bfd/Makefile.in index 04cb955e0c6..f9668f3d828 100644 --- a/gnu/usr.bin/binutils-2.17/bfd/Makefile.in +++ b/gnu/usr.bin/binutils-2.17/bfd/Makefile.in @@ -1017,6 +1017,7 @@ clean-libtool: distclean-libtool: -rm -f libtool +install-info-am: uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd diff --git a/gnu/usr.bin/binutils-2.17/bfd/elf.c b/gnu/usr.bin/binutils-2.17/bfd/elf.c index 46edeb00b46..76e76644d03 100644 --- a/gnu/usr.bin/binutils-2.17/bfd/elf.c +++ b/gnu/usr.bin/binutils-2.17/bfd/elf.c @@ -7893,7 +7893,7 @@ elfcore_grok_openbsd_note (bfd *abfd, Elf_Internal_Note *note) if (sect == NULL) return FALSE; - sect->_raw_size = note->descsz; + sect->size = note->descsz; sect->filepos = note->descpos; sect->flags = SEC_HAS_CONTENTS; sect->alignment_power = 1 + bfd_get_arch_size (abfd) / 32; @@ -7907,7 +7907,7 @@ elfcore_grok_openbsd_note (bfd *abfd, Elf_Internal_Note *note) if (sect == NULL) return FALSE; - sect->_raw_size = note->descsz; + sect->size = note->descsz; sect->filepos = note->descpos; sect->flags = SEC_HAS_CONTENTS; sect->alignment_power = 1 + bfd_get_arch_size (abfd) / 32; diff --git a/gnu/usr.bin/binutils-2.17/binutils/Makefile.am b/gnu/usr.bin/binutils-2.17/binutils/Makefile.am index 7513b981609..e7f31b858e1 100644 --- a/gnu/usr.bin/binutils-2.17/binutils/Makefile.am +++ b/gnu/usr.bin/binutils-2.17/binutils/Makefile.am @@ -42,7 +42,7 @@ OBJDUMP_PROG=objdump # This is the demangler, as a standalone program. # Note: This one is used as the installed name too, unlike the above. -#DEMANGLER_PROG=cxxfilt +DEMANGLER_PROG=cxxfilt ADDR2LINE_PROG=addr2line diff --git a/gnu/usr.bin/binutils-2.17/binutils/Makefile.in b/gnu/usr.bin/binutils-2.17/binutils/Makefile.in index 49f1e732a95..e40b81977e2 100644 --- a/gnu/usr.bin/binutils-2.17/binutils/Makefile.in +++ b/gnu/usr.bin/binutils-2.17/binutils/Makefile.in @@ -41,7 +41,7 @@ bin_PROGRAMS = $(am__EXEEXT_6) $(am__EXEEXT_7) \ $(am__EXEEXT_8) $(am__EXEEXT_9) $(am__EXEEXT_10) \ @BUILD_NLMCONV@ @BUILD_SRCONV@ @BUILD_DLLTOOL@ @BUILD_WINDRES@ \ $(am__EXEEXT_11) $(am__EXEEXT_12) @BUILD_DLLWRAP@ @BUILD_MISC@ -noinst_PROGRAMS = $(am__EXEEXT_14) $(am__EXEEXT_15) +noinst_PROGRAMS = $(am__EXEEXT_14) EXTRA_PROGRAMS = $(am__EXEEXT_1) srconv$(EXEEXT) sysdump$(EXEEXT) \ coffdump$(EXEEXT) $(am__EXEEXT_2) $(am__EXEEXT_3) \ $(am__EXEEXT_4) @@ -385,7 +385,7 @@ OBJDUMP_PROG = objdump # This is the demangler, as a standalone program. # Note: This one is used as the installed name too, unlike the above. -#DEMANGLER_PROG = cxxfilt +DEMANGLER_PROG = cxxfilt ADDR2LINE_PROG = addr2line NLMCONV_PROG = nlmconv DLLTOOL_PROG = dlltool @@ -671,6 +671,7 @@ clean-libtool: distclean-libtool: -rm -f libtool +install-info-am: uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd diff --git a/gnu/usr.bin/binutils-2.17/binutils/bucomm.c b/gnu/usr.bin/binutils-2.17/binutils/bucomm.c index 5c8f33f2e38..46d915fce94 100644 --- a/gnu/usr.bin/binutils-2.17/binutils/bucomm.c +++ b/gnu/usr.bin/binutils-2.17/binutils/bucomm.c @@ -394,7 +394,7 @@ make_tempname (char *filename, int isdir) static char template[] = "stXXXXXX"; char *tmpname; char *slash = strrchr (filename, '/'); - char c; + char c = '/'; #ifdef HAVE_DOS_BASED_FILE_SYSTEM { diff --git a/gnu/usr.bin/binutils-2.17/binutils/doc/Makefile.am b/gnu/usr.bin/binutils-2.17/binutils/doc/Makefile.am index 1d043e7d3f8..0730cce149a 100644 --- a/gnu/usr.bin/binutils-2.17/binutils/doc/Makefile.am +++ b/gnu/usr.bin/binutils-2.17/binutils/doc/Makefile.am @@ -34,8 +34,8 @@ info_TEXINFOS = binutils.texi binutils_TEXINFOS = config.texi binutils_TEXI = $(srcdir)/binutils.texi -AM_MAKEINFOFLAGS = -I "$(srcdir)" -I "$(top_srcdir)/../libiberty" -TEXI2DVI = texi2dvi -I "$(srcdir)" -I "$(top_srcdir)/../libiberty" +AM_MAKEINFOFLAGS = -I "$(srcdir)" -I "$(top_srcdir)/../../../lib/libiberty/src" +TEXI2DVI = texi2dvi -I "$(srcdir)" -I "$(top_srcdir)/../../../lib/libiberty/src" config.texi: $(srcdir)/../../bfd/configure $(binutils_TEXI) rm -f config.texi diff --git a/gnu/usr.bin/binutils-2.17/binutils/doc/Makefile.in b/gnu/usr.bin/binutils-2.17/binutils/doc/Makefile.in index 077a3fb3dc3..6aa012702c9 100644 --- a/gnu/usr.bin/binutils-2.17/binutils/doc/Makefile.in +++ b/gnu/usr.bin/binutils-2.17/binutils/doc/Makefile.in @@ -237,8 +237,8 @@ man_MANS = \ info_TEXINFOS = binutils.texi binutils_TEXINFOS = config.texi binutils_TEXI = $(srcdir)/binutils.texi -AM_MAKEINFOFLAGS = -I "$(srcdir)" -I "$(top_srcdir)/../libiberty" -TEXI2DVI = texi2dvi -I "$(srcdir)" -I "$(top_srcdir)/../libiberty" +AM_MAKEINFOFLAGS = -I "$(srcdir)" -I "$(top_srcdir)/../../../lib/libiberty/src" +TEXI2DVI = texi2dvi -I "$(srcdir)" -I "$(top_srcdir)/../../../lib/libiberty/src" MAINTAINERCLEANFILES = config.texi MOSTLYCLEANFILES = $(DEMANGLER_NAME).1 html__strip_dir = `echo $$p | sed -e 's|^.*/||'`; diff --git a/gnu/usr.bin/binutils-2.17/binutils/readelf.c b/gnu/usr.bin/binutils-2.17/binutils/readelf.c index d8bd54f440f..fa6dcf968b4 100644 --- a/gnu/usr.bin/binutils-2.17/binutils/readelf.c +++ b/gnu/usr.bin/binutils-2.17/binutils/readelf.c @@ -3792,7 +3792,12 @@ get_elf_section_flags (bfd_vma sh_flags) } size -= flags [index].len; +#if 0 p = stpcpy (p, flags [index].str); +#else + strcpy (p, flags [index].str); + p += strlen(p); +#endif } else if (flag & SHF_MASKOS) os_flags |= flag; diff --git a/gnu/usr.bin/binutils-2.17/gas/doc/Makefile.am b/gnu/usr.bin/binutils-2.17/gas/doc/Makefile.am index d48a9ccb241..55850e7fdfb 100644 --- a/gnu/usr.bin/binutils-2.17/gas/doc/Makefile.am +++ b/gnu/usr.bin/binutils-2.17/gas/doc/Makefile.am @@ -17,8 +17,8 @@ man_MANS = as.1 info_TEXINFOS = as.texinfo -AM_MAKEINFOFLAGS = -I "$(srcdir)" -I "$(top_srcdir)/../libiberty" -TEXI2DVI = texi2dvi -I "$(srcdir)" -I "$(top_srcdir)/../libiberty" +AM_MAKEINFOFLAGS = -I "$(srcdir)" -I "$(top_srcdir)/../../../lib/libiberty/src" +TEXI2DVI = texi2dvi -I "$(srcdir)" -I "$(top_srcdir)/../../../lib/libiberty/src" asconfig.texi: $(CONFIG).texi rm -f asconfig.texi diff --git a/gnu/usr.bin/binutils-2.17/gas/doc/Makefile.in b/gnu/usr.bin/binutils-2.17/gas/doc/Makefile.in index 2e01cc5fcd2..999219ff2e4 100644 --- a/gnu/usr.bin/binutils-2.17/gas/doc/Makefile.in +++ b/gnu/usr.bin/binutils-2.17/gas/doc/Makefile.in @@ -212,8 +212,8 @@ POD2MAN = pod2man --center="GNU Development Tools" \ man_MANS = as.1 info_TEXINFOS = as.texinfo -AM_MAKEINFOFLAGS = -I "$(srcdir)" -I "$(top_srcdir)/../libiberty" -TEXI2DVI = texi2dvi -I "$(srcdir)" -I "$(top_srcdir)/../libiberty" +AM_MAKEINFOFLAGS = -I "$(srcdir)" -I "$(top_srcdir)/../../../lib/libiberty/src" +TEXI2DVI = texi2dvi -I "$(srcdir)" -I "$(top_srcdir)/../../../lib/libiberty/src" CPU_DOCS = \ c-alpha.texi \ c-arc.texi \ diff --git a/gnu/usr.bin/binutils-2.17/ld/Makefile.am b/gnu/usr.bin/binutils-2.17/ld/Makefile.am index cb633bdc981..5ab2d1d4290 100644 --- a/gnu/usr.bin/binutils-2.17/ld/Makefile.am +++ b/gnu/usr.bin/binutils-2.17/ld/Makefile.am @@ -97,8 +97,8 @@ info_TEXINFOS = ld.texinfo noinst_TEXINFOS = ldint.texinfo man_MANS = ld.1 -AM_MAKEINFOFLAGS = -I $(srcdir) -I $(BFDDIR)/doc -I $(top_srcdir)/../libiberty -TEXI2DVI = texi2dvi -I $(srcdir) -I $(BFDDIR)/doc -I $(top_srcdir)/../libiberty +AM_MAKEINFOFLAGS = -I $(srcdir) -I $(BFDDIR)/doc -I $(top_srcdir)/../../../lib/libiberty/src +TEXI2DVI = texi2dvi -I $(srcdir) -I $(BFDDIR)/doc -I $(top_srcdir)/../../../lib/libiberty/src INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) -I$(top_srcdir)/../intl -I../intl $(HDEFINES) $(CFLAGS) -DLOCALEDIR="\"$(datadir)/locale\"" diff --git a/gnu/usr.bin/binutils-2.17/ld/Makefile.in b/gnu/usr.bin/binutils-2.17/ld/Makefile.in index ad56bf3b81c..13868008649 100644 --- a/gnu/usr.bin/binutils-2.17/ld/Makefile.in +++ b/gnu/usr.bin/binutils-2.17/ld/Makefile.in @@ -324,8 +324,8 @@ CXX_FOR_TARGET = ` \ info_TEXINFOS = ld.texinfo noinst_TEXINFOS = ldint.texinfo man_MANS = ld.1 -AM_MAKEINFOFLAGS = -I $(srcdir) -I $(BFDDIR)/doc -I $(top_srcdir)/../libiberty -TEXI2DVI = texi2dvi -I $(srcdir) -I $(BFDDIR)/doc -I $(top_srcdir)/../libiberty +AM_MAKEINFOFLAGS = -I $(srcdir) -I $(BFDDIR)/doc -I $(top_srcdir)/../../../lib/libiberty/src +TEXI2DVI = texi2dvi -I $(srcdir) -I $(BFDDIR)/doc -I $(top_srcdir)/../../../lib/libiberty/src INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) -I$(top_srcdir)/../intl -I../intl $(HDEFINES) $(CFLAGS) -DLOCALEDIR="\"$(datadir)/locale\"" BFDLIB = ../bfd/libbfd.la LIBIBERTY = -liberty diff --git a/gnu/usr.bin/binutils-2.17/ld/emultempl/elf32.em b/gnu/usr.bin/binutils-2.17/ld/emultempl/elf32.em index f4fb443af93..1f8222a1db9 100644 --- a/gnu/usr.bin/binutils-2.17/ld/emultempl/elf32.em +++ b/gnu/usr.bin/binutils-2.17/ld/emultempl/elf32.em @@ -1521,6 +1521,8 @@ case ${target} in string = gld${EMULATION_NAME}_search_dir(search->name, filename, -1, -1); if (string == NULL) return FALSE; + + arch = arch; /* gcc -Werror */ EOF ;; *) diff --git a/gnu/usr.bin/binutils-2.17/opcodes/Makefile.in b/gnu/usr.bin/binutils-2.17/opcodes/Makefile.in index 736db68493a..3a43f95aefc 100644 --- a/gnu/usr.bin/binutils-2.17/opcodes/Makefile.in +++ b/gnu/usr.bin/binutils-2.17/opcodes/Makefile.in @@ -696,6 +696,7 @@ clean-libtool: distclean-libtool: -rm -f libtool +install-info-am: uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd |